MCP server for TuringMind cloud - provides type-safe tools for authentication, code reviews, and feedback
Project description
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
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 browseruser_code— Code to enter when prompteddevice_code— Use withturingmind_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"
- Check that
TURINGMIND_API_URLis correct - Verify network connectivity
- For local development, ensure backend is running
Claude doesn't see the tools
- Verify
turingmind-mcpis in your PATH:which turingmind-mcp - Check Claude Desktop config is valid JSON
- Restart Claude Desktop completely (Cmd+Q / close from tray)
License
MIT — see LICENSE for details.
Links
- TuringMind — AI-powered code review
- Documentation
- GitHub
- Issue Tracker
Project details
Release history Release notifications | RSS feed
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 turingmind_mcp-0.2.0.tar.gz.
File metadata
- Download URL: turingmind_mcp-0.2.0.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbbae566bc1ff91cccbdb5949560da65e98ea2bc7c1beaefd6f16f26d1a01a1f
|
|
| MD5 |
c279a0c57a97da1c77d96e09875f8c57
|
|
| BLAKE2b-256 |
e85db74117dac2925547e36e28198f96b5cbb4fd656e7817d05302cd42a56a91
|
Provenance
The following attestation bundles were made for turingmind_mcp-0.2.0.tar.gz:
Publisher:
publish.yml on turingmindai/turingmind-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
turingmind_mcp-0.2.0.tar.gz -
Subject digest:
bbbae566bc1ff91cccbdb5949560da65e98ea2bc7c1beaefd6f16f26d1a01a1f - Sigstore transparency entry: 813565809
- Sigstore integration time:
-
Permalink:
turingmindai/turingmind-mcp@3696c00b554a76f0daa43dc1842e7f1b9d04a6fd -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/turingmindai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3696c00b554a76f0daa43dc1842e7f1b9d04a6fd -
Trigger Event:
release
-
Statement type:
File details
Details for the file turingmind_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: turingmind_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64dde5c02b106b05a21c87addb3999b44132db44c92ec743547471477d44def2
|
|
| MD5 |
50510e06c76ceaeb98413f5aa73b94f0
|
|
| BLAKE2b-256 |
7c1312e58e0a5179367adeec12aa4e0a0cc6b9020cab29058e7cd007982ccc9d
|
Provenance
The following attestation bundles were made for turingmind_mcp-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on turingmindai/turingmind-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
turingmind_mcp-0.2.0-py3-none-any.whl -
Subject digest:
64dde5c02b106b05a21c87addb3999b44132db44c92ec743547471477d44def2 - Sigstore transparency entry: 813565810
- Sigstore integration time:
-
Permalink:
turingmindai/turingmind-mcp@3696c00b554a76f0daa43dc1842e7f1b9d04a6fd -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/turingmindai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3696c00b554a76f0daa43dc1842e7f1b9d04a6fd -
Trigger Event:
release
-
Statement type: