Skip to main content
Glama
TuringMind MCP Server

TuringMind MCP Server

Official
by turingmindai

TuringMind MCP Server

PyPI version Python 3.10+ License: MIT

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-mcp
pipx install turingmind-mcp

From Source

git clone https://github.com/turingmindai/turingmind-mcp.git
cd turingmind-mcp
pip install -e .

Verify Installation

turingmind-mcp --help

Quick Start

# 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 diagnose

Platform-Specific Setup

TuringMind-MCP supports multiple platforms. Choose your platform:

Manual Setup (Claude Desktop Example)

  1. Configure Claude Desktop

Add to your Claude Desktop config file:

Platform

Path

macOS

~/Library/Application Support/Claude/claude_desktop_config.json

Windows

%APPDATA%\Claude\claude_desktop_config.json

Linux

~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "turingmind": {
      "command": "turingmind-mcp"
    }
  }
}
  1. Restart Claude Desktop

  2. Login to TuringMind

In Claude, say: "Log me into TuringMind"

Claude will guide you through the device code flow.

Available Tools

Authentication

Tool

Description

turingmind_initiate_login

Start device code auth flow (no API key needed)

turingmind_poll_login

Complete login and save API key

turingmind_validate_auth

Check API key and account status

Code Review

Tool

Description

turingmind_upload_review

Upload review results to cloud

turingmind_get_context

Get memory context for a repository

turingmind_submit_feedback

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 browser

  • user_code — Code to enter when prompted

  • device_code — Use with turingmind_poll_login


turingmind_poll_login

Poll for authentication completion.

Parameters:

Name

Type

Required

Description

device_code

string

✅

Device code from turingmind_initiate_login

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

repo

string

✅

Repository (owner/repo)

branch

string

Git branch name

commit

string

Git commit SHA

review_type

"quick" | "deep"

Review type (default: quick)

issues

array

List of issues found

raw_content

string

Full review as markdown

summary

object

{critical, high, medium, low} counts

files_reviewed

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

repo

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

issue_id

string

✅

Issue ID (e.g., iss_abc123)

action

string

✅

One of: fixed, dismissed, false_positive

repo

string

✅

Repository (owner/repo)

file

string

File path where issue was found

line

integer

Line number of the issue

pattern

string

For false_positive: pattern to skip in future

reason

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/config

Review 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: 3

False 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

TURINGMIND_API_URL

API server URL

https://api.turingmind.ai

TURINGMIND_API_KEY

API key

Read from ~/.turingmind/config

TURINGMIND_DEBUG

Enable debug logging

0

Config File

API credentials are stored in ~/.turingmind/config:

export TURINGMIND_API_KEY=tmk_your_key_here
export TURINGMIND_API_URL=https://api.turingmind.ai

Claude 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.server

Test with MCP Inspector

npx @modelcontextprotocol/inspector turingmind-mcp

Run Tests

pytest

Lint & 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"

  1. Check that TURINGMIND_API_URL is correct

  2. Verify network connectivity

  3. For local development, ensure backend is running

Claude doesn't see the tools

  1. Verify turingmind-mcp is in your PATH: which turingmind-mcp

  2. Check Claude Desktop config is valid JSON

  3. Restart Claude Desktop completely (Cmd+Q / close from tray)

License

MIT — see LICENSE for details.

Documentation

Getting Started

User Documentation

Developer Documentation

See Documentation Index for complete documentation structure.

Available Tools

34 tools
turingmind_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

    A3.5/5.0

    Scored across 34 tools

    Disambiguation4/5

    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.

    Naming Consistency5/5

    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.

    Tool Count2/5

    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.

    Completeness4/5

    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

    ActivityNo data
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Wraps Claude Code as tools for MCP clients, enabling autonomous coding tasks via a 4-tool lifecycle with session management, async polling, and permission controls.
      4
      79 npm
      21
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables 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.
      11
      1
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      Connects Claude to GitHub repositories for querying repos, reviewing PRs, managing issues, searching code, and automating workflows.
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Connects Claude to the GitHub REST API, enabling repository listing, issue management, file content retrieval, and code search through natural language tool calls.
      6
      -