IP

irahardianto/pi-mcp-extension

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

10 stars 16 forks Качество 75 Тренд 28MIT

Full-featured, lightweight MCP extension for the Pi coding agent: stdio, SSE & Streamable HTTP transports, OAuth 2.1 (PKCE + DCR), lazy/eager lifecycles — minimal dependencies, zero bloat.

Обзор

Supabase, DeepSource, Playwright, Context7, filesystem, databases — if it speaks MCP, Pi can use it. pi-mcp-extension is a production-ready Model Context Protocol client extension for the Pi coding agent. It manages server connections, discovers tools, and bridges them into Pi so the LLM can call them directly. - — stdio subprocesses, streamable-http (including "http" and URL-only shorthand), and legacy sse out of the box - — Paginated tools/list with cursor following (MCP 2025-03-26 spec) - — notifications/tools/list_changed triggers re-discovery without restart - — AbortSignal propagation via notifications/cancelled - — Fixed delay retry schedule (1s → 3s → 5s → 10s → 30s), configurable max retries, and automatic recovery when a server transport closes unexpectedly - — Opt-in periodic pings to detect stale connections - — Child PID tracking (StdioClientTransport.

README

Показан фрагмент оригинального README. Открыть оригинал.

pi-mcp-extension

Connect Pi to any MCP server. Supabase, DeepSource, Playwright, Context7, filesystem, databases — if it speaks MCP, Pi can use it.

pi-mcp-extension is a production-ready Model Context Protocol client extension for the Pi coding agent. It manages server connections, discovers tools, and bridges them into Pi so the LLM can call them directly.

Quick Start · Configuration · OAuth 2.1 · Commands & Agent Tools · Debug Log · How It Works · MCP Spec Compliance

Features

  • Multi-transport — stdio subprocesses, streamable-http (including "http" and URL-only shorthand), and legacy sse out of the box
  • Auto-discovery — Paginated tools/list with cursor following (MCP 2025-03-26 spec)
  • Live tool refresh — notifications/tools/list_changed triggers re-discovery without restart
  • Clean cancellation — AbortSignal propagation via notifications/cancelled
  • Smart reconnection — Fixed delay retry schedule (1s → 3s → 5s → 10s → 30s), configurable max retries, automatic recovery when a server transport closes or errors unexpectedly, and mid-session HTTP 401 / 403 insufficient_scope detection that invalidates stale tokens and prompts for re-authorization
  • Health checks — Opt-in periodic pings to detect stale connections
Открыть полный README на GitHub

Установка

npx -y @context7/mcp
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { // Remote HTTP server with OAuth 2.1 (prompts "Authorize now" on startup) "supabase": { "transport": "streamable-http", "url": "https://mcp.supabase.com/mcp", "auth": { "type": "oauth" }, "lifecycle": "eager" }, // Local stdio subprocess server (connects on demand via /mcp:start or mcp_connect) "context7": { "command": "npx", "args": ["-y", "@context7/mcp"], "lifecycle": "lazy" } } }