rag-mcp-server-builder

rag-mcp-server-builder is a skill for Claude Code, Codex from ibm-self-serve-assets/building-blocks. It costs 76 tokens per session (1,155 once invoked), scanned A, original, Apache-2.0.

Guidance for building IBM-based MCP servers that let AI assistants ingest and search documents. RAG means finding relevant source text before generating an answer, while MCP is a standard way for assistants to use external tools.

In plain words
What is it for?
Building document-ingestion and search tools with IBM Cloud Object Storage, watsonx.ai, Milvus or OpenSearch, and IBM Code Engine, using either web-based or local communication.
Why use it?
It brings together document storage, text embeddings, search databases, authentication, and deployment details that are otherwise easy to connect incorrectly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Building document-ingestion and search tools with IBM Cloud Object Storage, watsonx.ai, Milvus or OpenSearch, and IBM Code Engine, using either web-based or local communication.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ibm-self-serve-assets/building-blocks/rag-mcp-server-builder
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ibm-self-serve-assets/building-blocks --skill rag-mcp-server-builder
Clone the repo
git clone --depth 1 https://github.com/ibm-self-serve-assets/building-blocks

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rag-mcp-server-builder

README.md
[![agentmods](https://agentmods.dev/badge/skills/ibm-self-serve-assets/building-blocks/rag-mcp-server-builder/github.svg)](https://agentmods.dev/skills/ibm-self-serve-assets/building-blocks/rag-mcp-server-builder)
Your own site
<a href="https://agentmods.dev/skills/ibm-self-serve-assets/building-blocks/rag-mcp-server-builder"><img src="https://agentmods.dev/badge/skills/ibm-self-serve-assets/building-blocks/rag-mcp-server-builder/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rag-mcp-server-builder

Your own site · 80×15
<a href="https://agentmods.dev/skills/ibm-self-serve-assets/building-blocks/rag-mcp-server-builder"><img src="https://agentmods.dev/badge/skills/ibm-self-serve-assets/building-blocks/rag-mcp-server-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,155 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 134
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00076 $0.01155
Opus 5 $0.00038 $0.00577
Sonnet 5 $0.00015 $0.00231
Haiku 4.5 $0.00008 $0.00115

Measured 12d ago against content hash f7bf4dd3fd37, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

rag-mcp-server-builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ibm-bob/skills/rag-mcp-server-builder/SKILL.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

IBM RAG MCP Server Builder

Purpose

Expert guidance for building Model Context Protocol (MCP) servers that expose RAG capabilities (ingestion, retrieval, hybrid search) as tools consumable by IBM Bob, Claude, and other MCP-compatible AI assistants.

IBM Cloud Product Coverage

IBM Cloud Product MCP Role
IBM watsonx.ai Embedding generation tool
IBM watsonx.data (Milvus/OpenSearch) Vector storage and retrieval tool
IBM Cloud Object Storage Document ingestion source tool
IBM Code Engine MCP server deployment (SSE transport)
IBM Cloud IAM Authentication for all watsonx calls

Rules

  • Use fastmcp or the mcp Python SDK for server implementation
  • SSE transport: serve at GET /sse and POST /messages/
  • stdio transport: pipe JSON-RPC messages through stdin/stdout
  • Tool names: use snake_case (e.g. ingest_documents, search_documents, hybrid_search)
  • Always validate inputs with Pydantic v2 before calling IBM services
  • IBM Code Engine: expose port 8080; set SSE_TRANSPORT=true env var

Scope

  • RAG ingestion MCP tools (from IBM COS to Milvus/OpenSearch)
  • RAG retrieval MCP tools (vector search, keyword search, hybrid search)
  • Embedding generation MCP tools (IBM watsonx.ai)
  • SSE transport server for remote deployment on IBM Code Engine
  • stdio transport server for local IBM Bob integration

Procedure

Phase 1: MCP Server Structure (SSE)

from mcp.server import Server
from mcp.server.sse import SseServerTransport
from fastapi import FastAPI

server = Server("rag-retrieval-server")
app = FastAPI()
sse = SseServerTransport("/messages/")

@app.get("/sse")
async def handle_sse(request):
    async with sse.connect_sse(request.scope, request.receive, request._send) as streams:
        await server.run(streams[0], streams[1], server.create_initialization_options())

Phase 2: Register Retrieval Tool

from mcp.types import Tool, TextContent

@server.list_tools()
async def list_tools():
    return [
        Tool(
            name="search_documents",
            description="Semantic search over IBM watsonx.data vector store using IBM watsonx.ai embeddings",
            inputSchema={
                "type": "object",
                "properties": {
                    "query":      {"type": "string", "description": "Natural language search query"},
                    "index_name": {"type": "string", "description": "Vector index / collection name"},
                    "top_k":      {"type": "integer", "default": 5},
                    "search_type":{"type": "string", "enum": ["vector", "keyword", "hybrid"], "default": "hybrid"},
                },
                "required": ["query", "index_name"],
            },
        )
    ]


@server.call_tool()
async def call_tool(name: str, arguments: dict):
    if name == "search_documents":
        results = await do_search(
            query=arguments["query"],
            index_name=arguments["index_name"],
            top_k=arguments.get("top_k", 5),
            search_type=arguments.get("search_type", "hybrid"),
        )
        return [TextContent(type="text", text=json.dumps(results, indent=2))]

Read the full file on GitHub · 135 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 135 lines · 76 tokens per session scan A f7bf4dd3fd37

Subscribe to this mod's changes

rag-mcp-server-builder is a skill published in the GitHub repository ibm-self-serve-assets/building-blocks (24 stars, last pushed yesterday), licensed Apache-2.0. It adds 76 tokens to every session and 1,155 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

embeddings

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

ruvnet/ruflo · 62 tokens

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

9router-embeddings

Generate vector embeddings via 9Router /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia / GitHub embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text.

decolua/9router · 66 tokens

azure-search-documents-dotnet

Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…

microsoft/skills · 102 tokens

browserwing-admin

Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.

MemTensor/MemOS · 47 tokens