SitePoint6 min readtutorialintermediate
Pi 1.0 Coding Agent Setup: Install, Configure MCP, and Run Codemode
Summary
Pi 1.0 is an open-source terminal coding agent that uses LLMs to interact with your project files. This guide details its installation, configuration of Model Context Protocol (MCP) servers, and how its sandboxed JavaScript 'codemode' executes agent actions.
- Install Pi 1.0 via npm or a shell script, requiring Node.js 22.19+.
- Configure MCP servers for local stdio or remote HTTP access, supporting OAuth and environment variable secrets.
- Codemode is a sandboxed QuickJS environment for LLMs to execute JavaScript scripts that call Pi's tools.
- Control tool visibility to the model using `exposure` settings: `codemode`, `deferred`, `direct`, or `hidden`.
Engineers looking to integrate AI coding agents directly into their terminal workflow will find this guide useful for setting up and understanding Pi's core mechanisms.
6/10


