Open PTC Agent

v1.0.0Coding Agentsstable

An open source implementation of code execution with MCP (Programatic Tool Calling)

agentdaytonalangchainlangraphllm
Share:
719
Stars
0
Downloads
0
Weekly
0/5

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

Code execution with MCP
LangChain/LangGraph integration
Programmatic tool calling
Chen-zexi

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx open-ptc-agent

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 sync
2

Activate the virtual environment

Activate the uv-managed virtual environment so the ptc-agent CLI command is available in your shell.

source .venv/bin/activate
3

Create 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__...
4

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-mode
5

Use 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 prompt

Open 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.

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.

Quick Config Preview

{ "mcpServers": { "open-ptc-agent": { "command": "npx", "args": ["-y", "open-ptc-agent"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides