DeepSource MCP Server for LlamaIndex 14 tools — connect in under 2 minutes
LlamaIndex specializes in data-aware AI agents that connect LLMs to structured and unstructured sources. Add DeepSource as an MCP tool provider through Vinkius and your agents can query, analyze, and act on live data alongside your existing indexes.
ASK AI ABOUT THIS MCP SERVER
Vinkius supports streamable HTTP and SSE.
import asyncio
from llama_index.tools.mcp import BasicMCPClient, McpToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
async def main():
# Your Vinkius token. get it at cloud.vinkius.com
mcp_client = BasicMCPClient("https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp")
mcp_tool_spec = McpToolSpec(client=mcp_client)
tools = await mcp_tool_spec.to_tool_list_async()
agent = FunctionAgent(
tools=tools,
llm=OpenAI(model="gpt-4o"),
system_prompt=(
"You are an assistant with access to DeepSource. "
"You have 14 tools available."
),
)
response = await agent.run(
"What tools are available in DeepSource?"
)
print(response)
asyncio.run(main())
* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure
About DeepSource MCP Server
Connect your DeepSource account to any AI agent and take full control of code quality analysis, vulnerability detection, and metrics monitoring through natural conversation.
LlamaIndex agents combine DeepSource tool responses with indexed documents for comprehensive, grounded answers. Connect 14 tools through Vinkius and query live data alongside vector stores and SQL databases in a single turn. ideal for hybrid search, data enrichment, and analytical workflows.
What you can do
- Code Issues — List and inspect code quality issues (code smells, anti-patterns, bugs) across repositories with severity and file locations
- Analysis History — View recent analysis runs with status, branch, and analyzer information (Python, JavaScript, Go, etc.)
- Security Vulnerabilities — Identify dependency vulnerabilities (SCA) with CVE IDs, CVSS scores, reachability, and fixability status
- Code Metrics — Query maintainability index, cyclomatic complexity, lines of code, and test coverage percentages
- Report Cards — Get overall repository health grades (A-F) with score breakdowns and trend analysis
- SCA Targets — List all dependency manifest files being scanned for supply chain security
- Repository Management — Activate/deactivate repos, update default branches, and regenerate DSN tokens
The DeepSource MCP Server exposes 14 tools through the Vinkius. Connect it to LlamaIndex in under two minutes — no API keys to rotate, no infrastructure to provision, no vendor lock-in. Your configuration, your data, your control.
How to Connect DeepSource to LlamaIndex via MCP
Follow these steps to integrate the DeepSource MCP Server with LlamaIndex.
Install dependencies
Run pip install llama-index-tools-mcp llama-index-llms-openai
Replace the token
Replace [YOUR_TOKEN_HERE] with your Vinkius token
Run the agent
Save to agent.py and run: python agent.py
Explore tools
The agent discovers 14 tools from DeepSource
Why Use LlamaIndex with the DeepSource MCP Server
LlamaIndex provides unique advantages when paired with DeepSource through the Model Context Protocol.
Data-first architecture: LlamaIndex agents combine DeepSource tool responses with indexed documents for comprehensive, grounded answers
Query pipeline framework lets you chain DeepSource tool calls with transformations, filters, and re-rankers in a typed pipeline
Multi-source reasoning: agents can query DeepSource, a vector store, and a SQL database in a single turn and synthesize results
Observability integrations show exactly what DeepSource tools were called, what data was returned, and how it influenced the final answer
DeepSource + LlamaIndex Use Cases
Practical scenarios where LlamaIndex combined with the DeepSource MCP Server delivers measurable value.
Hybrid search: combine DeepSource real-time data with embedded document indexes for answers that are both current and comprehensive
Data enrichment: query DeepSource to augment indexed data with live information before generating user-facing responses
Knowledge base agents: build agents that maintain and update knowledge bases by periodically querying DeepSource for fresh data
Analytical workflows: chain DeepSource queries with LlamaIndex's data connectors to build multi-source analytical reports
DeepSource MCP Tools for LlamaIndex (14)
These 14 tools become available when you connect DeepSource to LlamaIndex via MCP:
activate_repository
Once activated, DeepSource will start analyzing the code on each push/PR. You must provide the repository ID (obtained from get_repository). Use this to enable code quality monitoring for a repository that was previously inactive. Activate a repository for code analysis in DeepSource
deactivate_repository
No new analyses will run until the repository is reactivated. You must provide the repository ID (obtained from get_repository). Use this to pause analysis for archived repositories or when you want to stop billing for a specific repository. Deactivate a repository to stop code analysis in DeepSource
get_report_card
This provides a quick health check of the repository's overall code quality status. You must provide the repository name, login, and VCS provider. Use this to get a high-level view of code quality trends and identify areas needing improvement. Get the overall report card (grade) for a repository
get_repository
You must provide the repository name, login (user or org name), and VCS provider (e.g., GITHUB, GITLAB, BITBUCKET). Use this to inspect repository configuration before querying issues, analyses, or metrics. Get details of a specific repository in DeepSource
get_repository_metrics
You must provide the repository name, login, and VCS provider. Optionally filter by specific metric shortcodes (e.g., "LCV" for line coverage, "MI" for maintainability index, "CC" for cyclomatic complexity). If no shortcodes specified, returns all available metrics with their values and thresholds. Get code quality metrics for a repository
get_test_coverage
Shows the coverage percentage value and any configured thresholds. You must provide the repository name, login, and VCS provider. Use this to monitor code quality and ensure adequate test coverage across your codebase. Get test coverage metrics for a repository
get_viewer
Use this to verify your API token is working and to get your user details from DeepSource. Get the authenticated user profile from DeepSource
get_vulnerability
You must provide the repository name, login, VCS provider, and the vulnerability occurrence ID (obtained from list_vulnerabilities). Use this to deep-dive into a specific vulnerability before deciding on remediation steps. Get details of a specific dependency vulnerability by its ID
list_analysis_runs
You must provide the repository name, login, and VCS provider. Optionally filter by branch name and limit the number of results (default: 20). Each run shows which analyzer was used (e.g., PYTHON, JAVASCRIPT, GO) and whether the analysis succeeded or failed. List recent code analysis runs for a repository
list_issues
You must provide the repository name, login, and VCS provider. Optionally filter by analyzer short code (e.g., "PYTHON", "JS-A1") and limit results (default: 50). Each issue includes up to 3 sample occurrences with file path and line number. Use this to identify code smells, anti-patterns, and potential bugs across your codebase. List code quality issues in a repository
list_sca_targets
Each target includes ecosystem (e.g., npm, pip, gem), package manager, manifest file path, and activation status. You must provide the repository name, login, and VCS provider. Use this to understand which dependency files are being scanned for vulnerabilities. List all SCA (Supply Chain Analysis) targets in a repository
list_vulnerabilities
Each vulnerability includes severity, CVE ID, CVSS score, description, affected package name and version, reachability status, and fixability. You must provide the repository name, login, and VCS provider. Optionally limit the number of results (default: 20). Use this to identify security risks in your dependencies and prioritize remediation. List dependency vulnerabilities in a repository (SCA)
regenerate_dsn
The DSN is used to authenticate DeepSource analysis runs. You must provide the repository ID (obtained from get_repository). This action invalidates the old DSN and returns the new one. Use this if you suspect the DSN has been compromised or needs rotation. Regenerate the DSN (Data Source Name) for a repository
update_default_branch
This affects which branch is analyzed by default. You must provide the repository ID (from get_repository) and the new branch name (e.g., "main", "develop", "master"). Use this when your team changes the default branch name (e.g., migrating from "master" to "main"). Update the default branch for a repository in DeepSource
Example Prompts for DeepSource in LlamaIndex
Ready-to-use prompts you can give your LlamaIndex agent to start working with DeepSource immediately.
"Show me the overall code quality report card and current issues for the 'api-service' repository in the 'acme-corp' GitHub organization."
"Check for any critical or high severity dependency vulnerabilities in the 'web-frontend' repo and tell me which packages are affected."
"What's the test coverage for our 'backend-api' repository and show me the most recent analysis runs?"
Troubleshooting DeepSource MCP Server with LlamaIndex
Common issues when connecting DeepSource to LlamaIndex through the Vinkius, and how to resolve them.
BasicMCPClient not found
pip install llama-index-tools-mcpDeepSource + LlamaIndex FAQ
Common questions about integrating DeepSource MCP Server with LlamaIndex.
How does LlamaIndex connect to MCP servers?
Can I combine MCP tools with vector stores?
Does LlamaIndex support async MCP calls?
Connect DeepSource with your favorite client
Step-by-step setup guides for every MCP-compatible client and framework:
Anthropic's native desktop app for Claude with built-in MCP support.
AI-first code editor with integrated LLM-powered coding assistance.
GitHub Copilot in VS Code with Agent mode and MCP support.
Purpose-built IDE for agentic AI coding workflows.
Autonomous AI coding agent that runs inside VS Code.
Anthropic's agentic CLI for terminal-first development.
Python SDK for building production-grade OpenAI agent workflows.
Google's framework for building production AI agents.
Type-safe agent development for Python with first-class MCP support.
TypeScript toolkit for building AI-powered web applications.
TypeScript-native agent framework for modern web stacks.
Python framework for orchestrating collaborative AI agent crews.
Leading Python framework for composable LLM applications.
Data-aware AI agent framework for structured and unstructured sources.
Microsoft's framework for multi-agent collaborative conversations.
Connect DeepSource to LlamaIndex
Get your token, paste the configuration, and start using 14 tools in under 2 minutes. No API key management needed.
