Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nicobailon/pi-mcp-adapter/llms.txt
Use this file to discover all available pages before exploring further.
Settings Object
Thesettings field in your mcp.json file controls global defaults that apply to all servers unless overridden per-server.
Configuration Options
Tool Prefix
Controls how MCP tool names are prefixed to avoid naming conflicts
"server"(default) - Full server name as prefix (e.g.,chrome_devtools_take_screenshot)"short"- Strips-mcpsuffix from server name (e.g.,chrome_take_screenshotforchrome-mcpserver)"none"- No prefix, use original tool names (risk of conflicts)
| Server Name | Tool Name | server | short | none |
|---|---|---|---|---|
chrome-devtools | take_screenshot | chrome_devtools_take_screenshot | chrome_devtools_take_screenshot | take_screenshot |
github-mcp | search_repos | github_mcp_search_repos | github_search_repos | search_repos |
postgres-mcp | query | postgres_mcp_query | postgres_query | query |
Idle Timeout
Global idle timeout in minutes before disconnecting inactive servers. Set to
0 to disable.Servers with lifecycle: "lazy" or lifecycle: "eager" (when explicitly set) will disconnect after this period of inactivity.Per-server idleTimeout overrides this global setting.Servers with
lifecycle: "keep-alive" ignore idle timeout settings and remain connected.Direct Tools
Global default for registering MCP tools as individual Pi tools instead of through the proxy.When
true, all tools from all servers appear directly in the agent’s tool list alongside built-in tools like read, bash, and edit.Per-server directTools overrides this global setting.Direct Tools Deep Dive
Overview
By default, the Pi MCP Adapter uses a single proxy tool (mcp) to access all MCP servers. This keeps your context window small (~200 tokens) but requires the LLM to discover tools via search.
With directTools, you can promote specific tools to first-class Pi tools that appear directly in the agent’s tool list.
Context Cost
Each direct tool costs approximately 150-300 tokens in the system prompt (name + description + JSON schema).| Configuration | Token Cost | Use Case |
|---|---|---|
| Proxy only (default) | ~200 tokens total | All servers, any number of tools |
| 5-20 direct tools | ~750-6,000 tokens | Targeted tool sets you use frequently |
| 75+ direct tools | ~11,250+ tokens | Not recommended - defeats the purpose |
Configuration Examples
How It Works
Metadata Cache
Direct tools register from the metadata cache (
~/.pi/agent/mcp-cache.json), so no server connections are needed at startup.First Session Behavior
On the first session after adding
directTools to a new server, the cache won’t exist yet. Tools fall back to proxy-only and the cache populates in the background.Interactive Configuration
Run/mcp to open an interactive panel that shows:
- All configured servers with connection status
- Available tools for each server
- Direct/proxy toggle switches
- Reconnect and OAuth buttons
Changes made in the
/mcp panel are written directly to your mcp.json file. Restart Pi to apply them.Tool Name Format
Direct tools use the same prefix rules as proxy tools (controlled bytoolPrefix setting).
Example with github server and toolPrefix: "short":
search_repositoriesRegistered as:
github_search_repositories
Subagent Integration
If you use the subagent extension, agents can request direct MCP tools in their frontmatter:Complete Example
Next Steps
Server Setup
Configure individual MCP servers
Authentication
Set up OAuth and bearer token authentication