Debug Incident MCP Server
An MCP (Model Context Protocol) server for uploading debug incidents to Debug Memory via Cursor.
Installation
1. Install the MCP Server
Clone or download this repository:
git clone https://github.com/yourusername/debug-mcp.git
cd debug-mcp
2. Install Dependencies
Using uv (recommended):
uv sync
This creates a virtual environment at .venv and installs all dependencies.
Or install from PyPI using uv:
uv pip install debug-mcp
3. Get Your API Key
- Go to your Debug Memory dashboard
- Navigate to Settings → API Keys
- Create a new API key
- Copy the key (starts with
dm_)
4. Configure Cursor
See Cursor Setup Guide for detailed instructions.
Quick config - create or edit .cursor/mcp.json in your project:
{
"mcpServers": {
"debug-incident": {
"command": "uvx",
"args": ["debug-mcp"],
"env": {
"WORKSPACE_API_KEY": "dm_your_api_key_here"
}
}
}
}
⚠️ Replace:
dm_your_api_key_herewith your API key from Debug Memory
5. Restart Cursor
Close and reopen Cursor for the MCP server to load.
Usage
Once configured, the MCP server exposes these tools (see docs/tools.md for the full workflow and next_action behavior):
1) ranked_solutions
- Search similar incidents and return env-aware ranked solutions
- Inputs:
query_text(required),env(required),limit(optional, default 5) - Output: lookup_id, ranked solutions, recommended solution, next_action
2) add_incident
- Create a new incident + solution + outcome (blocks duplicates if a similar incident already exists)
- Inputs:
title,summary,error_signature,tags,steps,env,worked,notes(optional)
3) add_solution
- Add a new fix (or env-specific variant) for an existing incident
- Inputs:
incident_id(required),steps(required),env(required),env_bucket(optional) - Next action: Record an outcome for this solution
4) record_outcome
- Record whether a solution worked or failed
- Inputs:
solution_id(required),worked(required),env(required),env_bucket(optional),notes(optional)
Examples
Upload an incident:
Upload an incident: "TypeError in auth module"
Upload with details:
Upload an incident with title "API timeout in production"
with summary "Payment API timing out after 30s"
and tags ["api", "performance", "production"]
Search for similar incidents:
Search for incidents about "null pointer exception"
Find similar incidents to "cannot read property of undefined"
Workflow example:
1. "Search for incidents about TypeError in map function"
2. (Review results, if no solution found)
3. "Upload incident: TypeError when calling map on undefined array,
fixed by adding null check, root cause was API returning null"
How It Works
- The MCP client calls tools like
ranked_solutions,add_solution,record_outcome,add_incident - MCP server calls Debug Memory edge function endpoints
- Edge function authenticates your API key and creates the incident
- MCP server generates embeddings using
all-MiniLM-L6-v2model - Embeddings are uploaded for title, summary, and error_signature fields
- Incident is stored in your workspace with semantic search enabled
Architecture
┌─────────┐ ┌─────────────┐ ┌──────────────┐
│ Cursor │ ◄─MCP─► │ MCP Server │ ◄─HTTP─► │ Edge Function│
│ AI │ stdio │ (Python) │ POST │ (Supabase) │
└─────────┘ └─────────────┘ └──────────────┘
│ │
│ ▼
Configured with ┌──────────────┐
WORKSPACE_API_KEY │ Database │
└──────────────┘
Features
- 🚀 Easy Integration: One-command setup with
uv - 🔒 Secure: API keys stay in config, never exposed to LLM
- 🧠 Semantic Search: Auto-generates embeddings for intelligent search
- 🔍 Find Solutions: Search past incidents to find fixes for similar problems
- 📝 Rich Incident Data: Capture title, summary, error signatures, fixes, and more
- 🏷️ Tagging: Categorize incidents with custom tags
Security
- ✅ API key stored in Cursor config (not in code)
- ✅ API key never exposed to LLM or conversation logs
- ✅ Edge function validates API key server-side
- ✅ No direct database access from MCP server
- ✅ Embeddings generated locally before upload
Technical Details
- Embedding Model:
all-MiniLM-L6-v2(384 dimensions) - Transport: stdio (local execution)
- Dependencies: Managed with
uv - Python: 3.10+
Files
| File | Description |
|---|---|
mcp_server.py |
Main MCP server implementation |
requirements.txt |
Python dependencies |
cursor-setup.md |
Detailed Cursor configuration guide |
env.example |
Environment variable template (optional) |
README.md |
This file |
Metadata
Release files for debug-mcp 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| debug_mcp-0.1.7.tar.gz | 154.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| debug_mcp-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 167.3 kB
Release files / debug_mcp-0.1.7.tar.gz
| Download URL | debug_mcp-0.1.7.tar.gz |
|---|---|
| Size | 154.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e4bfbaae6f813fa29fc521b61a538f58a6d34411a6353065bd2f6dc4df4243d
|
|
BLAKE2b-256 checksum How to use checksums |
c0022782a5a047912bf443f3bba05eed46329b6a2530a5c3e6623498f0bb2c47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 16, 2026.
Transparency logRelease files / debug_mcp-0.1.7-py3-none-any.whl
| Download URL | debug_mcp-0.1.7-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e5e87e507be1dac22993b652f2deaa1cb150f5cb4908635386b62b2c7a62d70
|
|
BLAKE2b-256 checksum How to use checksums |
c6b5dffcb63ccdf4ebe2ab70b792e490139af7af859c1f3632b7eb978c248291
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 16, 2026.
Transparency logSecurity for debug-mcp 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for debug_mcp-0.1.7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.