diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..05929fa --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config +# Use Bun official image for building and running +FROM oven/bun:latest AS builder + +WORKDIR /app + +# Copy project files +COPY package.json bun.lock biome.json tsconfig.json ./ +COPY src ./src + +# Install dependencies and build +RUN bun install +RUN bun build ./src/index.ts --outdir ./build --target node + +# Runtime image (reuse builder as it is already optimized) +FROM oven/bun:latest +WORKDIR /app +COPY --from=builder /app/build ./build +COPY --from=builder /app/node_modules ./node_modules + +# Expose entrypoint +ENTRYPOINT ["node", "./build/index.js"] diff --git a/README.md b/README.md index b914c84..9dc0f2e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Rust Docs MCP Server +[![smithery badge](https://smithery.ai/badge/@laptou/rust-docs-mcp-server)](https://smithery.ai/server/@laptou/rust-docs-mcp-server) An MCP (Model Context Protocol) server that provides access to Rust documentation from docs.rs. This server allows AI tools to search for documentation, type information, feature flags, version numbers, and symbol definitions/source code. @@ -14,6 +15,15 @@ An MCP (Model Context Protocol) server that provides access to Rust documentatio ## Installation +### Installing via Smithery + +To install Rust Docs Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@laptou/rust-docs-mcp-server): + +```bash +npx -y @smithery/cli install @laptou/rust-docs-mcp-server --client claude +``` + +### Manual Installation This project uses Bun for development, but the built server can run with Node.js. ```bash diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..5d1d857 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,14 @@ +# Smithery configuration file: https://smithery.ai/docs/build/project-config + +startCommand: + type: stdio + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + properties: {} + description: No configuration needed + commandFunction: + # A JS function that produces the CLI command based on the given config to start the MCP on stdio. + |- + (config) => ({ command: 'node', args: ['./build/index.js'], env: {} }) + exampleConfig: {}