crates-mcp

pato/crates-mcp

3.3

If you are the rightful owner of crates-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Crates MCP Server is a tool designed to facilitate querying Rust crates from crates.io and docs.rs, providing functionalities such as searching for crates, retrieving crate information, versions, dependencies, and documentation.

Tools
  1. search_crates

    Find crates by name

  2. get_crate_info

    Get details about a crate

  3. get_crate_versions

    List versions

  4. get_crate_dependencies

    Show dependencies

  5. get_crate_documentation

    Get docs from docs.rs

Crates MCP Server

MCP server for querying Rust crates from crates.io and docs.rs. Search crates, get info, versions, dependencies, and documentation.

Quick Start

# Build and run
cargo build --release
cargo run --release

Tools

  • search_crates - Find crates by name
  • get_crate_info - Get details about a crate
  • get_crate_versions - List versions
  • get_crate_dependencies - Show dependencies
  • get_crate_documentation - Get docs from docs.rs

Claude Code Integration

Add to your Claude Code MCP configuration:

Option 1: Run directly

{
  "mcpServers": {
    "crates": {
      "command": "cargo",
      "args": ["run", "--release"],
      "cwd": "/path/to/crates-mcp"
    }
  }
}

Option 2: Use binary

# Build first
cargo build --release

# Add to config
{
  "mcpServers": {
    "crates": {
      "command": "/path/to/crates-mcp/target/release/crates-mcp"
    }
  }
}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/claude/claude_desktop_config.json

Restart Claude Code after adding the config.

Usage Examples

# Search for HTTP clients
> Search for "http client" crates

# Get info about reqwest
> What is the reqwest crate?

# Check tokio dependencies  
> Show me tokio's dependencies

# View serde documentation
> Show me the docs for serde

Development

# Test
cargo test

# Format  
cargo fmt

# Lint
cargo clippy

License

MIT