Integrations & MCP

Codex

Give Codex persistent context and access to your files with the Poly plugin.

Poly turns Codex into an assistant that can pick up where you left off and work with the files in your personal and shared drives. The Poly for Codex plugin adds persistent context at session start, the poly-cli agent skill, and a hosted MCP connection in one install.

Start every task with your context

When a Codex task starts, resumes, clears, or compacts its context, the plugin asks your local Poly app for a memory summary. It adds the result to Codex as session context, surrounded by instructions that explain how to use it safely.

This happens automatically. You do not need to ask Codex to initialize Poly, and the agent skill does not request the same summary again.

Install Poly for Codex

The startup context requires the Poly desktop app to be open and signed in, with the Poly CLI installed. On macOS, open Downloads in the Poly menu bar app and click Install CLI.

Then install the plugin from its marketplace:

codex plugin marketplace add withpoly/polycodex
codex plugin add poly@poly

Start a new Codex task, run /hooks, and review and trust the Poly SessionStart hook. Codex does not run newly installed plugin hooks until you trust them. Start another task after trusting it to load your Poly context.

The source is available at withpoly/polycodex.

What the plugin includes

  • Session context — a small Bash hook runs poly memory summary and gives the result to Codex as SessionStart context. It does not require Node.js, Python, or jq.
  • Poly agent skill — guidance for searching, reading, creating, updating, and organizing files through the local CLI or hosted MCP server.
  • Poly MCP — a connection to https://mcp.poly.app/mcp for access when local CLI operations are unavailable. Codex opens a browser for Poly OAuth the first time it connects.

The local CLI is fastest, works with the desktop app's offline-capable cache, and understands local sync-folder paths. Hosted MCP works without the desktop app but cannot access local filesystem paths.

Use Poly with Codex

Ask naturally—Codex will use the injected context and Poly tools when they help:

What was I focused on last week, and what should I tackle next?

Find the API design docs in Poly and summarize the open questions.

Read the project brief in my shared drive and use it to plan this implementation.

Create a folder in //Home/projects and save the implementation notes there.

The skill guides Codex through the same Poly commands you can run yourself. See Using MCP for the hosted tool reference and troubleshooting tips.

If Poly is not running

Codex still starts normally. The hook shows that Poly memory is unavailable and tells the agent not to interpret missing context as an empty memory. Open and sign in to Poly, then start a new Codex task to try again.

If the message says the CLI is missing, install it from Poly → Downloads → Install CLI first. The hosted MCP connection remains available for file operations, but the startup memory context comes from the local CLI.

Safety

The skill requires Codex to run local CLI commands with --disallow-force. Destructive commands cannot bypass confirmation or permanently delete files; rm archives files so they remain recoverable. See Recovering Files for details.

© Poly Corp. 2026