spacemeowx2
MCP Server
spacemeowx2
public

cargo doc mcp

一个用于通过 cargo doc 管理 Rust 文档的 MCP 服务器,提供本地文档检查、构建和搜索功能。

Repository Info

6
Stars
2
Forks
6
Watchers
1
Issues
TypeScript
Language
MIT License
License

About This Server

一个用于通过 cargo doc 管理 Rust 文档的 MCP 服务器,提供本地文档检查、构建和搜索功能。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

# cargo doc MCP Server

A MCP server for managing Rust documentation through cargo doc commands. This server provides tools to check, build, and search Rust documentation locally.

<a href="https://glama.ai/mcp/servers/l4augy7aft">
  <img width="380" height="200" src="https://glama.ai/mcp/servers/l4augy7aft/badge" alt="Cargo Doc Server MCP server" />
</a>

## Features

### Tools

- `get_crate_doc` - Get crate's main documentation page for understanding overall concepts and usage

  - Parameters:
    - `project_path`: Path to the Rust project (must be absolute path)
    - `crate_name`: Name of the crate to get documentation for

- `list_symbols` - List all symbols (structs, enums, traits, etc.) in a crate's documentation

  - Parameters:
    - `project_path`: Path to the Rust project (must be absolute path)
    - `crate_name`: Name of the crate to list symbols for

- `search_doc` - Search within a crate's documentation
  - Parameters:
    - `project_path`: Path to the Rust project (must be absolute path)
    - `crate_name`: Name of the crate to search in
    - `query`: Search query (keyword or symbol)
    - `limit` (optional): Maximum number of results to return (default: 10)

## Requirements

- Node.js 16 or later
- Rust and Cargo installed

## Installation

Install dependencies:

```bash
pnpm install
```

Build the server:

```bash
pnpm run build
```

For development with auto-rebuild:

```bash
pnpm run watch
```

## Usage

Add the following configuration:

```json
{
  "mcpServers": {
    "docs-rs-mcp": {
      "command": "/absolute/path/to/docs-rs-mcp/build/index.js"
    }
  }
}
```

## Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector:

```bash
pnpm run inspector
```

The Inspector will provide a URL to access debugging tools in your browser.

## Cache System

The server maintains a cache of built documentation paths to improve performance. Cache entries expire after 24 hours to ensure documentation stays up-to-date.

## License

MIT

Quick Start

1

Clone the repository

git clone https://github.com/spacemeowx2/cargo-doc-mcp
2

Install dependencies

cd cargo-doc-mcp
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerspacemeowx2
Repocargo-doc-mcp
Language
TypeScript
LicenseMIT License
Last fetched8/8/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation