Skip to content

cyberelf/mcp_rustdoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust API Documentation MCP

This is a Model Context Protocol (MCP) implementation that allows querying Rust API documentation from docs.rs. Built with the rmcp crate.

Features

  • 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

Usage

Prerequisites

  • Rust and Cargo installed
  • An MCP client

Running the Server

# 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

CLI Options

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

Connecting to the Server

Configuration for MCP Clients (e.g., Cursor)

To connect an MCP client like Cursor to this server, you can use the following configuration.

Stdio Server 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"
  ]
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages