api documentation.com
api documentation.com logo

API Documentation

Provides documentation assistance capabilities for developers looking to incorporate up-to-date docs in their workflows.

Created byApr 23, 2025

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
  1. Install dependencies:
  1. Create a `.env` file with your Anthropic API key:

Setup

Before running the server, you need to:
  1. Build the project and run the setup script:
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)
  1. 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:
The server exposes two tools via the Model Context Protocol:
  • **create-query**: Generate a query based on natural language request ```json { "name": "create-query", "arguments": { "request": "Find all users who signed up in the last week" } } ```
  • **documentation**: Get information from the documentation ```json { "name": "documentation", "arguments": { "request": "How do I authenticate API requests?" } } ```

Claude Desktop Integration

  1. Add this configuration to your Claude Desktop config file:
  1. Replace `/ABSOLUTE/PATH/TO/expert-server` with the actual absolute path to your server installation.
  1. Restart Claude Desktop.

Directory Structure

Development

  • Build the project:
  • 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:
  1. Check that all required files exist in the `prompts/` directory
  1. Verify your `ANTHROPIC_API_KEY` is correctly set
  1. Use absolute paths in your Claude Desktop config
  1. Check the debug logs (written to stderr)

Environment Variables

  • `ANTHROPIC_API_KEY`: Your Anthropic API key (required)

License

MIT