Open PTC Agent
An open source implementation of code execution with MCP (Programatic Tool Calling)
What is Open PTC Agent?
Open PTC Agent is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to open source implementation of code execution with mcp (programatic tool calling)
An open source implementation of code execution with MCP (Programatic Tool Calling)
This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- An open source implementation of code execution with MCP (Pr
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx open-ptc-agentConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Open PTC Agent
Open PTC Agent (Programmatic Tool Calling) is an open-source CLI agent that executes code and multi-step tasks inside isolated Daytona sandbox environments using LangChain and LangGraph. It provides a conversational terminal interface where the agent can run Python, execute Bash commands, read and write files, perform web searches, retrieve financial data, and manage background sub-tasks — all while dramatically reducing token overhead by returning only final results rather than raw data streams.
Prerequisites
- Python 3.11+ and the uv package manager installed
- A Daytona account and API key for sandbox infrastructure (daytona.io)
- An Anthropic API key (ANTHROPIC_API_KEY) or OpenAI API key (OPENAI_API_KEY)
- Optional: Tavily API key for web search, Alpha Vantage key for financial data
- An MCP-compatible client or the ptc-agent CLI for direct use
Clone the repository and sync dependencies
Clone the Open PTC Agent repository and use uv to install all Python dependencies into a local virtual environment.
git clone https://github.com/Chen-zexi/open-ptc-agent.git
cd open-ptc-agent
uv syncActivate the virtual environment
Activate the uv-managed virtual environment so the ptc-agent CLI command is available in your shell.
source .venv/bin/activateCreate and populate the .env file
Create a .env file in the project root with your required API keys. At minimum you need a Daytona key and one LLM provider key.
# .env
ANTHROPIC_API_KEY=sk-ant-...
DAYTONA_API_KEY=your-daytona-api-key
# Optional
TAVILY_API_KEY=tvly-...
ALPHA_VANTAGE_API_KEY=your-alpha-vantage-key
LANGSMITH_API_KEY=ls__...Launch the CLI agent
Start the interactive terminal agent. Use --plan-mode to have the agent outline its approach before executing, which is useful for complex multi-step tasks.
ptc-agent
# or with planning enabled:
ptc-agent --plan-modeUse built-in CLI commands
Inside the agent session, use slash commands to manage tools and files. Prefix Bash commands with ! to run them directly in the sandbox.
/help # List all available commands
/files # Browse files in the sandbox
!ls -la # Run a Bash command directly
@README.md # Reference a file in your promptOpen PTC Agent Examples
Client configuration
Configure Open PTC Agent as an MCP server. The agent exposes its sandbox execution and tool-calling capabilities through the MCP stdio transport.
{
"mcpServers": {
"open-ptc-agent": {
"command": "npx",
"args": ["open-ptc-agent"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-...",
"DAYTONA_API_KEY": "your-daytona-api-key",
"TAVILY_API_KEY": "tvly-..."
}
}
}
}Prompts to try
Example tasks that leverage the agent's code execution, file handling, and data retrieval tools.
- "Fetch AAPL stock history for the past year, compute a 20-day moving average, and plot it as a PNG file."
- "Search the web for the top 5 Python async frameworks in 2024 and write a comparison report to report.md."
- "Read the files in /src, identify any functions longer than 50 lines, and refactor them with better names."Troubleshooting Open PTC Agent
ptc-agent command not found after uv sync
Ensure you have activated the virtual environment with `source .venv/bin/activate`. If the command still fails, run `uv run -m ptc_agent` as an alternative entry point.
Daytona sandbox fails to provision or times out
Verify your DAYTONA_API_KEY is correct and your Daytona account has available sandbox quota. Check https://app.daytona.io for account status and usage limits.
Web search returns no results
Web search requires a valid TAVILY_API_KEY in your .env file. Sign up at tavily.com for a free API key. If the key is present, ensure your network allows outbound HTTPS to the Tavily API.
Frequently Asked Questions about Open PTC Agent
What is Open PTC Agent?
Open PTC Agent is a Model Context Protocol (MCP) server that open source implementation of code execution with mcp (programatic tool calling) It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Open PTC Agent?
Follow the installation instructions on the Open PTC Agent GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Open PTC Agent?
Open PTC Agent works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Open PTC Agent free to use?
Yes, Open PTC Agent is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Open PTC Agent Alternatives — Similar Coding Agents Servers
Looking for alternatives to Open PTC Agent? Here are other popular coding agents servers you can use with Claude, Cursor, and VS Code.
Dify
★ 142.2kProduction-ready platform for agentic workflow development.
Ruflo
★ 54.0k🌊 The leading agent orchestration platform for Claude. Deploy intelligent multi-agent swarms, coordinate autonomous workflows, and build conversational AI systems. Features enterprise-grade architecture, self-learning swarm intelligence, RAG integrat
Goose
★ 45.7kan open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Antigravity Awesome Skills
★ 38.3kInstallable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.
AgentScope
★ 25.5kBuild and run agents you can see, understand and trust.
Serena
★ 24.5kA coding agent toolkit that provides IDE-like semantic code retrieval and editing tools, enabling LLMs to efficiently navigate and modify codebases using symbol-level operations instead of basic file reading and string replacements.
Browse More Coding Agents MCP Servers
Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Open PTC Agent in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Open PTC Agent?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.