TuringMind MCP Server

TuringMind MCP Server

Enables Claude to authenticate with TuringMind cloud, upload code review results, fetch repository context and memory, and submit feedback on identified issues through type-safe tools.

Category
访问服务器

README

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

Installation

From PyPI

pip install turingmind-mcp

With pipx (recommended for CLI tools)

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

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"
    }
  }
}

2. Restart Claude Desktop

3. 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.

Links

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选