How to Use the DeepSource MCP in LlamaIndex
Index your DeepSource code metrics and vulnerability scans into LlamaIndex to query your codebase health with natural language.
Works with every AI agent you already use
…and any MCP-compatible client
Connect DeepSource MCP to LlamaIndex
Create your Vinkius account to connect DeepSource to LlamaIndex and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Feed DeepSource metrics directly into LlamaIndex RAG
The `get_repository_metrics` tool pulls live code quality indicators into your LlamaIndex vector store. Your index ingests metrics like maintainability index and line coverage, converting raw telemetry into searchable document nodes. When your agent queries this MCP Server, the engine retrieves these live metrics alongside your documentation. This ensures your agent's answers reflect the actual state of your codebase rather than outdated assumptions.
Search dependency vulnerabilities using this MCP Server
The `list_vulnerabilities` tool fetches active supply chain security risks for indexing by LlamaIndex. The tool retrieves CVE IDs, severity scores, and affected package versions, which the framework indexes as structured metadata. Your agent queries this index to find which services run vulnerable packages without making repeated API calls. If a risk is flagged, the agent uses `get_vulnerability` to pull deep-dive details and update the index with remediation steps.
Build a queryable history of analysis runs
The `list_analysis_runs` tool provides a continuous log of analyzer executions to your LlamaIndex pipeline. Each run's status, analyzer type, and branch name are indexed as chronological events. This allows you to run semantic searches over your build history to trace when specific analyzer failures started. Your agent can correlate these run failures with issues pulled from `list_issues` to find the exact commit that introduced a bug.
Set up DeepSource MCP in LlamaIndex
Prerequisites
- Python 3.10+ installed
-
llama-index-tools-mcppackage - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
pip install llama-index-tools-mcp llama-index-llms-openai. The MCP tools package providesBasicMCPClientandMcpToolSpec. - 2
Connect with BasicMCPClient
Point
BasicMCPClientto your Vinkius endpoint URL. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. Supports SSE and Streamable HTTP transports. - 3
Convert to LlamaIndex tools
Call
mcp_tool_spec.to_tool_list_async()to convert all DeepSource MCP tools into nativeFunctionToolobjects that any LlamaIndex agent can use. - 4
Run with any LLM
Create a
FunctionAgentwith the tools and your preferred LLM. SwapOpenAIforAnthropic,Gemini, or any LlamaIndex-supported provider.
from llama_index.tools.mcp import BasicMCPClient, McpToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
# Connect to the MCP
mcp_client = BasicMCPClient(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
)
mcp_tool_spec = McpToolSpec(client=mcp_client)
# Convert MCP tools to LlamaIndex tools
tools = await mcp_tool_spec.to_tool_list_async()
# Create and run the agent
agent = FunctionAgent(
tools=tools,
llm=OpenAI(model="gpt-4o"),
system_prompt="You have access to DeepSource tools.",
)
response = await agent.run("List recent DeepSource data") Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by DeepSource. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about DeepSource MCP in LlamaIndex
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the DeepSource MCP today
We host it, we monitor it, we maintain it. You just paste one token.