Sunday, October 4, 2026
HomeProgrammingPi 1.0 Coding Agent Setup: Set up and MCP Information

Pi 1.0 Coding Agent Setup: Set up and MCP Information


Pi 1.0 is the primary steady launch of Pi, an open-source terminal coding agent from Earendil. It shipped on October 1, 2026, and this Pi 1.0 coding agent setup information takes you from set up to a primary MCP server and a primary codemode script. Each command beneath comes from the official Pi documentation.

How you can Set Up Pi 1.0 and Configure MCP Servers

  1. Set up Pi with npm set up -g --ignore-scripts @earendil-works/pi-coding-agent (Node.js 22.19 or newer) or the pi.dev installer script.
  2. Confirm the set up with pi --version, then begin pi in a venture folder.
  3. Log in to a mannequin supplier with /login.
  4. Add an MCP server with pi mcp add and verify it with pi mcp record.
  5. Reload with /reload and let the mannequin name the server from a codemode script.

Desk of Contents

What Is Pi 1.0?

Pi describes itself as a minimal agent harness. It runs in your terminal, works on the information in your present folder, and skips options corresponding to sub-agents and plan mode. You prolong it with extensions, expertise, immediate templates, and themes as a substitute. It helps 15+ suppliers, together with Anthropic, OpenAI, Google, and Ollama for native fashions.

The 1.0 launch modified a couple of defaults and added options that matter for this information. In line with the changelog, the terminal UI now runs fullscreen by default (set tuiMode to "common" to maintain regular scrollback), codemode makes use of about 40% fewer immediate tokens, and MCP OAuth dealing with was hardened.

Pi just isn’t Inflection AI’s Pi chatbot. The coding agent lives at pi.dev and within the earendil-works/pi repository on GitHub.

Set up Pi 1.0

Pi ships as an npm bundle. The docs suggest --ignore-scripts so dependency lifecycle scripts don’t run throughout set up, and Pi doesn’t want them. This route wants Node.js 22.19 or newer:

npm set up -g --ignore-scripts @earendil-works/pi-coding-agent
pi --version

On macOS or Linux you should use the installer script as a substitute. The installer pins all dependencies, whereas npm doesn’t pin transitive ones. As with all script piped right into a shell, obtain and skim it first if you wish to examine what it does:

curl -fsSL https://pi.dev/set up.sh -o set up.sh
much less set up.sh
sh set up.sh

Then change right into a venture folder and begin Pi:

cd /path/to/venture
pi

Pi makes use of the working folder to seek out venture information, directions, and configuration, and to group saved periods. Resume the final session for a folder with pi --continue.

Join a Mannequin

Pi wants entry to a mannequin by means of a supplier. Inside Pi, run /login, choose a supplier, and observe the prompts to make use of a subscription or retailer an API key. Run /mannequin afterward to decide on a special mannequin. The fashions documentation covers environment-variable authentication, native fashions, and customized endpoints.

Add an MCP Server with pi mcp add

Pi connects to Mannequin Context Protocol servers over stdio or streamable HTTP. Add an area stdio server, verify the connection, then begin Pi:

pi mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem .
pi mcp record
pi

Every part after -- is the server command and its arguments. pi mcp add solely writes the configuration and doesn’t join. pi mcp record connects to each enabled server and prints its state, instruments, and errors. It exits with standing 1 when an entry is invalid or an enabled server just isn’t related, so you should use it in scripts.

For a distant server, move a URL and, if it wants a token, the title of an atmosphere variable that holds it:

pi mcp add docs --url https://instance.com/mcp --bearer-token-env-var DOCS_TOKEN
pi mcp record

The place the configuration lives

By default the instructions write user-level servers to ~/.pi/agent/mcp.json. Add --local (or -l) to write down the venture file .pi/mcp.json as a substitute. Pi reads venture servers solely after you belief the venture. A venture entry replaces a user-level entry with the identical title. The file format matches different MCP purchasers:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
    },
    "docs": {
      "url": "https://instance.com/mcp",
      "headers": { "Authorization": "Bearer ${DOCS_TOKEN}" },
      "description": "Search and skim the product documentation"
    }
  }
}

Values in env and headers can reference atmosphere variables corresponding to ${DOCS_TOKEN}, so that you should not have to retailer a secret within the file. Preserve servers with credentials within the user-level file, and use the venture file just for servers the venture requires. After you modify a server exterior a session, run /reload inside Pi. Use /mcp to examine connections, sign up, reconnect, or disable a server.

Servers that use OAuth

Distant servers that use OAuth want no credentials in mcp.json. When the server rejects an unauthenticated connection, run pi mcp login <server> or /mcp login <server>. Pi opens the authorization web page, shops tokens in ~/.pi/agent/mcp-auth.json, and refreshes them once they expire. pi mcp logout <server> deletes the saved credentials.

How Codemode Works

Codemode is a device, not a separate mode. It lets the mannequin write a JavaScript script that calls Pi’s different instruments, together with MCP instruments. Solely the script’s output goes again to the mannequin, so a script can run a number of calls in parallel and filter giant outcomes earlier than the mannequin reads them. The script runs in a QuickJS sandbox with top-level await. The sandbox has no Node APIs, file system, community, or timers, so a script reaches the surface world solely by means of instruments.

You should not have to modify it on for MCP. Pi prompts codemode when a server with the default codemode publicity connects. MCP instruments are then named mcp__<server>__<device>, and scripts name them as instruments.mcp__<server>__<device>(args). To maintain codemode lively with none MCP server, add this to ~/.pi/agent/settings.json:

{
  "defaultTools": ["+codemode"]
}

A script can begin with an choices line that caps output and units a tough deadline:

Scripts discover instruments with searchTools(), describeTool(), or by filtering ALL_TOOLS. Instrument calls are actual: if a script fails partway, the calls it already made should not undone.

Management how instruments attain the mannequin

Every server has an publicity setting. The default, codemode, makes instruments callable from scripts with out declaring them to the mannequin. deferred hundreds a device solely after tool_search finds it. direct declares it like a built-in device, which fits a small set you utilize consistently. hidden makes it unreachable. You may override the setting for single instruments with toolExposure:

{
  "mcpServers": {
    "github": {
      "url": "https://api.githubcopilot.com/mcp/",
      "publicity": "deferred",
      "toolExposure": {
        "search_code": "direct",
        "delete_*": "hidden"
      }
    }
  }
}

Security and Troubleshooting

Pi reveals every file learn, search, command, and edit it makes, nevertheless it doesn’t ask earlier than each device name. Evaluate the adjustments when it finishes and use model management for essential work. For untrusted or unattended work, run Pi in a container or one other sandbox. The safety documentation explains venture belief and what Pi can entry.

  • A server is lacking or failing: run pi mcp record. /mcp inside a session reveals the total connection error and the tail of stderr from a failed stdio server.
  • Config adjustments don’t present up: run /reload after including, eradicating, or modifying a server exterior the session.
  • A venture server is ignored: venture .pi/mcp.json information are learn just for trusted initiatives.
  • Server logs: logging notifications are appended to ~/.pi/agent/mcp.log.
  • Invalid entries: Pi stories them and skips them with out blocking different servers. Server names could comprise solely letters, digits, _, and -.

What’s Subsequent

From right here, add extra MCP servers, write an AGENTS.md with directions Pi ought to observe in a folder, or strive expertise and immediate templates. Browse the official MCP servers repository for ready-made servers, and verify each’s README earlier than you give it entry to your information or accounts.


Previous articleEmber 6.11 Launched
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments