Get the FREE Ultimate OpenClaw Setup Guide →

deepsource

Model Context Protocol (MCP) server for DeepSource

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. 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"
      }
    }
  }
}
  1. 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

Sponsor this space

Reach thousands of developers