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.
npx skills add ibm-self-serve-assets/building-blocks --skill rag-mcp-server-buildergit clone --depth 1 https://github.com/ibm-self-serve-assets/building-blocksWrote 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.
[](https://agentmods.dev/skills/ibm-self-serve-assets/building-blocks/rag-mcp-server-builder)<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.
<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>- NVIDIA SkillSpector warn
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.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00076 | $0.01155 |
| Opus 5.5 | $0.00030 | $0.00462 |
| Sonnet 5.5 | $0.00015 | $0.00231 |
| Haiku 4.5 | $0.00008 | $0.00115 |
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 2mo 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.
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
fastmcpor themcpPython SDK for server implementation - SSE transport: serve at
GET /sseandPOST /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=trueenv 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))]
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.
- 2mo ago First seen · 135 lines · 76 tokens per session scan A f7bf4dd3fd37
rag-mcp-server-builder is a skill published in the GitHub repository ibm-self-serve-assets/building-blocks (28 stars, last pushed yesterday), licensed Apache-2.0. It adds 76 tokens to every session and 1,155 once invoked, about $0.0003 per session on Opus 5.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.
rag-mcp-server-builder compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| rag-mcp-server-builderibm-self-serve-assets/building-blocks | Skill | 28 | yesterday | Apache-2.0 | A | 76 | Claude Code, Codex |
| embeddingsruvnet/ruflo | Skill | 81k | yesterday | MIT | A | 62 | Claude Code |
| agent-platform-rag-engine-managementgoogle/skills | Skill | 22k | yesterday | Apache-2.0 | A | 85 | Claude Code, Codex |
| llm-app-patternsdavila7/claude-code-templates | Skill | 33k | yesterday | MIT | A | 54 | Claude Code, Codex |
| 9router-embeddingsdecolua/9router | Skill | 32k | 9d ago | MIT | A | 66 | Claude Code, Codex |
| embedding-strategiesforyourhealth111-pixel/Vibe-Skills | Skill | 3.8k | 3d ago | Apache-2.0 | A | 37 | Claude Code, Codex |
| similarity-search-patternsforyourhealth111-pixel/Vibe-Skills | Skill | 3.8k | 3d ago | Apache-2.0 | A | 30 | Claude Code, Codex |