1. Conduid
  2. Search
  3. Anthropic SDK Ruby Examples
MCP server · Search

Anthropic SDK Ruby Examples

Unclaimed last commit a year ago search
30Low

Scored 7 months ago · breakdown

About Anthropic SDK Ruby Examples

Anthropic SDK Ruby Examples is an MCP server published by andyw8 in the Search category.

The repository has 5 stars and 0 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/andyw8/anthropic-sdk-ruby-examples

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Anthropic SDK Ruby Examples

Powered by Claude · Grounded in docs

I know everything about Anthropic SDK Ruby Examples. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

Anthropic SDK Ruby Examples

This repository contains examples from the course Claude with the Anthropic API converted to Ruby.

The examples demonstrate how to use the Anthropic SDK for Ruby to interact with Claude and build applications using the Anthropic API.

My hope is to make this a useful resource for learning and for reference.

Some of the conversion has been done by Claude (see the custom slash command) but manual edits were made, either out of neccessity, or to follow idiomatic Ruby.

Setup

Copy .env.example to .env and fill in your Anthropic API key.

(the VoyageAI API key is only needed for the Retrieval Augmentated Generation (RAG) section.)

Examples

Basic API Usage

Tool Use

Retrieval Augmented Generation

  • Text Chunking Strategies - Different strategies for chunking text including character-based, sentence-based, and section-based approaches
  • Text Embeddings - Generate text embeddings using VoyageAI for RAG applications
  • Implementing the RAG Flow - Implementation of vector database functionality and RAG flow components
    • Note: This outputs different results than shown in the course video, but it matches what I see when running the Python Jupyter notebook.
  • Multi-Index RAG Pipeline - A hybrid RAG system combining vector search and BM25 lexical search for improved retrieval accuracy
    • Note: This outputs different results than shown in the course video. I need to investigate further.
  • Reranking Results - Implementation of result reranking using Claude to improve the relevance of retrieved documents

Features of Claude

Model Context Protocol

I have adapted the example to use the official Ruby SDK for the Model Context Protocol.

When using the MCP inspector, set command to ruby and arguments to the absolute path of stdio_server.rb.

I have not implemented a client. I suggest using the Claude for desktop or Claude Code for trying it out. See below for a sample config for claude_desktop_config.json. You will likely need to explictly specify a Ruby version to avoid it falling to back the system Ruby version. The example shows it for mise.

{
  "anthropic-ruby-mcp-example": {
    "command": "/Users/andy/.local/share/mise/installs/ruby/3.4.4/bin/ruby",
    "args": [
      "/Users/andyw8/github.com/src/anthropic-sdk-ruby-examples/09_model_context_protocol/stdio_server.rb"
    ]
  }
}

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Anthropic SDK Ruby Examples

How do I install Anthropic SDK Ruby Examples?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Anthropic SDK Ruby Examples safe to use with an AI agent?

Its trust score is 30 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Anthropic SDK Ruby Examples still maintained?

The last commit was a year ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.