Run agent tool calls through pctx Code Mode and unified MCP
Put pctx between agents and tools so MCP servers and custom tools can run through a code-oriented execution layer instead of one-off tool calls.
Prerequisites
pctx CLI, Python SDK or npm package, MCP-compatible client or OpenAI Agents SDK
Installation
Install the pctx CLI and the client library that matches your agent stack:
brew install portofcontext/tap/pctx
npm i -g @portofcontext/pctx
pip install pctx-client
Use the Python client when building Python agents that call pctx as an HTTP service. Use the npm package or Homebrew CLI when you want pctx available as a local command for Code Mode or MCP setup. Existing Homebrew installs can be updated separately with brew upgrade pctx; do not treat that as the first-install path.
Basic setup:
pctx start
pctx mcp init
Run pctx as the boundary between your agent and registered tools/MCP servers. Keep the MCP server list explicit, review which tools are exposed through Code Mode, and avoid giving the bridge broader filesystem or network access than the workflow needs.