open-ptc-agent
An open source implementation of code execution with MCP (Programatic Tool Calling)
claude mcp add --transport stdio chen-zexi-open-ptc-agent python -m open_ptc_agent.mcp_server \ --env OPENAI_API_KEY="OpenAI API key (if using OpenAI as LLM provider)" \ --env DAYTONA_API_KEY="Daytona sandbox API key (optional if using Daytona backend)" \ --env MCP_CONFIG_PATH="Path to main MCP configuration (config.yaml by default)" \ --env LLMS_CONFIG_PATH="Path to llms.json if customized"
How to use
Open PTC Agent is a Python-based MCP server that implements Programmatic Tool Calling (PTC), enabling an agent to generate Python code that orchestrates tools inside a sandbox and return only the final results. The server exposes a set of native MCP tools (execute_code, Bash, Read, Write, Edit, Glob, Grep) and middleware components (Subagents, BackgroundSubagent, ViewImage, Filesystem, etc.) so you can build complex workflows that process large data, interact with files, and call external services. To get started, install and run the server, then integrate an LLM or agent frontend that can issue tool calls, discover available MCP tools, and trigger code execution within the Daytona sandbox. You can also leverage the built-in MCP registry and sandboxed tool execution to keep heavy data processing isolated from the model context, returning concise results to the user or downstream systems.
Once running, you can use the Toolkit via the agent interface to perform tasks such as running Python code with MCP tool access, performing shell commands, reading and writing files, performing pattern matching with Glob and Grep, and more. The middleware layers handle asynchronous subagents, image/view support for multimodal LLMs, and persistent task management. This makes it suitable for building data pipelines, analysis tasks, and automated workflows where large data processing happens inside a sandbox and only key outputs are surfaced to the user.
How to install
Prerequisites:\n- Python 3.12 or newer installed on your system\n- Git to clone the repository\n- Optional: Daytona sandbox access key if you plan to run with Daytona backend\n\nStep-by-step installation:\n1) Clone the repository:\nbash\ngit clone https://github.com/Chen-zexi/open-ptc-agent.git\ncd open-ptc-agent\n\n2) Create and activate a Python virtual environment:\nbash\npython -m venv venv\n# On Windows: venv\Scripts\activate\n# On macOS/Linux: source venv/bin/activate\n\n3) Install dependencies:\nbash\npip install -r requirements.txt\n\n4) Configure your environment variables (see mcp_config for placeholders) or create a local config.yaml as needed.\n5) Run the MCP server:\nbash\npython -m open_ptc_agent.mcp_server\n\n6) (Optional) If you plan to use Daytona, ensure your Daytona credentials are configured and accessible by the server.\n\nNotes:\n- If the package name differs in your environment, adjust the module path in the command accordingly.\n- You can also run individual mcp_servers like yfinance_mcp_server.py for quick experiments, but the recommended approach is to run the centralized MCP server module.\n
Additional notes
Tips and troubleshooting:\n- Ensure Python 3.12+ is used to match the project requirements.\n- Set DAYTONA_API_KEY if you plan to rely on Daytona-backed sandbox execution. The MCP tooling will perform code execution within a sandbox to minimize context leakage.\n- When troubleshooting tool discovery, verify that the agent has access to the mcp_servers package and that the module path in the command matches your installation layout.\n- The server exposes core tools (execute_code, Bash, Read, Write, Edit, Glob, Grep). Use execute_code for sandboxed Python execution and use FilesystemMiddleware tools for file operations securely.\n- Review docs/CONFIGURATION.md and CHANGELOG for advanced configuration and latest capabilities.\n
Related MCP Servers
PPTAgent
An Agentic Framework for Reflective PowerPoint Generation
headroom
The Context Optimization Layer for LLM Applications
FireRed-OpenStoryline
FireRed-OpenStoryline is an AI video editing agent that transforms manual editing into intention-driven directing through natural language interaction, LLM-powered planning, and precise tool orchestration. It facilitates transparent, human-in-the-loop creation with reusable Style Skills for consistent, professional storytelling.
AgentChat
AgentChat 是一个基于 LLM 的智能体交流平台,内置默认 Agent 并支持用户自定义 Agent。通过多轮对话和任务协作,Agent 可以理解并协助完成复杂任务。项目集成 LangChain、Function Call、MCP 协议、RAG、Memory、Milvus 和 ElasticSearch 等技术,实现高效的知识检索与工具调用,使用 FastAPI 构建高性能后端服务。
TradingAgents mode
TradingAgents-MCPmode 是一个创新的多智能体交易分析系统,集成了 Model Context Protocol (MCP) 工具,实现了智能化的股票分析和交易决策流程。系统通过多个专业化智能体的协作,提供全面的市场分析、投资建议和风险管理。
ultimate_mcp_server
Comprehensive MCP server exposing dozens of capabilities to AI agents: multi-provider LLM delegation, browser automation, document processing, vector ops, and cognitive memory systems