A complete Model Context Protocol (MCP) server with tools defined by RUNE specifications.
| File | Description |
|---|---|
search_documents.rune |
RUNE spec for the semantic search tool |
file_operations.rune |
RUNE spec for the file reading tool |
server.py |
Complete MCP server implementing both tools |
Searches an indexed document collection using keyword matching (swap in a vector DB for production). Supports filtering by date range, tags, and author.
results = await search_documents("python async", max_results=5)
Reads file contents with size limits, encoding support, and path traversal protection.
result = await read_file("docs/readme.md", max_bytes=4096)
pip install "mcp>=1.0.0"
For production semantic search, also install:
pip install "chromadb>=0.4.0" "sentence-transformers>=2.2.0"
python server.py
npx @modelcontextprotocol/inspector python server.py
Add to your claude_desktop_config.json:
{
"mcpServers": {
"runestone-example": {
"command": "python",
"args": ["path/to/examples/integrations/mcp-example/server.py"],
"env": {
"RUNE_SANDBOX_ROOT": "/path/to/allowed/directory"
}
}
}
}
server.py following the specs exactlyTo add a new tool:
.rune spec file defining the tool contractserver.py following the specTool entry in list_tools() with a JSON Schemacall_tool()