Rust Documentation Retriever
STDIOMCP server that fetches and returns documentation for Rust crates.
MCP server that fetches and returns documentation for Rust crates.
This is a Model Context Protocol (MCP) server that fetches and returns documentation for Rust crates providing essential context for LLM's when working with Rust code.
# Clone the repository git https://github.com/0xKoda/mcp-rust-docs.git cd mcp-rust-docs # Install dependencies npm install
# Start the server directly npm start
Add the following to your Claude Desktop configuration file (claude_desktop_config.json
):
{ "mcpServers": { "rust-docs": { "command": "node", "args": ["/absolute/path/to/index.js"] } } }
Replace /absolute/path/to/index.js
with the absolute path to the index.js file in this repository.
Once the server is running and configured with your AI assistant, you can ask questions like:
The AI will use the lookup_crate_docs
tool to fetch and display the relevant documentation.
You can test this server using the MCP Inspector:
npx @modelcontextprotocol/inspector
Then select the "Connect to a local server" option and follow the prompts.
This server implements a single MCP tool called lookup_crate_docs
that:
This server uses the MCP SDK with carefully structured import paths. If you're modifying the code, be aware that:
@modelcontextprotocol/sdk/server/mcp.js
)Contributions are welcome! Please feel free to submit a Pull Request.
MIT