Recursor MCP (Model Context Protocol) Server - Connect AI assistants (Claude Desktop, Cursor) to your Recursor project's memory
Project description
Recursor MCP Server
Connect your AI coding assistant (Claude Desktop, Cursor, etc.) to your Recursor project's memory and learnings.
What is This?
The Recursor MCP (Model Context Protocol) server allows AI assistants to:
- Search your memory: Query past corrections and coding patterns
- Learn from you: Save new corrections when you fix the AI's output
- Access project context: Pull information specific to your project
Installation
pip install recursor-mcp-server
Or from Test PyPI:
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ recursor-mcp-server
Quick Start
1. Get Your Configuration
- Log into your Recursor Dashboard
- Select your project
- Find the "MCP Server Configuration" section
- Click "Copy Config"
2. Configure Your AI Tool
Claude Desktop
-
Open your config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
Paste the configuration from your dashboard
-
Restart Claude Desktop
Cursor
- Open Settings (Cmd/Ctrl + ,)
- Search for "MCP"
- Add the configuration to your MCP servers list
- Restart Cursor
3. Set Environment Variables
export RECURSOR_API_KEY="your-api-key"
export RECURSOR_API_URL="https://api.recursor.dev/api/v1"
4. Run the Server
Stdio Mode (for Claude Desktop/Cursor):
recursor-mcp
Or:
python -m recursor_mcp_server
HTTP Bridge Mode (for Docker, n8n, etc.):
recursor-mcp --http
Or:
MCP_MODE=http python -m recursor_mcp_server
Available Tools (40+)
Once connected, your AI assistant has access to all Recursor features:
Corrections
search_memory(query, limit=5)- Search for corrections and patternsadd_correction(original_code, fixed_code, explanation)- Record a correctionlist_corrections(page, page_size)- List corrections with paginationget_correction_stats()- Get correction statisticsget_correction(correction_id)- Get specific correction
Code Intelligence
detect_intent(user_request, current_file)- Detect user intentcorrect_code(code, language)- Get AI-suggested code correctionsget_coding_patterns()- Get learned coding patternsget_analytics(user_id, period)- Get analytics dashboardget_time_saved(user_id, period)- Get time saved metricsget_quality_metrics(user_id, period)- Get quality metricsget_trust_score(user_id, model_name)- Get trust score
Projects
create_project(name, organization_id, description)- Create a projectlist_projects(organization_id)- List projectsget_project(project_id)- Get project detailsupdate_project(project_id, name, description)- Update projectdelete_project(project_id)- Delete projectget_mcp_config(project_id)- Get MCP configurationget_mcp_stats(project_id)- Get MCP statistics
Organizations
create_organization(name, description)- Create organizationlist_organizations()- List organizationsget_organization(org_id)- Get organization detailsupdate_organization(org_id, name, description)- Update organization
Authentication
register(email, password, username, full_name)- Register new userlogin(email, password)- Login and get access tokenget_profile()- Get user profileupdate_profile(full_name, username)- Update profilechange_password(current_password, new_password)- Change password
Memory
query_rotatable_memory(domain, pattern_type, limit)- Query learned patternsget_memory_stats()- Get memory statisticsget_conversation_summaries(limit)- Get conversation summariesget_architectural_changes(limit)- Get architectural changesrecord_pattern_usage(pattern_id, successful)- Record pattern usage
Billing
get_usage()- Get current usage statisticsget_usage_history(days)- Get usage historylist_billing_plans()- List billing plansget_subscription()- Get subscription information
Notifications
list_notifications()- List notificationsmark_notification_read(notification_id)- Mark notification as read
Settings
get_settings()- Get user settingsget_guidelines()- Get coding guidelines
Activity
list_activity_logs(page, page_size)- List activity logs
Gateway
gateway_chat(messages, provider, model)- LLM gateway chat with automatic corrections
Safety
check_safety(code_snippet)- Validate code safety
Examples:
You: "Search my memory for authentication patterns"
AI: *Calls search_memory("authentication")*
AI: "Based on your past corrections, you prefer JWT with httpOnly cookies..."
You: "Actually, use TypeScript interfaces, not types"
AI: *Calls add_correction("type User = {...}", "interface User {...}", "User prefers interfaces")*
AI: "Got it! I'll use interfaces from now on."
You: "What's my current usage?"
AI: *Calls get_usage()*
AI: "You've used 1,234 API calls this month (62% of limit)..."
HTTP Bridge API
When running in HTTP mode, the server exposes REST endpoints:
GET /- Health checkPOST /search- Search correctionsPOST /corrections- Add correction
See HTTP Bridge Documentation for details.
Configuration
Environment variables:
RECURSOR_API_KEY(required) - Your Recursor API keyRECURSOR_API_URL(optional) - API endpoint (default:https://recursor.dev/v1)RECURSOR_PROJECT_ID(optional) - Project ID for analyticsMCP_MODE(optional) -httpfor HTTP bridge, or omit for stdioMCP_HTTP_PORT(optional) - HTTP bridge port (default:8001)MCP_HTTP_HOST(optional) - HTTP bridge host (default:0.0.0.0)CORS_ORIGINS(optional) - Comma-separated list of allowed CORS origins
Troubleshooting
"Module not found" errors
Make sure you installed the package:
pip install recursor-mcp-server
"Cannot connect to API" errors
- Verify your
RECURSOR_API_KEYis set correctly - Check that
RECURSOR_API_URLpoints to the correct endpoint - Ensure you have internet connectivity
"Tools not appearing" in AI assistant
- Restart your AI tool (Claude Desktop/Cursor) after adding the config
- Check the AI tool's logs for MCP errors
- Verify the MCP server is running:
recursor-mcp
Development
# Clone repository
git clone https://github.com/recursor-dev/recursor-middleware.git
cd recursor-middleware/mcp-server
# Install in development mode
pip install -e .
# Run tests
pytest
License
MIT License - see LICENSE file for details.
Support
- Documentation: https://docs.recursor.dev/mcp
- Dashboard: https://recursor.ai/dashboard
- Issues: https://github.com/recursor-dev/recursor-middleware/issues
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 recursor_mcp_server-1.4.0.tar.gz.
File metadata
- Download URL: recursor_mcp_server-1.4.0.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ce7a78486f7a15ee45b5013c44f0d9427496447ff830f8526b9b3582952d295
|
|
| MD5 |
258b38be61046e322697f7813c0d7533
|
|
| BLAKE2b-256 |
c1224c52c1d18240bef7ddefff9cccab9767962bfcfc8acd66f388874bd34125
|
File details
Details for the file recursor_mcp_server-1.4.0-py3-none-any.whl.
File metadata
- Download URL: recursor_mcp_server-1.4.0-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
740b95595a002053d5141fd42b29887c764d8608b3fac53a2bcd3c84cd7f0919
|
|
| MD5 |
9a73199286cd7305a8205ac223334aed
|
|
| BLAKE2b-256 |
55c17242c601b827d96a7dfcc487300fc31d5cdfb135e497a120c61dc1c20e0e
|