deepsource
Model Context Protocol (MCP) server for DeepSource
claude mcp add --transport stdio sapientpants-deepsource-mcp-server npx -y deepsource-mcp-server@latest \ --env LOG_FILE="/tmp/deepsource-mcp.log" \ --env LOG_LEVEL="INFO" \ --env DEEPSOURCE_API_KEY="your-deepsource-api-key" \ --env RETRY_MAX_ATTEMPTS="3" \ --env RETRY_MAX_DELAY_MS="30000" \ --env RETRY_BASE_DELAY_MS="1000" \ --env RETRY_BUDGET_PER_MINUTE="10" \ --env CIRCUIT_BREAKER_THRESHOLD="5" \ --env CIRCUIT_BREAKER_TIMEOUT_MS="30000"
How to use
The DeepSource MCP Server exposes a set of MCP tools that connect Claude-like AI assistants to DeepSource’s code quality analytics. It enables the assistant to list your available DeepSource projects, fetch project issues with filtering, and query quality metrics, thresholds, and security/compliance data. The server handles authentication via your API key and offers built-in retry logic, circuit breakers, and configurable logging to help maintain reliability in noisy network environments. You can configure the MCP server in Claude Desktop (or your MCP-compatible client) under the mcpServers section to enable direct interactions with your DeepSource data.
How to install
Prerequisites:
- Node.js installed on your machine (to run npx-based setup)
- A DeepSource API key with the appropriate permissions
Step-by-step installation:
- Prepare your configuration in Claude Desktop or your MCP runtime by adding the following mcpServers entry:
{
"mcpServers": {
"deepsource": {
"command": "npx",
"args": ["-y", "deepsource-mcp-server@latest"],
"env": {
"DEEPSOURCE_API_KEY": "your-deepsource-api-key",
"LOG_FILE": "/tmp/deepsource-mcp.log",
"LOG_LEVEL": "INFO",
"RETRY_MAX_ATTEMPTS": "3",
"RETRY_BASE_DELAY_MS": "1000",
"RETRY_MAX_DELAY_MS": "30000",
"RETRY_BUDGET_PER_MINUTE": "10",
"CIRCUIT_BREAKER_THRESHOLD": "5",
"CIRCUIT_BREAKER_TIMEOUT_MS": "30000"
}
}
}
}
- Replace the placeholder DEEPSOURCE_API_KEY with your actual API key. 3) Save the config and restart Claude Desktop or your MCP runtime to apply changes. 4) Test the connection by asking the assistant for available projects, e.g., "What DeepSource projects do I have access to?"
Additional notes
Tips and common issues:
- Ensure your DEEPSOURCE_API_KEY has the required scopes for project listing and issue retrieval.
- If you see connection errors, check the LOG_FILE path and LOG_LEVEL for diagnostics; increase LOG_LEVEL to DEBUG for more details.
- The retry and circuit breaker settings help tolerate transient network issues; tune them if you experience frequent timeouts.
- When running in containers, ensure the environment variable DEEPSOURCE_API_KEY is securely provided and that the container can access the network to reach DeepSource APIs.
- The available tools (projects, project_issues) support filtering by path, analyzer, and tags. Use these to narrow results in complex codebases.
Related MCP Servers
XcodeBuildMCP
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Matryoshka
MCP server for token-efficient large document analysis via the use of REPL state
sonarqube
Model Context Protocol (MCP) server for SonarQube
pluggedin-app
The Crossroads for AI Data Exchanges. A unified, self-hostable web interface for discovering, configuring, and managing Model Context Protocol (MCP) servers—bringing together AI tools, workspaces, prompts, and logs from multiple MCP sources (Claude, Cursor, etc.) under one roof.
Agentic -Skill
Agentic-MCP, Progressive MCP client with three-layer lazy loading. Validates AgentSkills.io pattern for efficient token usage. Use MCP without pre-install & wasting full-loading
mcp -python-template
This template provides a streamlined foundation for building Model Context Protocol (MCP) servers in Python. It's designed to make AI-assisted development of MCP tools easier and more efficient.