MCP Docs Search Server for Dev Teams
Build an MCP server scoped to documentation sites for your team. Search docs from within your AI coding assistant.
Every dev team has the same problem: someone asks "how does our auth flow work?" in Slack, and three people spend 10 minutes searching Notion, Confluence, or a docs site for the answer. An MCP server that searches your documentation domains gives AI coding assistants instant access to team docs. Instead of context-switching to a browser, the agent searches docs inline and returns relevant pages.
The concept: scoped search
Instead of searching the entire web, scope searches to your documentation domains. If your team uses docs.yourcompany.com and wiki.yourcompany.com, every search is restricted to those domains. This eliminates noise from Stack Overflow answers about different products.
MCP server implementation
import requests, os
from mcp.server import Server
from mcp.types import Tool, TextContent
app = Server("docs-search")
HEADERS = {"x-api-key": os.environ["SCAVIO_API_KEY"]}
API_URL = "https://api.scavio.dev/api/v1/search"
# Configure your doc domains
DOC_DOMAINS = [
"docs.yourcompany.com",
"wiki.yourcompany.com",
"api-reference.yourcompany.com",
]
@app.list_tools()
async def list_tools():
return [
Tool(
name="search_docs",
description="Search team documentation for a topic",
inputSchema={
"type": "object",
"properties": {
"query": {"type": "string", "description": "Search query"},
},
"required": ["query"],
},
),
Tool(
name="search_vendor_docs",
description="Search vendor/library documentation",
inputSchema={
"type": "object",
"properties": {
"query": {"type": "string"},
"vendor": {"type": "string", "description": "e.g. stripe, aws, vercel"},
},
"required": ["query", "vendor"],
},
),
]Tool handlers
VENDOR_DOMAINS = {
"stripe": "docs.stripe.com",
"aws": "docs.aws.amazon.com",
"vercel": "vercel.com/docs",
"supabase": "supabase.com/docs",
"prisma": "prisma.io/docs",
}
@app.call_tool()
async def call_tool(name: str, arguments: dict):
if name == "search_docs":
# Search across all team doc domains
site_filter = " OR ".join(f"site:{d}" for d in DOC_DOMAINS)
query = f"{arguments['query']} ({site_filter})"
resp = requests.post(API_URL, headers=HEADERS,
json={"query": query, "num_results": 5}, timeout=10)
results = resp.json().get("results", [])
formatted = [f"- {r['title']}\n {r['url']}\n {r.get('snippet', '')}"
for r in results]
return [TextContent(type="text",
text=f"Found {len(results)} docs:\n\n" + "\n\n".join(formatted))]
elif name == "search_vendor_docs":
vendor = arguments["vendor"].lower()
domain = VENDOR_DOMAINS.get(vendor)
if not domain:
return [TextContent(type="text",
text=f"Unknown vendor: {vendor}. Known: {', '.join(VENDOR_DOMAINS)}")]
query = f"site:{domain} {arguments['query']}"
resp = requests.post(API_URL, headers=HEADERS,
json={"query": query, "num_results": 5}, timeout=10)
results = resp.json().get("results", [])
formatted = [f"- {r['title']}\n {r['url']}\n {r.get('snippet', '')}"
for r in results]
return [TextContent(type="text", text="\n\n".join(formatted))]Claude Code configuration
{
"mcpServers": {
"team-docs": {
"command": "python",
"args": ["docs_search_mcp.py"],
"env": {
"SCAVIO_API_KEY": "your-api-key"
}
}
}
}Usage patterns
Once configured, developers can ask their coding assistant to reference team docs naturally:
- "Search our docs for the authentication middleware setup"
- "Find the Stripe webhook handler documentation"
- "Look up how we handle rate limiting in the API gateway docs"
When vector search is better
Web search works for publicly accessible documentation sites. It does not work for internal docs behind authentication (private Notion workspaces, internal Confluence, private GitHub wikis). For those, embed your docs into a vector store (Pinecone, Qdrant, Chroma) and query by semantic similarity. A hybrid approach works well: web search for vendor docs, vector search for internal docs, both exposed as MCP tools from one server.
Cost for a dev team
A team of 8 developers, each searching docs 5 times per day: 40 searches/day, 880/mo. At $0.005/credit: $4.40/mo. The 500 free credits cover a smaller team entirely.