Python Code Validator MCP server
{
"mcpServers": {
"statemind-python-code-validator": {
"type": "http",
"url": "https://api.statemind.ai/mcp"
}
}
}{
"mcpServers": {
"statemind-python-code-validator": {
"type": "http",
"url": "https://api.statemind.ai/mcp"
}
}
}{
"mcpServers": {
"statemind-python-code-validator": {
"type": "http",
"url": "https://api.statemind.ai/mcp"
}
}
}{
"servers": {
"statemind-python-code-validator": {
"type": "http",
"url": "https://api.statemind.ai/mcp"
}
}
}{
"mcpServers": {
"statemind-python-code-validator": {
"type": "http",
"url": "https://api.statemind.ai/mcp"
}
}
}file .mcp.json (in your project root)file claude_desktop_config.jsonfile ~/.cursor/mcp.jsonfile .vscode/mcp.jsonfile ~/.codeium/windsurf/mcp_config.jsonversion 1.22.0
What it does
A hosted MCP server that performs static analysis, security scanning, and sandboxed execution of Python code. It exposes three tools—validate, repair, and execute—useful for developers and AI coding agents who want to verify that generated Python code is both safe and functionally correct against stated assertions.
- Run lint, type checks, and a security scan on a generated Python function before including it in a codebase.
- Provide assert or doctest examples as intent and let the service repair a buggy function until all examples pass in a sandboxed container.
- Integrate validation into CI to annotate pull request diffs with errors and block merges on syntax errors or unsafe patterns.
Tools this server exposes
| Tool | Does |
|---|---|
| validate_python | Runs static checks—syntax, lint, type inference, security policy, bandit, and credential scan—on submitted Python code and returns a scored verdict. |
| repair_python | Attempts to fix Python code so that all provided assert or doctest examples pass, returning the corrected code only when every example is satisfied. |
| execute_python | Runs Python code and its provided examples inside a network-isolated, read-only container sandbox and reports whether each example produces the expected result. |
Before you enable it
An MCP server runs with whatever access you give it. Start with a development account rather than production, and check which tools the server exposes before you let an agent call them unattended.