MCP server for uploading debug incidents to Debug Memory
Project description
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 using pip:
pip install .
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": "uv",
"args": ["run", "debug-mcp"],
"cwd": "C:/Users/RAS/simon_code/debug-mcp",
"env": {
"WORKSPACE_API_KEY": "dm_your_api_key_here"
}
}
}
}
⚠️ Replace:
cwdwith your actual installation pathdm_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 |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file debug_mcp-0.1.3.tar.gz.
File metadata
- Download URL: debug_mcp-0.1.3.tar.gz
- Upload date:
- Size: 151.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f34c27e53ec93fcc728d337bbcfa7152b04cacd7a15f0d970a46f2dfb349dc1
|
|
| MD5 |
69ae6f342bab0b49d81e1bc8ff62b691
|
|
| BLAKE2b-256 |
a9823fdf162a972d82e549506230feda66340f4e4e41a8abe72cf339d74675e7
|
Provenance
The following attestation bundles were made for debug_mcp-0.1.3.tar.gz:
Publisher:
publish.yml on s355park/debug-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
debug_mcp-0.1.3.tar.gz -
Subject digest:
7f34c27e53ec93fcc728d337bbcfa7152b04cacd7a15f0d970a46f2dfb349dc1 - Sigstore transparency entry: 829417717
- Sigstore integration time:
-
Permalink:
s355park/debug-mcp@75ae0a0493f6f4a385485e33fea38b33d49d2a9f -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/s355park
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@75ae0a0493f6f4a385485e33fea38b33d49d2a9f -
Trigger Event:
push
-
Statement type:
File details
Details for the file debug_mcp-0.1.3-py3-none-any.whl.
File metadata
- Download URL: debug_mcp-0.1.3-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e767abf8a7ca70e164b1ddf5ce8e92e1a1b1a5f31398dc20ffba1bf747326074
|
|
| MD5 |
3fa1aa59820daf3812bf2ce48ce075c7
|
|
| BLAKE2b-256 |
129ddd9674c76c67f41e72b449274eabb035ff27717bf02542efbd1d7d69e176
|
Provenance
The following attestation bundles were made for debug_mcp-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on s355park/debug-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
debug_mcp-0.1.3-py3-none-any.whl -
Subject digest:
e767abf8a7ca70e164b1ddf5ce8e92e1a1b1a5f31398dc20ffba1bf747326074 - Sigstore transparency entry: 829417721
- Sigstore integration time:
-
Permalink:
s355park/debug-mcp@75ae0a0493f6f4a385485e33fea38b33d49d2a9f -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/s355park
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@75ae0a0493f6f4a385485e33fea38b33d49d2a9f -
Trigger Event:
push
-
Statement type: