drio
Open app

Python MCP Server

Source

Catalog onlyCatalog onlySTDIO

Overview

Python MCP Server is a Model Context Protocol (MCP) server designed for executing Python code and managing Python environments, enabling LLMs like Claude to run Python code, manage files, and work with Python packages.

To use the Python MCP Server, clone the repository, install the necessary dependencies, and configure it with Claude Desktop or Cline. Once set up, you can ask Claude to execute Python code or manage Python files.

  • Code Execution: Run Python code snippets or execute Python files. - File Management: List, read, and write Python files. - Python Environment: Check Python version and environment details. - Configurable Execution: Set timeouts, working directories, and command-line arguments.
  1. Executing Python scripts for data analysis.
  2. Automating Python code execution in various applications.
  3. Managing Python files and environments for development purposes.

Add to your AI client

Use these steps to connect Python MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "python-mcp-server-timtech4u": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-python-mcp-server-timtech4u"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "python-mcp-server-timtech4u": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-python-mcp-server-timtech4u"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "python-mcp-server-timtech4u": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-python-mcp-server-timtech4u"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "python-mcp-server-timtech4u": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-python-mcp-server-timtech4u"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "python-mcp-server-timtech4u": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-python-mcp-server-timtech4u"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "python-mcp-server-timtech4u": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-python-mcp-server-timtech4u"
      ]
    }
  }
}

FAQ

What are the prerequisites for using the Python MCP Server?

You need Node.js, Python, and either Claude Desktop or Cline installed.

How do I configure the server?

Follow the configuration steps provided in the documentation for Claude Desktop or Cline.

What should I do if I encounter permission errors?

Ensure that the user running the MCP server has the necessary permissions to access the files.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3076,"uuid":"ada36d7a-5763-4fb6-a944-29f5153adc0a","name":"python-mcp-server","title":"Python MCP Server","description":"","avatar_url":"https://avatars.githubusercontent.com/u/11256481?v=4","created_at":"2025-03-17T02:55:46.003Z","updated_at":"2025-03-17T02:58:52.971Z","status":"created","author_name":"Timtech4u","author_avatar_url":"https://avatars.githubusercontent.com/u/11256481?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/Timtech4u/python-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":"https://camo.githubusercontent.com/a8751aa9ca42300c580a20839bef212a6aad4d5b676dddf7a7c0d342b7d071ff/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4769744875622d5265706f7369746f72792d626c75652e737667","type":null,"metadata":"{\"star\":\"0\",\"license\":\"\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-16 14:30:15\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]