MCP Server
Connect AI coding assistants to DeepSource using the Model Context Protocol (MCP).
DeepSource's MCP server lets AI coding assistants interact with your DeepSource data directly. Query code issues, track metrics, review pull requests, monitor vulnerabilities, and manage configurations from any AI agent.
See the tools reference for the full list of capabilities.
Server URL
https://mcp.deepsource.com/mcpTo add the DeepSource MCP to your client, you can use the add-mcp utility:
npx add-mcp https://mcp.deepsource.com/mcpor add the server manually in your client's MCP configuration:
{
"mcpServers": {
"DeepSource": {
"url": "https://mcp.deepsource.com/mcp"
}
}Authentication
The MCP server supports two authentication methods:
- OAuth (default) — most MCP clients handle this for you. On first connect, the client opens your browser to authorize with your DeepSource account. The setups below all use OAuth.
- Personal access token — pass a DeepSource PAT as a bearer token. Use this in CI and other environments where the browser-based OAuth flow isn't available.
Using a personal access token
Any DeepSource personal access token works as an MCP credential — no separate setup needed. Pass it in the Authorization header as a bearer token:
Authorization: Bearer dsp_your_token_hereTo use a PAT with any client below, add a headers block to its configuration. In CI, store the token as a secret and reference it through an environment variable rather than hardcoding it:
{
"mcpServers": {
"DeepSource": {
"url": "https://mcp.deepsource.com/mcp",
"headers": {
"Authorization": "Bearer ${DEEPSOURCE_MCP_TOKEN}"
}
}
}
}Verify the connection and your token from a terminal or CI step:
curl -X POST https://mcp.deepsource.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer $DEEPSOURCE_MCP_TOKEN" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1.0.0"}}}'A PAT carries the same access you have in DeepSource. Treat it like a password: store it as a secret and rotate it periodically.
Setup
Claude Code
Run this command in your terminal:
claude mcp add --transport http deepsource https://mcp.deepsource.com/mcpClaude Code opens your browser to complete OAuth authorization on first use.
Use -s user to make the server available across all your projects, or -s project to scope it to the current project.
Cursor
Add this to .cursor/mcp.json in your project root (or ~/.cursor/mcp.json for global access):
{
"mcpServers": {
"DeepSource": {
"url": "https://mcp.deepsource.com/mcp"
}
}
}Cursor opens your browser to complete OAuth authorization on first use.
Claude Desktop / Claude.ai
- Go to Settings > Connectors and click Add custom connector
- Enter the server URL:
https://mcp.deepsource.com/mcp - Click Add and complete the OAuth authorization in your browser
VS Code / GitHub Copilot
Open the Command Palette (Cmd+Shift+P) and select MCP: Add Server. Enter the server URL:
https://mcp.deepsource.com/mcpVS Code opens your browser to complete OAuth authorization.
Codex
Run this command:
codex mcp add deepsource --url https://mcp.deepsource.com/mcpYou'll be prompted to authenticate with DeepSource using OAuth.
Windsurf
Open Cascade (Cmd+L), select Configure MCP, and add the server URL:
https://mcp.deepsource.com/mcpWindsurf opens your browser to complete OAuth authorization on first use.
Warp
In Warp, go to Settings > MCP Servers > Add, then enter the server URL:
https://mcp.deepsource.com/mcpWarp opens your browser to complete OAuth authorization on first use.
Amp
Run this command:
amp mcp add deepsource --url https://mcp.deepsource.com/mcpOr add this to ~/.config/amp/settings.json:
{
"amp.mcpServers": {
"DeepSource": {
"url": "https://mcp.deepsource.com/mcp"
}
}
}Factory Droid
Launch Droid and open the MCP menu with /mcp. Add the server URL:
https://mcp.deepsource.com/mcpComplete the OAuth authorization in your browser when prompted.
OpenCode
Add this to opencode.jsonc in your project root:
{
"mcp": {
"DeepSource": {
"type": "remote",
"url": "https://mcp.deepsource.com/mcp",
"oauth": {}
}
}
}Then authenticate:
opencode mcp auth DeepSourceOther clients
Any MCP client that supports OAuth and Streamable HTTP transport can connect to the DeepSource MCP server. Point your client to the server URL:
https://mcp.deepsource.com/mcpNext steps
- Tools reference — Full list of available tools and their parameters