TuringMind MCP Server
OfficialThe TuringMind MCP Server enables Claude to integrate with the TuringMind cloud platform for AI-powered code review workflows, authentication, and repository memory management.
Initiate Login: Start a device code authentication flow, returning a verification URL and user code to sign in via browser without needing an API key upfront.
Complete Login: Poll for authentication completion and automatically save the API key to
~/.turingmind/configupon success.Validate Authentication: Check the current API key's validity and retrieve account details such as tier (free, pro, team, enterprise), remaining quota, and user ID.
Upload Code Reviews: Submit detailed findings including issues (title, severity, category, file, line, CWE, confidence), summary counts, full markdown content, and repository/commit metadata.
Fetch Repository Context: Retrieve memory for a specific repository — recent open issues, hotspot files, known false positive patterns, and team conventions — to avoid duplicate reports before starting a review.
Submit Feedback: Mark issues as
fixed,dismissed, orfalse_positive, optionally providing patterns and reasons to improve future reviews.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TuringMind MCP Server upload my code review for the auth system in turingmind/backend"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TuringMind MCP Server
Model Context Protocol (MCP) server for TuringMind cloud integration. Provides type-safe tools for Claude to authenticate, upload code reviews, fetch repository context, and submit feedback.
Requires Python 3.10+ (MCP SDK requirement)
Why MCP?
Instead of Claude generating raw JSON and curl commands (which can fail silently due to field name mismatches or malformed data), MCP provides:
Type-safe tool definitions — Claude sees the exact schema
Validated input — Errors caught before sending
No endpoint guessing — Correct URLs hardcoded
Better error messages — Clear feedback on failures
Simplified login — Device code flow handled by the server
Related MCP server: GitHub Context MCP Server
Installation
From PyPI
pip install turingmind-mcpWith pipx (recommended for CLI tools)
pipx install turingmind-mcpFrom Source
git clone https://github.com/turingmindai/turingmind-mcp.git
cd turingmind-mcp
pip install -e .Verify Installation
turingmind-mcp --helpQuick Start
Unified Setup (Recommended)
# Install
pip install turingmind-mcp
# Setup for your platform
turingmind setup claude_desktop # Claude Desktop
turingmind setup cursor # Cursor IDE/CLI
turingmind setup claude_cli # Claude Code CLI
# Diagnose installation
turingmind diagnosePlatform-Specific Setup
TuringMind-MCP supports multiple platforms. Choose your platform:
Claude Desktop - Native MCP integration
Claude Code CLI - Command-line with MCP or Skills
Claude SDK - Programmatic Python access
Cursor IDE - Native MCP integration
Cursor CLI - Command-line integration
Manual Setup (Claude Desktop Example)
Configure Claude Desktop
Add to your Claude Desktop config file:
Platform | Path |
macOS |
|
Windows |
|
Linux |
|
{
"mcpServers": {
"turingmind": {
"command": "turingmind-mcp"
}
}
}Restart Claude Desktop
Login to TuringMind
In Claude, say: "Log me into TuringMind"
Claude will guide you through the device code flow.
Available Tools
Authentication
Tool | Description |
| Start device code auth flow (no API key needed) |
| Complete login and save API key |
| Check API key and account status |
Code Review
Tool | Description |
| Upload review results to cloud |
| Get memory context for a repository |
| Mark issues as fixed, dismissed, or false positive |
Tool Reference
turingmind_initiate_login
Start device code authentication flow. No API key required.
Parameters: None
Returns:
verification_url— URL to open in browseruser_code— Code to enter when prompteddevice_code— Use withturingmind_poll_login
turingmind_poll_login
Poll for authentication completion.
Parameters:
Name | Type | Required | Description |
| string | ✅ | Device code from |
Returns:
On success: API key (automatically saved to
~/.turingmind/config)On pending: Status message to wait and retry
On expired: Error message to restart flow
turingmind_validate_auth
Validate API key and get account info.
Parameters: None
Returns:
Tier (free, pro, team, enterprise)
Quota remaining
User ID
turingmind_upload_review
Upload code review results to TuringMind cloud.
Parameters:
Name | Type | Required | Description |
| string | ✅ | Repository (owner/repo) |
| string | Git branch name | |
| string | Git commit SHA | |
|
| Review type (default: quick) | |
| array | List of issues found | |
| string | Full review as markdown | |
| object | {critical, high, medium, low} counts | |
| array | Files that were reviewed |
Issue Schema:
{
"title": "SQL Injection vulnerability",
"severity": "critical",
"category": "security",
"file": "src/db.py",
"line": 42,
"description": "User input passed directly to query",
"cwe": "CWE-89",
"confidence": 95
}turingmind_get_context
Get memory context for a repository.
Parameters:
Name | Type | Required | Description |
| string | ✅ | Repository (owner/repo) |
Returns:
Recent open issues
Hotspot files (frequent issues)
Team conventions
Known false positive patterns
turingmind_submit_feedback
Submit feedback on a code review issue.
Parameters:
Name | Type | Required | Description |
| string | ✅ | Issue ID (e.g., |
| string | ✅ | One of: |
| string | ✅ | Repository (owner/repo) |
| string | File path where issue was found | |
| integer | Line number of the issue | |
| string | For false_positive: pattern to skip in future | |
| string | Explanation for the feedback |
Actions:
fixed— Issue was resolved (tracks time-to-fix metrics)dismissed— Issue isn't important (lowers future priority)false_positive— Not a real issue (adds pattern to memory)
Usage Examples
Login Flow
User: Log me into TuringMind
Claude: I'll start the authentication flow.
[Calls turingmind_initiate_login]
🧠 TuringMind Login Started
Step 1: Open this URL in your browser:
https://app.turingmind.ai/cli-auth?device_code=...
Step 2: Sign in with Google or GitHub
User: Done!
Claude: [Calls turingmind_poll_login with device_code]
✅ Login Successful!
API key has been saved to ~/.turingmind/configReview with Upload
User: Review my code changes and upload to TuringMind
Claude: [Calls turingmind_validate_auth]
✅ TuringMind Authentication Valid
- Tier: team
- Quota: 495/500 reviews remaining
[Reviews code...]
[Calls turingmind_upload_review]
🧠 Review Uploaded to TuringMind
- Review ID: rev_abc123
- Issues: 3False Positive Feedback
User: That SQL injection issue was a false positive, we use parameterized queries
Claude: [Calls turingmind_submit_feedback]
🚫 Feedback Submitted
Issue iss_abc123 has been marked as false positive.
Pattern saved: `db.query(sql, params)`
This pattern will be skipped in future reviews.Configuration
Environment Variables
Variable | Description | Default |
| API server URL |
|
| API key | Read from |
| Enable debug logging |
|
Config File
API credentials are stored in ~/.turingmind/config:
export TURINGMIND_API_KEY=tmk_your_key_here
export TURINGMIND_API_URL=https://api.turingmind.aiClaude Desktop with Custom API URL
{
"mcpServers": {
"turingmind": {
"command": "turingmind-mcp",
"env": {
"TURINGMIND_API_URL": "https://api.turingmind.ai"
}
}
}
}Development
Setup
git clone https://github.com/turingmindai/turingmind-mcp.git
cd turingmind-mcp
pip install -e ".[dev]"Run Locally
python -m turingmind_mcp.serverTest with MCP Inspector
npx @modelcontextprotocol/inspector turingmind-mcpRun Tests
pytestLint & Format
ruff check .
black .
mypy src/Troubleshooting
"TURINGMIND_API_KEY not configured"
Run the login flow in Claude, or set the environment variable:
export TURINGMIND_API_KEY=tmk_your_key_here"Permission Denied"
API key lacks required permission. Re-run login to create a new key with proper permissions.
"Connection Error"
Check that
TURINGMIND_API_URLis correctVerify network connectivity
For local development, ensure backend is running
Claude doesn't see the tools
Verify
turingmind-mcpis in your PATH:which turingmind-mcpCheck Claude Desktop config is valid JSON
Restart Claude Desktop completely (Cmd+Q / close from tray)
License
MIT — see LICENSE for details.
Documentation
Getting Started
Quick Start Guide - Get started in 5 minutes
Platform Guides - Platform-specific setup
User Documentation
Features - Complete feature list and user flows
Compatibility Matrix - Platform compatibility
Developer Documentation
Development Guide - Architecture and implementation
Testing Guide - Testing documentation
See Documentation Index for complete documentation structure.
Links
TuringMind — AI-powered code review
Available Tools
34 toolsturingmind_analyze_diffA
Analyze a git diff and auto-generate an EditPlan. This enables continuous SDD where plans are inferred from changes rather than requiring upfront planning. Returns an auto-generated plan with inferred intent, risk level, and suggested specs.
Inputs: diff (required), repo (required), file_path (required), context, +1 more.
turingmind_apply_editA
Apply code changes with MANDATORY reasoning capture. Use this for ALL file edits to ensure intent is documented. The reasoning becomes part of the permanent audit trail.
Inputs: edit_type (required), file_path (required), reasoning (required), repo, +6 more.
turingmind_apply_fixB
Record that a repair action was applied to a failed SpecNode. Resets the node stage so the execution loop re-runs verification. Must be called after the repair action (code patch, test expansion, spec refinement).
Inputs: node_id (required), fix_type (required), description (required).
turingmind_apply_spec_deltaA
THE KILLER FEATURE: Apply a contract change to a SpecNode and trigger automatic downstream invalidation. All dependent nodes in the DAG will have their verification and implementation state reset, placing them back in the ready_queue for automatic regeneration. Use this whenever a requirement changes — the engine guarantees correctness is restored.
Inputs: delta (required), node_id (required), reason.
turingmind_bootstrap_codebaseA
Scan an existing project directory and auto-create L2 SpecNodes for each module group. Nodes are created with blank contracts — fill in invariants and metrics progressively. Use dry_run=true first to preview what would be created without writing to the DB. Skips excluded directories (node_modules, .venv, pycache, etc.) automatically.
Inputs: repo (required), project_path (required), dry_run, exclude_dirs, +1 more.
turingmind_classify_failureA
Classify a SpecNode failure deterministically. Do NOT guess. Exactly one classification applies: spec_gap → contract is incomplete or ambiguous → escalate to Architect Mode test_gap → tests don't cover the failure scenario → escalate to Tester Mode implementation_bug → code is wrong, spec and tests are correct → escalate to Builder Mode dependency_failure → upstream node is broken, block this node
Inputs: node_id (required), failure_trace (required), classification (required), evidence.
turingmind_create_spec_nodeA
Create an atomic SpecNode in the constraint DAG. Every unit of work is represented as a SpecNode with a strict contract (inputs, outputs, invariants) and a surface_type for risk posture mapping. Architect Mode only: do NOT write code, only define constraints.
Inputs: repo (required), level (required), title (required), node_id (required), +7 more.
turingmind_delete_memoryA
Delete or deprecate a memory entry. Deprecation preserves history, deletion removes completely.
Inputs: repo (required), memory_id (required), action.
turingmind_detect_conflictsB
Detect conflicts between memory entries. Identifies contradictions, overlaps, and scope conflicts.
Inputs: repo (required), memory_id (required).
turingmind_generate_verificationA
Tester Mode: Generate the full verification suite for a SpecNode from its contract. Translates invariants → property tests, inputs/outputs → unit tests, ambiguous paths → fuzz tests, metrics → performance checks. Do NOT write application code in this mode.
Inputs: node_id (required), test_dir, verification_types.
turingmind_get_audit_trailA
Get full audit trail for a TDD cycle. Returns complete reasoning, specs, tests, and edits with traceability.
Inputs: plan_id (required).
turingmind_get_decision_queueA
Provides a prioritized Action Item queue for the IDE Agent. Call this tool to figure out what you should work on next. It returns a list of high-priority gaps in the graph (e.g. missing contracts, broken tests) sorted by blast radius severity.
Inputs: repo (required), limit.
turingmind_get_edit_reasoningA
Get or capture developer reasoning for file changes. Extracts intent from commit messages or prompts developer. Supports per-file reasoning. Helps code review understand intent and reduce false positives.
Inputs: repo (required), files (required), commit_hash, interactive, +2 more.
turingmind_get_execution_stateB
Get the global control plane state: ready_queue, blocked_queue, failed_nodes, and global confidence metrics. The UI polls this to render the Manufacturing Line and Confidence Score dial.
Inputs: repo (required).
turingmind_get_impacted_nodesA
Compute the exact blast radius of a SpecNode change: all downstream nodes in the DAG that depend on this node (directly or transitively). Use BEFORE applying a spec change to preview impact on the manufacturing line.
Inputs: node_id (required).
turingmind_get_memoryA
Get detailed information about a specific memory entry including evidence.
Inputs: repo (required), memory_id (required).
turingmind_get_project_structureB
Get comprehensive project structure summary. Returns language distribution, entity type counts, and basic architecture info.
Inputs: repo (required).
turingmind_get_ready_nodesB
Get all SpecNodes whose upstream dependencies are fully verified (ready_queue). The execution loop calls this to determine what the Builder can work on next.
Inputs: repo (required).
turingmind_get_spec_statusB
Get the full state of a SpecNode: stage, confidence, failure classification. Use to query where a node is in the Manufacturing Line pipeline.
Inputs: node_id (required), repo.
turingmind_index_codebaseA
Index codebase using AST parsing to extract code entities (functions, classes, files) and relationships. Enables relationship-aware code review and impact analysis.
Inputs: repo (required), branch, languages, force_reindex.
turingmind_ingest_runtime_signalA
Ingest a live runtime signal into the constraint graph. Automatically checks the value against contractual Metric thresholds, decays node confidence proportionally if breached, marks the node failed if confidence falls below 0.6, and fully invalidates the node on a regression. Every change is recorded as Evidence so confidence always has a receipt. Call from CI, Sentry, Datadog, or any monitoring source.
Inputs: repo (required), value (required), node_id (required), signal_type (required), +3 more.
turingmind_list_memoryB
List memory entries with filtering and pagination. Supports filtering by category, status, scope, and security tags.
Inputs: repo (required), page, limit, scope, +6 more.
turingmind_list_spec_nodesA
List SpecNodes for a repository, optionally filtered by stage, surface_type, or level. Use stage=failed to find nodes requiring repair. Use surface_type=api_endpoint to build the Risk Posture Map.
Inputs: repo (required), level, stage, surface_type.
turingmind_log_reasoningA
Log your reasoning/thinking process without making changes. Use this to document your thought process, analysis, and decisions. Creates a permanent record of AI reasoning for audit trails.
Inputs: content (required), reasoning_type (required), repo, context, +3 more.
turingmind_promote_nodeB
Promote an auto-inventoried node from 'observed' → 'proposed' → 'governed'. Proposed nodes require contracts; Governed nodes are actively checked.
Inputs: node_id (required).
turingmind_record_execution_stageA
Builder/Auditor Mode: Record a SpecNode's current execution stage and confidence. Called by the agent as it moves a node through the Manufacturing Line pipeline: spec_defined → verification_generated → implementing → auditing → verified.
Inputs: stage (required), status (required), node_id (required), confidence.
turingmind_request_approvalA
Request human approval for a SpecNode. Only use for: (1) L0/L1 spec approval before system-wide execution, (2) low-confidence nodes (< 0.6) after repair cycles, (3) high-risk surface changes (api_endpoint or security_checks failing). For everything else, the engine runs autonomously.
Inputs: reason (required), context (required), node_id (required).
turingmind_resolve_conflictA
Resolve conflicts between memory entries. Supports priority, scope-narrow, time-bound, and merge strategies.
Inputs: repo (required), strategy (required), conflict_id (required), resolution.
turingmind_run_verificationA
Auditor Mode: Execute the verification suite for a SpecNode and record results. Runs tests, static checks, security scans. Returns structured pass/fail results and automatically updates node confidence score.
Inputs: node_id (required), test_dir, python_bin, verification_types.
turingmind_save_memoryB
Create or update a memory entry. Supports learned patterns, explicit rules, and session context.
Inputs: repo (required), type (required), scope (required), content (required), +5 more.
turingmind_sync_cloudA
Bidirectional memory sync for a repo via TURINGMIND_API_URL/api/v2/memory/cloud/sync (TURINGMIND_CLOUD_SYNC=1 + TURINGMIND_API_KEY). Pulls cloud tombstones and pushes active/candidate/deprecated memories upstream.
Inputs: repo (required).
turingmind_sync_codebaseA
Syncs the codebase state with the constraint graph. Intended to be called by git webhooks/hooks. Applies a confidence penalty to nodes whose files were modified and propagates the blast radius.
Inputs: repo (required), files (required).
turingmind_update_spec_nodeA
Update the contract or metadata of an existing SpecNode. Updating a contract triggers automatic subgraph invalidation downstream. Use this when refining specs based on new information or audit results.
Inputs: node_id (required), contract, priority, complexity, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 34 tools
Most tools have clearly distinct names and descriptions, but some overlap exists among state-querying tools like get_decision_queue, get_execution_state, get_ready_nodes, and get_spec_status. Descriptions help disambiguate, but the high number of tools increases potential confusion.
All tools follow the consistent turingmind_verb_noun pattern (e.g., list_spec_nodes, apply_edit, classify_failure). Verbs like get, list, create, update, delete are used systematically, making the set predictable and easy to navigate.
With 34 tools, the set exceeds the recommended range of 15-25 for high coherence. While each tool serves a distinct purpose in the complex TuringMind ecosystem, the sheer number overwhelms typical agent memory and selection, making it hard to browse efficiently.
The tool surface covers a full lifecycle for constraint-driven development: spec creation, update, promotion, verification, failure classification, repair, and auditing. Minor gaps exist (e.g., no explicit node deletion tool, only update), but the core workflows are well-supported.
Maintenance
Related MCP Connectors
AI code governance and code review for Claude Code, Copilot and Cursor. Checks rules and security.
Query your team's drift, vulnerability, and upgrade data from any AI assistant. OAuth 2.1, 51 tools.
Unified API to query AWS, GCP, Azure and generate Terraform/CLI execution kits for AI agents.
Every employee asks your codebase from Claude, without access to it. Statistics on each developer.
Related MCP Servers
- AlicenseAqualityDmaintenanceWraps Claude Code as tools for MCP clients, enabling autonomous coding tasks via a 4-tool lifecycle with session management, async polling, and permission controls.479 npm21MIT
- AlicenseAqualityDmaintenanceEnables Claude to access and manage GitHub repositories dynamically at runtime, including private repos, with tools for browsing files, searching code, and viewing commits, pull requests, and issues.111ISC
- AlicenseNot gradedqualityDmaintenanceConnects Claude to GitHub repositories for querying repos, reviewing PRs, managing issues, searching code, and automating workflows.MIT
- FlicenseAqualityDmaintenanceConnects Claude to the GitHub REST API, enabling repository listing, issue management, file content retrieval, and code search through natural language tool calls.6-