MCP Development AI - Complete Setup & Verification
Step-by-step guide to set up and verify Tier 1 Development AI MCP server
MCP Development AI - Complete Setup & Verification
This guide helps you set up and verify the Tier 1: Development AI MCP server that enables Claude in Cursor to learn from your coding sessions.
Current Status
✅ Built: MCP server compiled successfully (dist/server.js exists)
❌ Not Configured: Not added to Cursor's MCP configuration yet
❌ Not Running: No active connection yet
Quick Setup (5 minutes)
Step 1: Update Cursor MCP Configuration
File: .cursor/mcp.json
Current state:
{
"mcpServers": {}
}
Update to:
{
"mcpServers": {
"mcp-development-ai": {
"command": "node",
"args": [
"/Users/fguijarro/developer/repos/editor2/MCP/mcp-development-ai/dist/server.js"
],
"env": {
"MONGODB_CONNECTION_STRING": "your-mongodb-connection-string"
}
}
}
}
Important: Use your actual MongoDB connection string from .env
Step 2: Restart Cursor
- Close all Cursor windows
- Restart Cursor
- Open this workspace again
Step 3: Verify MCP Connection
Open a new chat with Claude and ask:
Can you call the get_stats MCP tool to show me Development AI stats?
Expected response:
{
"totalDecisions": 0,
"successRate": 0,
"conventionCount": 0,
"patternCount": 0,
"recentDecisions": 0
}
If Claude can respond with this, the MCP server is working! 🎉
What This MCP Server Does
🎯 Purpose: Tier 1 Learning
Makes Claude remember what works in THIS codebase specifically.
🔧 Available Tools
| Tool | Purpose | When to Use |
|---|---|---|
log_decision |
Record significant coding decisions | After making architectural/implementation choices |
find_similar |
Search past decisions | Before making new decisions |
get_conventions |
Get codebase rules | When starting new features |
add_convention |
Store learned patterns | When discovering new patterns in code |
report_outcome |
Track decision success/failure | When code works or fails |
get_stats |
View learning progress | To check how much has been learned |
📂 Storage Locations
Local (Primary):
- Location:
.cursor/ai-memory/development-memory.json - Created on first use
- Works offline
- Fast access
MongoDB (Optional Backup):
- Database:
ai-mcp-dev - Collections:
decisions,conventions,patterns - Syncs automatically if connection string provided
- Enables cross-machine learning
Testing the MCP Server
Test 1: Check Stats (Basic Connection)
Ask Claude:
Use the get_stats MCP tool
Expected: Should return JSON with current stats (all zeros initially)
Test 2: Log a Decision
Ask Claude:
Use the log_decision MCP tool to record this test decision:
- Type: "implementation"
- Question: "Test MCP logging"
- Options: ["Option A", "Option B"]
- Chosen: "Option B"
- Reasoning: "Testing the MCP server setup"
- Confidence: 0.9
Expected:
{
"id": "dev_1733887200000_abc123",
"success": true
}
Test 3: Retrieve the Decision
Ask Claude:
Use find_similar MCP tool to search for "test MCP"
Expected: Should return the decision you just logged
Test 4: Verify Storage File
# Check local storage
cat .cursor/ai-memory/development-memory.json
# Should show:
# {
# "decisions": [{ ... your test decision ... }],
# "conventions": [],
# "patterns": [],
# "metadata": { ... }
# }
How Claude Should Use This
✅ Good Usage Examples
Before Making Decisions:
Claude: Let me check if we've solved this before
[Calls find_similar tool]
Claude: Found a similar decision from last week...
After Making Decisions:
Claude: I'm choosing approach B because...
[Calls log_decision to record reasoning]
When Discovering Patterns:
Claude: I notice this codebase uses inject() instead of constructors
[Calls add_convention to store pattern]
❌ What NOT to Log
Don't log trivial decisions:
- ❌ "Fixed typo"
- ❌ "Added import statement"
- ❌ "Renamed variable from x to y"
DO log significant decisions:
- ✅ "Chose RxJS over Promises for async flow because..."
- ✅ "Used Signal instead of BehaviorSubject because..."
- ✅ "Implemented caching at service layer vs component level because..."
Troubleshooting
"MCP tool not available"
Problem: Cursor can't find the MCP server
Fix:
- Check
.cursor/mcp.jsonhas the correct path - Verify
dist/server.jsexists:ls tools/mcp-development-ai/dist/ - Restart Cursor completely (all windows)
"Error executing MCP tool"
Problem: Server crashes when calling tools
Fix:
- Check Cursor's Developer Tools (Help → Toggle Developer Tools)
- Look for MCP server errors in console
- Verify node version:
node --version(should be >= 18)
"MongoDB connection failed"
Problem: Optional MongoDB sync not working
Fix:
// This is OK! MCP works without MongoDB
// Just uses local storage instead
// If you want MongoDB sync:
1. Verify MONGODB_CONNECTION_STRING in .cursor/mcp.json
2. Test connection: node -e "const {MongoClient} = require('mongodb'); new MongoClient('your-uri').connect().then(() => console.log('OK'))"
"No decisions showing up"
Problem: Storage file empty
Check:
# File should exist after first log_decision call
ls -la .cursor/ai-memory/
# Read contents
cat .cursor/ai-memory/development-memory.json
Fix: Ask Claude to use log_decision tool manually (see Test 2)
Verification Checklist
- MCP server built (
dist/server.jsexists) - Configuration added to
.cursor/mcp.json - Cursor restarted
-
get_statstool works (returns JSON) -
log_decisiontool works (returns decision ID) -
find_similartool works (finds logged decision) - Storage file created (
.cursor/ai-memory/development-memory.json) - File contains logged decision
Integration with Full AI Learning System
┌─────────────────────────────────────────┐
│ Tier 1: Development AI (THIS MCP) │ ← You are here
│ - Learns from Claude in Cursor │
│ - Stores locally in .cursor/ai-memory/ │
│ - Optional MongoDB sync │
├─────────────────────────────────────────┤
│ Tier 2: Platform AI │
│ - Powers GoGrab Space AI features │
│ - Uses backend API + vector search │
│ - Stores in ai-agents database │
├─────────────────────────────────────────┤
│ Tier 3: Tenant AI │
│ - Per-user personalization │
│ - Tenant-isolated learning │
└─────────────────────────────────────────┘
Tier 1 is independent - works even if backend is off!
Next Steps After Setup
1. Seed Initial Conventions
Ask Claude to analyze CLAUDE.md and AGENTS.md:
Read CLAUDE.md and use the add_convention MCP tool to store the main Angular/TypeScript rules we follow.
2. Start Logging Naturally
Claude should automatically use these tools during normal work:
find_similarbefore making decisionslog_decisionafter significant choicesadd_conventionwhen discovering patterns
3. Review Learning Progress
Periodically ask:
Use get_stats to show how much Development AI has learned
4. Enable MongoDB Sync (Optional)
If you want cross-machine learning:
- Add
MONGODB_CONNECTION_STRINGto mcp.json env - Decisions sync to
ai-mcp-devdatabase automatically - Share learnings across your dev machines
Command Reference
# Build MCP server
cd MCP/mcp-development-ai
npm install
npm run build
# Watch mode (for development)
npm run dev
# Check build output
ls -la dist/
# View stored decisions
cat .cursor/ai-memory/development-memory.json | jq .
# Test MongoDB connection
node -e "const {MongoClient} = require('mongodb'); new MongoClient('your-connection-string').connect().then(() => console.log('✅ Connected')).catch(e => console.error('❌ Failed:', e.message))"
Created: December 10, 2025
Session: 13
Status: MCP Server Built ✅ | Configuration Needed ⚠️
Next Action: Update .cursor/mcp.json with the configuration above and restart Cursor!