Skip to content

Deployment: Dockerfile and Smithery config #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
35 changes: 35 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -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
}
};
}