Cover image
Try Now
2025-01-07

镜像://github.com/crazyrabbitltc/mcp-expert-server

3 years

Works with Finder

0

Github Watches

1

Github Forks

0

Github Stars

MCP Expert Server

A Model Context Protocol server that provides intelligent query generation and documentation assistance using Claude AI. The server analyzes your API documentation and provides two main tools:

  • create-query: Generates queries based on natural language requests
  • documentation: Provides relevant documentation information based on questions

Prerequisites

  • Node.js >= 18
  • An Anthropic API key for Claude

Installation

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Create a .env file with your Anthropic API key:
ANTHROPIC_API_KEY=your_api_key_here

Setup

Before running the server, you need to:

  1. Build the project and run the setup script:
npm run build
npm run setup

This will:

  • Create the required directories (docs/ and prompts/)
  • Create default prompt files
  • Generate an initial service description
  1. Add your API documentation files to the docs/ directory (supports .txt, .md, and .json files)

  2. Optionally customize the prompts in the prompts/ directory:

    • system-prompt.txt: Main system prompt for Claude
    • tool-metadata.txt: Additional context for tool descriptions
    • query-metadata.txt: Additional context for query generation
    • service-description.txt: Auto-generated service description

Usage

Standalone Server

Start the server:

npm start

The server exposes two tools via the Model Context Protocol:

  • create-query: Generate a query based on natural language request

    {
      "name": "create-query",
      "arguments": {
        "request": "Find all users who signed up in the last week"
      }
    }
    
  • documentation: Get information from the documentation

    {
      "name": "documentation",
      "arguments": {
        "request": "How do I authenticate API requests?"
      }
    }
    

Claude Desktop Integration

  1. Add this configuration to your Claude Desktop config file:
{
  "mcpServers": {
    "expert": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/expert-server/build/index.js"],
      "env": {
        "ANTHROPIC_API_KEY": "your_api_key_here"
      }
    }
  }
}
  1. Replace /ABSOLUTE/PATH/TO/expert-server with the actual absolute path to your server installation.

  2. Restart Claude Desktop.

Directory Structure

.
├── docs/                  # Your API documentation files
├── prompts/              # System prompts and metadata
│   ├── system-prompt.txt    # Main system prompt
│   ├── tool-metadata.txt    # Tool description context
│   ├── query-metadata.txt   # Query generation context
│   └── service-description.txt  # Generated service description
├── src/                  # Source code
│   ├── index.ts            # Entry point
│   ├── server.ts           # MCP server implementation
│   └── services/           # Core services
│       └── expertService.ts  # Claude integration
└── package.json

Development

  • Build the project:
npm run build
  • The server uses TypeScript and follows a modular architecture
  • All Claude interactions are handled by the ExpertService class
  • Debug logs are written to stderr with [DEBUG] prefix

Troubleshooting

If you encounter connection issues:

  1. Ensure you've run the setup script:
npm run setup
  1. Check that all required files exist in the prompts/ directory
  2. Verify your ANTHROPIC_API_KEY is correctly set
  3. Use absolute paths in your Claude Desktop config
  4. Check the debug logs (written to stderr)

Environment Variables

  • ANTHROPIC_API_KEY: Your Anthropic API key (required)

License

MIT

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • XLwebDev.com
  • PR Professional: Guiding You to Get Media Placements and Publicity Quickly and Effectively

  • Jan Meindl
  • Builds new GPTs

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

    Reviews

    3 (1)
    Avatar
    user_JVhNtIj4
    2025-04-15

    As a dedicated user of the 서울시 교통 데이터 MCP 서버 by CaChiJ, I am immensely impressed with its performance. This server offers comprehensive traffic data for Seoul, facilitating efficient data management and analysis. The seamless integration and high-quality data make it indispensable for anyone working in urban transportation planning. Highly recommend!