Python Exec Server
FreeNot checkedEnables safe execution of Python code snippets within a sandboxed environment, restricting dangerous builtins and modules to prevent malicious operations.
About
Enables safe execution of Python code snippets within a sandboxed environment, restricting dangerous builtins and modules to prevent malicious operations.
README
中文文档
功能描述
这是一个安全的Python代码执行工具,通过MCP服务器提供安全的执行环境。用户可以通过该工具执行Python代码片段,并获取执行结果。该工具禁用了危险的内置函数和模块,以防止恶意代码执行。
支持的标准库
- math: 数学计算
- statistics: 统计计算
- decimal: 高精度小数
- fractions: 分数运算
- functools: 函数工具
- random: 随机数生成
- string: 字符串处理
- time: 时间相关
- datetime: 日期时间
- json: JSON处理
- re: 正则表达式
禁用功能
以下内置函数被禁用:
eval,exec,open,input,globals,localsbreakpoint,compile,delattr,setattrexit,quit,help,memoryview,vars,dir
使用示例
调用该工具的MCP函数名为python_exec,参数为字符串类型的Python代码。
# 计算1+1
print(1+1)
返回结果:
输出:
2
如果定义了变量:
a = 10
b = 20
c = a + b
c
返回结果:
输出:
30
定义的变量/函数:
a = 10
b = 20
c = 30
注意事项
- 代码必须是字符串类型
- 代码不能为空
- 该工具不能执行文件操作、网络请求等危险操作
- 如果代码执行出错,将返回错误信息
Installing Python Exec Server
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/611711Dark/mcp_python_exec_serverFAQ
Is Python Exec Server MCP free?
Yes, Python Exec Server MCP is free — one-click install via Unyly at no cost.
Does Python Exec Server need an API key?
No, Python Exec Server runs without API keys or environment variables.
Is Python Exec Server hosted or self-hosted?
A hosted option is available: Unyly runs the server in the cloud, no local setup required.
How do I install Python Exec Server in Claude Desktop, Claude Code or Cursor?
Open Python Exec Server on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Python Exec Server with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
