diff --git a/README.md b/README.md index d6f722e..8477e7a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Docs MCP Server: Your AI's Up-to-Date Documentation Expert +[![smithery badge](https://smithery.ai/badge/@arabold/docs-mcp-server)](https://smithery.ai/server/@arabold/docs-mcp-server) + AI coding assistants often struggle with outdated documentation, leading to incorrect suggestions or hallucinated code examples. Verifying AI responses against specific library versions can be time-consuming and inefficient. The **Docs MCP Server** solves this by acting as a personal, always-current knowledge base for your AI assistant. Its primary purpose is to **index 3rd party documentation** – the libraries you actually use in your codebase. It scrapes websites, GitHub repositories, package managers (npm, PyPI), and even local files, cataloging the docs locally. It then provides powerful search tools via the Model Context Protocol (MCP) to your coding agent. @@ -48,6 +50,7 @@ Get up and running quickly! We recommend using Docker Desktop (Docker Compose) f - [Recommended: Docker Desktop](#recommended-docker-desktop) - [Alternative: Using Docker](#alternative-using-docker) - [Alternative: Using npx](#alternative-using-npx) +- [Alternative: Using Smithery](#installing-via-smithery) ## Recommended: Docker Desktop @@ -357,6 +360,14 @@ The `npx` approach will use the default data directory on your system (typically For detailed command usage, run the CLI with the --help flag (e.g., `npx -y @arabold/docs-mcp-server --help`). +## Installing via Smithery + +To install Documentation MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@arabold/docs-mcp-server): + +```bash +npx -y @smithery/cli install @arabold/docs-mcp-server --client claude +``` + ## Configuration The following environment variables are supported to configure the embedding model behavior. Specify them in your `.env` file or pass them as `-e` flags when running the server via Docker or npx. diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..cf17d7f --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,35 @@ +# Smithery configuration file: https://smithery.ai/docs/build/project-config + +build: + dockerfile: Dockerfile + dockerBuildPath: . +startCommand: + type: stdio + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + required: + - OPENAI_API_KEY + properties: + OPENAI_API_KEY: + type: string + description: Your OpenAI API Key for accessing embedding models. + commandFunction: + # A JS function that produces the CLI command based on the given config to start the MCP on stdio. + | + (config) => { + // Ensure the config object and the key exist before accessing. + const apiKey = config?.OPENAI_API_KEY; + if (!apiKey) { + // Smithery should prevent this based on 'required', but good practice to check. + throw new Error('OPENAI_API_KEY is missing in the configuration.'); + } + return { + command: 'node', + args: ['dist/server.js'], + // Pass the API key from the config to the server's environment. + env: { + OPENAI_API_KEY: apiKey + } + }; + }