DeepSource MCP Server

by sapientpants

990 downloads Not rated yet MIT license
GitHub

About

Model Context Protocol (MCP) server for DeepSource

Details

License
MIT license

Explore

DeepSource API Integration: Connects to DeepSource via GraphQL API
MCP Protocol Support: Implements the Model Context Protocol for AI assistant integration
TypeScript/Node.js: Built with TypeScript for type safety and modern JavaScript features
Cross-Platform: Works on Linux, macOS, and Windows

  • Robust Error Handling: Comprehensive error handling for network, authentication, and parsing issues

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name DeepSource MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Node.js 20 or higher
pnpm 10.7.0 or higher

  • Docker (for container builds)


1. Edit claude_desktop_config.json:
- Open Claude Desktop
- Go to Settings -> Developer -> Edit Config
- Add the one of the configurations below to the mcpServers section

2. Restart Claude Desktop to apply the changes

projectKey

(required) - The unique identifier for the DeepSource project

offset

(optional) - Number of items to skip for pagination

first

(optional) - Number of items to return (defaults to 10)

after

(optional) - Cursor for forward pagination

before

(optional) - Cursor for backward pagination

last

(optional) - Number of items to return before the 'before' cursor (default: 10)

runIdentifier

(required) - The runUid (UUID) or commitOid (commit hash) to identify the run

The DeepSource MCP Server provides the following tools:

1. deepsource_projects: List all available DeepSource projects
Parameters:
No required parameters

2. deepsource_project_issues: Get issues from a DeepSource project
Parameters:
projectKey (required) - The unique identifier for the DeepSource project
offset (optional) - Number of items to skip for pagination
first (optional) - Number of items to return (defaults to 10)
after (optional) - Cursor for forward pagination
before (optional) - Cursor for backward pagination
last (optional) - Number of items to return before the 'before' cursor (default: 10)

3. deepsource_project_runs: List analysis runs for a DeepSource project
Parameters:
projectKey (required) - The unique identifier for the DeepSource project
offset (optional) - Number of items to skip for pagination
first (optional) - Number of items to return (defaults to 10)
after (optional) - Cursor for forward pagination
before (optional) - Cursor for backward pagination
last (optional) - Number of items to return before the 'before' cursor (default: 10)

4. deepsource_run: Get a specific analysis run by its runUid or commitOid
Parameters:
runIdentifier (required) - The runUid (UUID) or commitOid (commit hash) to identify the run

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "deepsource mcp server": {
            "deepsource": {
                "command": "docker",
                "args": [
                    "run",
                    "-i",
                    "--rm",
                    "-e",
                    "DEEPSOURCE_API_KEY",
                    "sapientpants/deepsource-mcp-server"
                ],
                "env": {
                    "DEEPSOURCE_API_KEY": "your-deepsource-api-key"
                }
            }
        }
    }
}

McpServers

{
    "deepsource": {
        "command": "docker",
        "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "DEEPSOURCE_API_KEY",
            "sapientpants/deepsource-mcp-server"
        ],
        "env": {
            "DEEPSOURCE_API_KEY": "your-deepsource-api-key"
        }
    }
}

CI
DeepSource
DeepSource
DeepSource
npm version
npm downloads
License

A Model Context Protocol (MCP) server that integrates with DeepSource to provide AI assistants with access to code quality metrics, issues, and analysis results.

Overview

The DeepSource MCP Server enables AI assistants to interact with DeepSource's code quality analysis capabilities through the Model Context Protocol. This integration allows AI assistants to:

Retrieve code metrics and analysis results
Access and filter issues
Check quality status
Analyze project quality over time

Features

DeepSource API Integration: Connects to DeepSource via GraphQL API
MCP Protocol Support: Implements the Model Context Protocol for AI assistant integration
TypeScript/Node.js: Built with TypeScript for type safety and modern JavaScript features
Cross-Platform: Works on Linux, macOS, and Windows
Robust Error Handling: Comprehensive error handling for network, authentication, and parsing issues

Usage with Claude Desktop

1. Edit claude_desktop_config.json:
- Open Claude Desktop
- Go to Settings -> Developer -> Edit Config
- Add the one of the configurations below to the mcpServers section

2. Restart Claude Desktop to apply the changes

Docker

{
  "mcpServers": {
    "deepsource": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "DEEPSOURCE_API_KEY",
        "sapientpants/deepsource-mcp-server"
      ],
      "env": {
        "DEEPSOURCE_API_KEY": "your-deepsource-api-key"
      }
    }
  }
}

NPX

{
  "mcpServers": {
    "deepsource": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "DEEPSOURCE_API_KEY": "your-deepsource-api-key"
      }
    }
  }
}

Available Tools

The DeepSource MCP Server provides the following tools:

1. deepsource_projects: List all available DeepSource projects
Parameters:
No required parameters

2. deepsource_project_issues: Get issues from a DeepSource project
Parameters:
projectKey (required) - The unique identifier for the DeepSource project
offset (optional) - Number of items to skip for pagination
first (optional) - Number of items to return (defaults to 10)
after (optional) - Cursor for forward pagination
before (optional) - Cursor for backward pagination
last (optional) - Number of items to return before the 'before' cursor (default: 10)

3. deepsource_project_runs: List analysis runs for a DeepSource project
Parameters:
projectKey (required) - The unique identifier for the DeepSource project
offset (optional) - Number of items to skip for pagination
first (optional) - Number of items to return (defaults to 10)
after (optional) - Cursor for forward pagination
before (optional) - Cursor for backward pagination
last (optional) - Number of items to return before the 'before' cursor (default: 10)

4. deepsource_run: Get a specific analysis run by its runUid or commitOid
Parameters:
runIdentifier (required) - The runUid (UUID) or commitOid (commit hash) to identify the run

Development

1. Clone the repository:

git clone https://github.com/sapientpants/deepsource-mcp-server.git
cd deepsource-mcp-server

2. Install dependencies:

pnpm install

3. Build the project:

pnpm run build

4. Configure Claude Desktop

{
"mcpServers": {
"deepsource": {
"command": "node",
"args": [
"/path/to/deepsource-mcp-server/dist/index.js"
],
"env": {
"DEEPSOURCE_API_KEY": "your-deepsource-api-key"
}
}
}
}

Prerequisites

Node.js 20 or higher
pnpm 10.7.0 or higher
Docker (for container builds)

Scripts

pnpm run build - Build the TypeScript code
pnpm run start - Start the server
pnpm run dev - Start the server in development mode
pnpm run test - Run tests
pnpm run lint - Run ESLint
pnpm run format - Format code with Prettier

License

MIT

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.