MCP servers and interactive UI
Catalog services, your own servers, tool exposure, generative UI, A2UI and MCP Apps.
MCP servers give pi tools, and some give interactive apps. Settings → MCP servers manages catalog services and your own servers.
/mcp and /connect open it.Connect a catalog service#
- Open MCP servers → Servers and choose +.
- Pick a service: Linear, GitHub, Slack, Notion, Sentry, Atlassian, Figma, Gmail, Google Calendar, Outlook, or Composio for 850+ apps through one sign-in.
- Choose For me (your
mcp.json) or This project only (the project's.pi/mcp.json; needs a trusted project). - Sign in in the browser or enter a token.
- Check the state and the tool list.
Some services offer a read-only endpoint. Signing in from a browser on another machine works by pasting the redirect URL back. A server with a token always stays in your user file.
Add your own server#
Choose Your own server, then a URL or a command:
| Kind | Fields |
|---|---|
| URL | Address and headers. The check may report that sign-in is needed. |
| Command | Program, arguments and environment variables. The check finds the program on the PATH but does not start it. |
The backend's
PATH can differ from your shell's; an absolute path avoids that. You can also load a client's JSON file in the wizard.Tool exposure#
| Mode | Behavior |
|---|---|
| Codemode (default) | The model calls the tools from code. |
| Direct | Every tool is declared in the model's tool list. |
| Deferred | Tools are found by search when needed. |
Exposure controls how tools reach the model, not what the server may do. Changing it reloads the session.
Edit a server#
Use a server's pencil button. The form shows the JSON As it will be written. Save and reconnect, then check the state.
The Configuration tab lists the two files,
~/.pi/agent/mcp.json and the project's .pi/mcp.json. Edit here validates the JSON before saving; you can also open a file in your editor or reveal it. Sign-in tokens are kept in mcp-auth.json. With credential storage on, secrets you enter go to the credential store and mcp.json gets a resolver command. With it off or unavailable, they are written to mcp.json as plain text, readable only by your account, and the save says so. See Credential storage.{
"mcpServers": {
"issues": {
"command": "node",
"args": ["/absolute/path/to/server.mjs"],
"exposure": "direct"
}
}
}
Interactive UI in the transcript#
| Kind | How it works |
|---|---|
| Generative UI | A tool returns HTML, CSS and JavaScript that run in a sandboxed frame. The built-in generateSandboxedUi tool draws charts, planners and other views. Controls update the view without another model turn. |
| A2UI | A tool returns components and data that pi-kit renders: tables, cards, forms and buttons, through the built-in render_a2ui tool. A button sends your action and the selected data back to the agent; editing a field alone sends nothing. |
| MCP App | A server supplies an HTML app shown in a frame marked MCP app, sandboxed. |
| Input request | A tool or extension asks for a confirmation, a choice or text. |
pi-kit renders these through CopilotKit's Angular integration and AG-UI.
Video walkthrough · English captions
Explore an interactive view in chat
Ask for a fictional power planner, adjust its sliders, and reset the budget. A demo tool supplies the prebuilt HTML interface, rendered through pi-kit’s CopilotKit integration.
Video walkthrough · English captions
Choose an item with A2UI
Open a fictional supply checklist, inspect an item, and continue with its details. The tool-owned A2UI components send the selection back to the agent.
Examples#
The repository's examples folder has
a2ui-failing-specs (an A2UI extension) and mcp-app-server (a toy issue tracker with an MCP App form). Its README explains how to install both. Add the server with the JSON above, reload, and ask for its tool.