Pi coding agent MCP: add web search and lead data
Pi coding agent MCP setup: add one remote MCP server to Pi 1.0 with pi mcp add, then search the web, read pages and find work emails.
The looot team · , updated · 7 min read
On this page
The Pi coding agent speaks MCP natively since Pi 1.0, so it can now reach data it never had: live web search, any page as markdown, a work email from a name and a domain. Before 1.0 that needed a community extension. Now it is one `pi mcp add` command and a browser sign-in.
This post shows the exact setup from Pi's own docs, the check we ran on Pi 1.2.0, and three data tasks to give Pi once it is connected. It also covers which exposure mode to pick, because Pi's default keeps MCP tools out of the prompt until a script needs them. By the end, Pi calls one MCP server that reaches many data providers.
Last checked 2026-10-13, against Pi's docs, Pi 1.2.0 and looot's live catalog.
What changed in Pi 1.0 for MCP?
Pi 1.0, released on 2026-10-01, lists "Codemode (native support for MCP ...)" and "Deferred tool loading" among its features (Pi 1.0 post, read 2026-10-13). MCP now ships in Pi's core: no adapter to install, servers live in `mcp.json`, and `pi mcp` commands manage them from the shell.
Earendil's earlier post on MCP (read 2026-10-13) explains the design: Codemode is a JavaScript sandbox where Pi writes a short script that calls MCP tools, and it loads on its own once a server is configured. The Pi MCP docs (read 2026-10-13) hold the commands below.
| Pi MCP fact | What Pi's docs say |
|---|---|
| Transports | stdio and Streamable HTTP; SSE is rejected |
| Config files | `~/.pi/agent/mcp.json` for you, `.pi/mcp.json` for a trusted project |
| Sign-in | OAuth with `pi mcp login`, or a bearer token from an environment variable |
| Default exposure | `codemode`: tools are callable from scripts, not declared to the model |
| Other modes | `deferred` (loaded by tool search), `direct` (declared like a built-in tool), `hidden` |
| Large results | text over 20 KB reaches the model with its middle cut; scripts get the full result |
How do you add an MCP server to the Pi coding agent?
Run `pi mcp add` with a name and the server URL, then sign in. Pi writes the entry to `~/.pi/agent/mcp.json` and does not connect until you check it. `pi mcp list` connects to every enabled server and tells you whether it needs a sign-in. For looot the server is `https://api.looot.ai/mcp`:
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
pi mcp add looot --url https://api.looot.ai/mcp --description "Live web, company, people and SEO data, pay per call"
pi mcp list
pi mcp login loootWe ran the first three commands on Pi 1.2.0 on 2026-10-13. Pi wrote this entry and `pi mcp list` answered `looot: needs sign-in (codemode, global)`, which is the expected state before the browser sign-in:
{
"mcpServers": {
"looot": {
"url": "https://api.looot.ai/mcp",
"description": "Live web, company, people and SEO data, pay per call"
}
}
}On a server or in CI with no browser, use an agent token from looot settings instead of the login step. Pi's flag sends it as a bearer header and keeps the secret out of the file:
export LOOOT_TOKEN=... # agent token, never committed
pi mcp add looot --url https://api.looot.ai/mcp --bearer-token-env-var LOOOT_TOKENWhich exposure mode should Pi use for a data server?
Keep the default, `codemode`, for a data server. Pi writes one script that searches, runs a job, filters the answer and returns only what matters, so a long provider response never fills the model's context. Pick `direct` only for a small server whose tools the model should see every turn.
looot exposes a handful of tools (search, inspect, run, balance and a few more), while the catalog of providers stays behind search. That keeps the context cost low in any mode. Codemode adds one more benefit: when a job returns a large page or a long list, the script receives the full result and trims it before the model reads it, instead of the 20 KB cut Pi applies to results the model reads.
Three data tasks for the Pi coding agent
Each task is one looot job, run with fallback on so a miss at one provider moves to the next.
- Search the web. The job web.search returns titles, links and snippets. Useful when Pi needs a library's current docs or a changelog newer than its training data.
- Read a page as markdown. The job web.scrape.markdown turns a docs page, a GitHub issue or a blog post into clean text Pi can quote.
- Find a work email. The job people.email.find takes a full name and a company domain. Pi can fill a lead list from a CSV in one script.
When we looked up the company behind earendil.com through looot on 2026-10-13, the first provider missed and billed nothing, and the second found Earendil with a size of 11 to 50 people. The run record shows both attempts, so Pi can report which provider answered.
Prompt for your agent
Pi with live data
Other data MCP servers for Pi
Any Streamable HTTP or stdio MCP server can be added with `pi mcp add`. Bright Data has published a tutorial for using its Web MCP with Pi (read 2026-10-13). It installs `pi-mcp-adapter`, which replaces the built-in support on Pi 1.0, so on 1.0 add its server with `pi mcp add` instead. Single-vendor servers such as Exa's MCP server or Firecrawl's each cover one vendor's data. One server that reaches many providers suits a task that needs search, page reading and contact data in the same script.
What it cannot do
- It does not pick or pay for Pi's model. Your model provider bills its tokens, including the text the tools return.
- It cannot sign in to sites for you, read private accounts or post on social media.
- It does not run on a timer. A nightly search or an alert needs scheduled runs, not available yet.
- A miss is a normal answer. If no provider has the email, the run says so, and Pi should not guess one.
- Project servers in `.pi/mcp.json` load only in trusted projects. Keep the looot entry in your user file.
Questions
Keep reading
Claude Code MCP servers for data work: how to add and vet them
Claude Code MCP servers for search, scraping, SEO and enrichment data: how to add them, what to check before you trust one, and how to keep the list short.
The looot team · · 7 min read
Gemini 4 Argon MCP: live web and company data
Gemini 4 Argon MCP setup: connect one remote MCP server to Google's new model for web search, page reading, company data and Google results.
The looot team · · 7 min read
MCP gateway: what it does and when an agent needs one
An MCP gateway puts many tools behind one connection, one login and one bill. How it works, when you need one, and what looot's gateway does.
The looot team · · 7 min read
Try it with the agent you already use
Start your workspace, top up, and paste one prompt into your agent.

