mcp-doc-search
Planned integration with SingleStore as a retrieval backend for scalable documentation search.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-doc-search search docs for MCP"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Doc Search
MCP Document Search Server
Overview
This project was built as a hands-on exercise to understand the Model Context Protocol (MCP) by implementing all three core MCP primitives:
Prompts
Tools
Resources
The final outcome is a simple documentation search MCP server that exposes:
A
search_docstool for searching documentationDynamic resources representing documents stored in a local
docs/folder
The server can be tested and explored using the MCP Inspector.
Related MCP server: suitest-docs
MCP Concepts Learned
1. Prompts
Prompts are reusable instruction templates exposed by an MCP server.
Pattern:
prompts/listprompts/get
Example:
simpleA client can discover available prompts and retrieve the prompt content.
2. Tools
Tools expose executable functionality.
Pattern:
tools/listtools/call
Examples implemented during learning:
fetch
add
multiply
search_docsA tool receives arguments, performs some action, and returns structured results.
3. Resources
Resources expose data that can be read by a client.
Pattern:
resources/listresources/read
Examples:
```text
docs://mcp
docs://architecture
docs://retrievalResources represent existing data and are analogous to files or documents.
MCP Mental Model
Tool = Function
Resource = File
Prompt = TemplateExamples:
search_docs("MCP") -> Tool
docs://mcp -> Resource
code-review-template -> PromptCurrent Architecture
MCP Client
│
├── search_docs(query) [Tool]
│
└── docs://* [Resources]
│
└── read_resource()Search Flow
User Query
↓
search_docs("MCP")
↓
Returns matching resource URIs
↓
docs://mcp
↓
read_resource("docs://mcp")
↓
Returns document contentThis demonstrates the common MCP pattern:
Tool → Resource ChainProject Structure
doc-search/
│
├── README.md
├── pyproject.toml
│
└── mcp_doc_search/
│
├── __init__.py
├── __main__.py
├── server.py
│
└── docs/
├── architecture.txt
├── retrieval.txt
└── mcp.txtFeatures
Tool: search_docs
Input:
{
"query": "MCP"
}Behavior:
Searches all
.txtfiles in thedocsdirectoryPerforms a case-insensitive search
Returns matching resource URIs
Example output:
docs://mcpResources
Resources are generated dynamically from the docs directory.
Examples:
docs://mcp
docs://architecture
docs://retrievalReading a resource returns the document content.
Testing
The server can be tested using MCP Inspector.
Example configuration:
Command:
uvArguments:
run python -m mcp_doc_searchThe Inspector can then:
List tools
Call
search_docsList resources
Read resources
Key Takeaways
MCP follows a consistent discovery and execution pattern.
Tools are used for actions and discovery.
Resources are used for retrieving known content.
Prompts are reusable instruction templates.
Many knowledge and retrieval servers follow a Tool → Resource architecture.
The MCP layer remains stable even when the retrieval implementation evolves from simple file search to BM25, vector search, hybrid search, or databases.
Future Improvements
BM25 search
Vector search
Hybrid search
SingleStore integration
Result ranking and scoring
Resource metadata
Claude Desktop / Cursor integration
Retrieval-Augmented Generation (RAG)
create venv: uv venv Go to correct toml file and run: uv sync uv run python -m mcp_simple_prompt --help
uv run python -m mcp_doc_search --help
Install inspector: npx @modelcontextprotocol/inspector and runs it port:6274 (For stdio transport, Inspector itself launches the server, so need not run uv run mcp-simple-prompt in another terminal) or run python -m mcp_doc_search in the arguments
Enter the proxy token or launch the Proxy configured url and enter-> Command: uv and arguments: run mcp-simple-prompt
Available Tools
1 toolsearch_docsDocs SearcherC
Search the query text in the docs
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusing it with another. The tool's purpose is clear from its name and description.
The single tool uses a consistent verb_noun pattern, and there are no other tools to introduce inconsistency.
The server has just one tool, which is thin but appropriate for a narrowly-focused search-only service. It falls on the borderline of being too sparse.
Only search is supported, with no way to fetch or list documents. This creates a significant gap: after searching, the agent cannot retrieve the actual content of a result.
Related MCP Connectors
Political Comms documentation MCP server: search docs, query the docs filesystem. No auth.
Search and read the Druxt documentation and API reference.
Provides access to Google's public developer documentation.
Search published MkSaaS documentation. Read-only and public.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceServes RootApp documentation files with search and retrieval capabilities, enabling users to access specific docs, browse directory structure, and search across file names and content.AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables searching and retrieving pages from the Suitest documentation via full-text search without live network calls.MIT
- FlicenseAqualityCmaintenanceEnables MCP-compatible clients to search and read local markdown documentation, allowing agents to retrieve relevant doc snippets or full files by path.2-
- AlicenseNot gradedqualityCmaintenanceEnables agents to search, retrieve, and list Hermes Agent documentation locally, version-matched to the installed commit, with fallback to GitHub when no local checkout exists.MIT