From 8c9a418fb75d8d2b50affdf09fd9f5105e4a144c Mon Sep 17 00:00:00 2001 From: "smithery-ai[bot]" <194235850+smithery-ai[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 14:40:23 +0000 Subject: [PATCH 1/2] Add Smithery configuration --- smithery.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 smithery.yaml diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 00000000..cf17d7f0 --- /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 + } + }; + } From 91b1e0d71fe10c68d1157d821f1b7669a9c3f161 Mon Sep 17 00:00:00 2001 From: "smithery-ai[bot]" <194235850+smithery-ai[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 14:40:24 +0000 Subject: [PATCH 2/2] Update README --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index d6f722ef..8477e7af 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.