Loading...
Loading...
Token-efficient MCP adapter for Pi coding agent that enables MCP server integration without burning context window
npx skill4agent add aradotso/mcp-skills pi-mcp-adapterSkill by ara.so — MCP Skills collection.
.mcp.json~/.config/mcp/mcp.json/mcppi install npm:pi-mcp-adapter~/.config/mcp/mcp.json~/.pi/agent/mcp.json$PI_CODING_AGENT_DIR/mcp.json.mcp.json.pi/mcp.json.mcp.json{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
}
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"]
}
}
}{
"mcpServers": {
"figma": {
"url": "http://localhost:3845/mcp",
"headers": {
"Authorization": "Bearer ${FIGMA_TOKEN}"
}
}
}
}{
"mcpServers": {
"google-drive": {
"command": "npx",
"args": ["-y", "gdrive-mcp"],
"auth": "oauth",
"oauth": {
"grantType": "authorization_code"
}
},
"api-service": {
"url": "https://api.example.com/mcp",
"auth": "oauth",
"oauth": {
"grantType": "client_credentials"
},
"env": {
"CLIENT_ID": "${API_CLIENT_ID}",
"CLIENT_SECRET": "${API_CLIENT_SECRET}"
}
}
},
"settings": {
"autoAuth": true
}
}autoAuth: trueautoAuth/mcpctrl+aclient_credentialsmcp// Search for available tools
mcp({ search: "screenshot" })
// Returns: chrome_devtools_take_screenshot - Take a screenshot of the page...
// Describe a specific tool
mcp({ describe: "chrome_devtools_take_screenshot" })
// Returns: Full parameter schema
// Call a tool (args must be JSON string)
mcp({
tool: "chrome_devtools_take_screenshot",
args: '{"format": "png", "fullPage": true}'
}){ search: "query" }{ list: true }{ describe: "tool_name" }{ tool: "name", args: "json" }{ action: "resources", server: "name" }{ action: "read-resource", server: "name", uri: "file://..." }{ action: "ui-messages" }{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"],
"directTools": true
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"directTools": ["search_repositories", "get_file_contents"]
}
}
}true["tool_a", "tool_b"]false{
"settings": {
"directTools": true
},
"mcpServers": {
"huge-server": {
"command": "npx",
"args": ["-y", "mega-mcp@latest"],
"directTools": false
}
}
}{
"mcpServers": {
"figma": {
"url": "http://localhost:3845/mcp",
"directTools": true,
"excludeTools": ["get_figjam", "figma_get_code_connect_map"]
}
}
}{
"mcpServers": {
"lazy-server": {
"command": "npx",
"args": ["-y", "some-mcp"],
"lifecycle": "lazy",
"idleTimeout": 10
},
"eager-server": {
"command": "npx",
"args": ["-y", "another-mcp"],
"lifecycle": "eager"
},
"critical-server": {
"command": "npx",
"args": ["-y", "important-mcp"],
"lifecycle": "keep-alive"
}
}
}lazyeagerkeep-alive{
"settings": {
"idleTimeout": 10
},
"mcpServers": {
"keep-warm": {
"command": "npx",
"args": ["-y", "warm-mcp"],
"idleTimeout": 0
}
}
}idleTimeout0{
"settings": {
"toolPrefix": "server"
}
}"server"chrome_devtools_take_screenshot"short"-mcpchrome_devtools_take_screenshot"none"take_screenshot/mcp/mcpctrl+a/mcp setup/mcp setup.mcp.json~/.config/mcp/mcp.json.mcp.jsonpi-mcp-adapter# Scan for host configs and create compatibility imports
pi-mcp-adapter init
# Show detected config files
pi-mcp-adapter info${VAR}$env:VAR{
"mcpServers": {
"db": {
"command": "npx",
"args": ["-y", "db-mcp"],
"env": {
"DATABASE_URL": "${DB_URL}",
"API_KEY": "$env:SECRET_KEY"
},
"cwd": "${PROJECT_ROOT}/data"
}
}
}{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "~/Documents"]
}
}
}{
"settings": {
"toolPrefix": "server",
"idleTimeout": 10,
"directTools": false,
"disableProxyTool": false,
"autoAuth": false,
"sampling": true,
"samplingAutoApprove": false
}
}toolPrefix"server""short""none"idleTimeoutdirectToolsdisableProxyToolmcpautoAuthsamplingsamplingAutoApprove{
"mcpServers": {
"problematic": {
"command": "npx",
"args": ["-y", "debug-mcp"],
"debug": true
}
}
}pi install npm:glimpseuiexport MCP_UI_VIEWER=browserexport MCP_UI_VIEWER=glimpsemcp({ tool: "launch_dashboard", args: "{}" })_meta.ui.resourceUrimcp({ action: "ui-messages" }){
"settings": {
"toolPrefix": "server",
"idleTimeout": 15,
"directTools": false
},
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "${PROJECT_ROOT}"],
"lifecycle": "keep-alive",
"directTools": ["read_file", "write_file", "list_directory"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
},
"directTools": ["search_repositories", "get_file_contents", "create_issue"]
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"DATABASE_URL": "${DATABASE_URL}"
}
},
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "${BRAVE_API_KEY}"
}
}
}
}// List resources from a server
mcp({ action: "resources", server: "filesystem" })
// Returns: List of available resources with URIs
// Read a specific resource
mcp({
action: "read-resource",
server: "filesystem",
uri: "file:///Users/me/project/README.md"
}){
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "~/projects"],
"exposeResources": true
}
}
}truefalse---
name: github-reviewer
tools:
- read
- edit
- mcp:github
---
Review pull request and create detailed comments using GitHub MCP tools.mcp:server-namecat .mcp.json | jq .{
"mcpServers": {
"failing-server": {
"command": "npx",
"args": ["-y", "problem-mcp"],
"debug": true
}
}
}/mcpmcp({ action: "reconnect", server: "failing-server" })~/.pi/agent/mcp-cache.jsondirectTools# In Pi
/mcp reconnect <server-name>// List all available tools
mcp({ list: true })
// Search for specific tool
mcp({ search: "expected_tool_name" })/mcpctrl+a{
"settings": {
"autoAuth": true
}
}client_credentialsexport API_CLIENT_ID="your-client-id"
export API_CLIENT_SECRET="your-secret"{
"mcpServers": {
"huge-server": {
"command": "npx",
"args": ["-y", "mega-mcp"],
"directTools": false
}
}
}{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"directTools": ["search_repositories", "get_file_contents"]
}
}
}{
"settings": {
"disableProxyTool": true,
"directTools": true
}
}{
"env": {
"CORRECT": "${MY_VAR}",
"ALSO_CORRECT": "$env:MY_VAR",
"WRONG": "$MY_VAR"
}
}echo $MY_VAR
# Should print value
export MY_VAR="value"{
"mcpServers": {
"chatty-server": {
"command": "npx",
"args": ["-y", "active-mcp"],
"idleTimeout": 0
}
}
}{
"mcpServers": {
"critical": {
"command": "npx",
"args": ["-y", "important-mcp"],
"lifecycle": "keep-alive"
}
}
}~/.config/mcp/mcp.json~/.pi/agent/mcp.json$PI_CODING_AGENT_DIR/mcp.json.mcp.json.pi/mcp.json~/.pi/agent/mcp-cache.json$PI_CODING_AGENT_DIR/mcp-cache.json| Command | Purpose |
|---|---|
| Open interactive config overlay |
| Guided first-run configuration |
| Force server reconnection |
| Find tools by keyword |
| List all available tools |
| Get tool schema |
| Execute MCP tool |
| List server resources |
| Get pending UI messages |
{
"settings": {
"toolPrefix": "server",
"idleTimeout": 5
},
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"],
"lifecycle": "lazy",
"directTools": [
"take_screenshot",
"get_console_logs",
"execute_javascript"
],
"excludeTools": ["deprecated_tool"]
}
}
}// Direct tool (appears in agent's tool list)
chrome_devtools_take_screenshot({ format: "png", fullPage: true })
// Or via proxy
mcp({
tool: "chrome_devtools_get_console_logs",
args: '{}'
})
// Search for other tools
mcp({ search: "navigate" })