This is a Model Context Protocol (MCP) implementation that allows querying Rust API documentation from docs.rs. Built with the rmcp
crate.
- Query documentation for a specific function in a crate with a specific version
- Returns raw HTML documentation with metadata
- Supports both SSE server and stdio server modes
- Rust and Cargo installed
- An MCP client
# Start SSE server (default) on the default address 127.0.0.1:8080
cargo run
# Start SSE server with custom address
cargo run -- --address 0.0.0.0:3000
# Start stdio server
cargo run -- --server-type stdio
# Show help
cargo run -- --help
Options:
-s, --server-type <SERVER_TYPE> Type of server to run [default: sse] [possible values: sse, stdio]
-a, --address <ADDRESS> Address for the SSE server [default: 127.0.0.1:8080]
-h, --help Print help
-V, --version Print version
To connect an MCP client like Cursor to this server, you can use the following configuration.
If you are running the server in stdio mode, use a configuration similar to this:
"rustdoc-mcp": {
"command": "rdoc-mcp",
"args": [
"--server-type",
"stdio"
]
}