diff --git a/Dockerfile b/Dockerfile index 6d338d5..2dfb16a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,4 +44,4 @@ EXPOSE 8000 ENV FASTMCP_HOST=0.0.0.0 ENTRYPOINT ["semgrep-mcp"] -CMD ["-t", "streamable-http"] \ No newline at end of file +CMD ["-t", "streamable-http"] diff --git a/README.md b/README.md index 5c5f16e..818d75a 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ [![Docker](https://img.shields.io/badge/docker-ghcr.io%2Fsemgrep%2Fmcp-0098FF?style=flat-square&logo=docker&logoColor=white)](https://ghcr.io/semgrep/mcp) [![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-uv-24bfa5?style=flat-square&logo=githubcopilot&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=semgrep&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22semgrep-mcp%22%5D%7D&quality=insiders) [![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-docker-24bfa5?style=flat-square&logo=githubcopilot&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=semgrep&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%20%22-i%22%2C%20%22--rm%22%2C%20%22ghcr.io%2Fsemgrep%2Fmcp%22%2C%20%22-t%22%2C%20%22stdio%22%5D%7D&quality=insiders) +[![smithery badge](https://smithery.ai/badge/@semgrep/mcp)](https://smithery.ai/server/@semgrep/mcp) A Model Context Protocol (MCP) server for using [Semgrep](https://semgrep.dev) to scan code for security vulnerabilities. Secure your [vibe coding](https://semgrep.dev/blog/2025/giving-appsec-a-seat-at-the-vibe-coding-table/)! 😅 @@ -88,6 +89,16 @@ A Model Context Protocol (MCP) server for using [Semgrep](https://semgrep.dev) t ## Getting started +### Installing via Smithery + +To install Semgrep MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@semgrep/mcp): + +```bash +npx -y @smithery/cli install @semgrep/mcp --client claude +``` + +### Standard Installation + Run the [Python package](https://pypi.org/p/semgrep-mcp) as a CLI command using [`uv`](https://docs.astral.sh/uv/guides/tools/): ```bash diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..144f5a9 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,17 @@ +# Smithery configuration file: https://smithery.ai/docs/build/project-config + +startCommand: + type: stdio + commandFunction: + # A JS function that produces the CLI command based on the given config to start the MCP on stdio. + |- + (config) => ({ command: 'semgrep-mcp', args: ['-t', 'stdio'], env: config.semgrepAppToken ? { SEMGREP_APP_TOKEN: config.semgrepAppToken } : undefined }) + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + properties: + semgrepAppToken: + type: string + description: Optional Semgrep AppSec Platform API token to enable cloud platform + tools. + exampleConfig: {}