python_local MCP Server
@Alec2435
关于 python_local MCP Server
MCP Server to run python code locally
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"python_mcp": {
"command": "uv",
"args": [
"sync"
]
}
}
}工具
1Executes Python code in a persistent session
概览
What is python_local MCP Server?
The python_local MCP Server provides an interactive Python REPL (Read-Eval-Print Loop) environment as an MCP server. It is designed for use with AI assistants like Claude, allowing them to execute Python code and retrieve session history through the Model Context Protocol.
How to use python_local MCP Server?
Install the server via uvx or configure it locally using uv in your Claude Desktop configuration file (e.g., claude_desktop_config.json). Use the python_repl tool with the required code and session_id arguments to execute Python code in a persistent session.
Key features of python_local MCP Server
- Provides an interactive Python REPL via MCP
- Exposes
repl://resource for session history - Executes Python code with the
python_repltool - Maintains separate state per session
- Supports both expressions and statements
- Captures stdout and stderr output
Use cases of python_local MCP Server
- Execute Python code interactively from an AI assistant
- Maintain separate state for multiple coding sessions
- View the history of executed code and output via resources
- Debug or test small Python snippets within a conversation
FAQ from python_local MCP Server
What does python_local MCP Server do?
It provides an interactive Python REPL environment accessible through the MCP protocol, enabling AI assistants to run Python code and retrieve session history.
What tools does it provide?
The server provides one tool, python_repl, which takes code (Python code to execute) and session_id (to identify the session) as required arguments.
How is session history accessed?
Session history is available via the custom repl:// URI scheme, which returns the history as text/plain, showing input code and corresponding output for each execution.
How are sessions managed?
Each session is identified by a session_id and maintains separate state, allowing multiple independent REPL sessions to run concurrently.
How can I debug the server?
You can launch the MCP Inspector via npx @modelcontextprotocol/inspector uv --directory /path/to/python_local run python-local and access the debugging URL in your browser.
其他 分类下的更多 MCP 服务器
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.
Codelf
unbugA search tool helps dev to solve the naming things problem.
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.

EverArt
modelcontextprotocolModel Context Protocol Servers
评论