Docs
Agents and APIClients

pi

Add Xentropy to the pi coding agent with its built-in MCP support and sign in with OAuth or an API key.

pi connects to remote MCP servers over Streamable HTTP with its built-in MCP support.

Connect with OAuth

Requires pi 1.5 or later, which has built-in MCP. Check with pi --version and update with pi update self. Older versions fail with Unknown option: --url.

  1. Add the server:

    pi mcp add xentropy --url https://api.xentropy.ai/mcp
  2. Sign in:

    pi mcp login xentropy

    Inside a session, /mcp login xentropy does the same, and /mcp shows the connection status.

  3. Sign in to Xentropy in the browser and review the requested access. pi listens on a loopback address on your machine for the result; over SSH you can paste the redirected URL into the sign-in screen.

No API key or client secret is needed. pi stores and refreshes the tokens itself.

Headless or CI

Create a key with the Agent preset under Settings → API Keys and keep it in your environment as XENTROPY_API_KEY. Add the server so that pi sends it as a bearer token:

pi mcp add xentropy --url https://api.xentropy.ai/mcp --bearer-token-env-var XENTROPY_API_KEY

The pi configuration names the variable, never the key itself. Never paste the key into a chat.

Xentropy package (coming soon)

A @xentropy/pi package with Xentropy skills and optional extras is coming soon. It is not needed to connect: the steps above use pi's built-in MCP.

Scopes to grant

OAuth sign-in offers the agent default scopes: artifacts:read, artifacts:write, artifacts:render, dashboards:read, dashboards:write, data:read, data:write and connections:read. The Agent preset for API keys matches that set. Sharing, publishing and permanent deletion are separate opt-ins. See API keys and scopes.

Troubleshooting

  • New tools are missing. pi lists tools when it connects. After a Xentropy update, run /mcp reconnect xentropy or start a new session.
  • Check the connection. pi mcp list connects to each server and prints its state, tools and errors.
  • Tools are not called directly. pi reaches MCP tools through codemode by default. Xentropy tools are named mcp__xentropy__<tool>.
  • 401 errors. Run pi mcp login xentropy again, or for the headless variant check that XENTROPY_API_KEY is set and the key is not revoked under Settings → API Keys.

On this page