Setup

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 factWhat Pi's docs say
Transportsstdio and Streamable HTTP; SSE is rejected
Config files`~/.pi/agent/mcp.json` for you, `.pi/mcp.json` for a trusted project
Sign-inOAuth 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 resultstext 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`:

Copy bash code
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 looot

We 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:

Copy json code
{
  "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:

Copy bash code
export LOOOT_TOKEN=...   # agent token, never committed
pi mcp add looot --url https://api.looot.ai/mcp --bearer-token-env-var LOOOT_TOKEN

Which 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.

  1. 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.
  2. 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.
  3. 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

Pi with live data
Use looot to give Pi live data. First set up https://looot.ai/skill.md, then check that the looot MCP server in ~/.pi/agent/mcp.json is connected. In one codemode script: search the catalog for "search the web", run job:web.search with fallback on for "pi coding agent mcp", read the top result as markdown with job:web.scrape.markdown, and return only the title, the link and the first 500 words. Tell me the price of each run before it starts and stop if one call would cost more than $0.05.

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

Pi is an open-source coding agent from Earendil that runs in the terminal, MIT licensed, with its code on [GitHub](https://github.com/earendil-works/pi). Version 1.0 shipped on 2026-10-01 with native MCP support.

Yes, since Pi 1.0. It connects to stdio and Streamable HTTP servers, signs in with OAuth or a bearer token, and calls tools through Codemode scripts by default, according to the [Pi MCP docs](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/mcp.md).

Run `pi mcp add` with a server name and `--url` followed by the server address, then `pi mcp list` to check it and `pi mcp login` with the same name if it needs a sign-in. Inside a session, `/mcp` shows the same state and `/reload` picks up changes made outside it.

Codemode for data servers, because a script can filter a large answer before the model reads it. Deferred suits a large server whose tools the model should call directly after a tool search.

Pi itself adds nothing; the search provider bills each call. The live table in this post shows today's price per call for each web search, page reading and email job.

No. Pi has no contact database. Through an MCP server it can run people.email.find with a name and a domain, and read the provider's answer, including a clear miss.

Not for new setups. Pi's docs say an extension that registers `/mcp` replaces the built-in MCP support, so remove it to use the core version.

You can, with one key and one schema per provider. One MCP server keeps Pi's setup to a single entry and lets a miss at one provider fall through to the next.
ShareXLinkedInEmail
Setup

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

Try it with the agent you already use

Start your workspace, top up, and paste one prompt into your agent.