FGP - Fast Gateway Protocol
Daemon-based architecture for AI agent tools. Up to 480x faster than MCP stdio.
FGP replaces slow MCP stdio servers with persistent UNIX socket daemons. Instead of spawning a new process for each tool call (~2.3s overhead), FGP keeps daemons warm and ready (~10-50ms latency).
Performance
iMessage (macOS) - Fastest Local Daemon
| Operation | FGP iMessage | MCP Stdio | Speedup |
|---|---|---|---|
| Analytics | 5ms | 2,400ms | 480x |
| Recent | 8ms | 2,300ms | 292x |
| Unread | 10ms | 2,300ms | 230x |
Browser Automation (vs Playwright MCP)
| Operation | FGP Browser | Playwright MCP | Speedup |
|---|---|---|---|
| Navigate | 8ms | 2,328ms | 292x |
| Snapshot | 9ms | 2,484ms | 276x |
| Screenshot | 30ms | 1,635ms | 54x |
Multi-Step Workflow
4-step workflow: Navigate → Snapshot → Click → Snapshot
| Tool | Total Time | vs MCP |
|---|---|---|
| FGP Browser | 585ms | 19x faster |
| Vercel agent-browser | 733ms | 15x faster |
| Playwright MCP | 11,211ms | baseline |
Quick Start
# Install FGP CLI
cargo install fgp
# Install browser daemon
fgp install browser
# Start the daemon
fgp start browser
# Use it
fgp call browser open "https://example.com"
fgp call browser snapshot
Why FGP?
The Problem with MCP stdio
Every MCP tool call:
- Spawns a new process (~500ms)
- Initializes runtime (~1s)
- Establishes connections (~500ms)
- Finally executes your request
This adds ~2.3 seconds to every single operation. For a 5-step workflow, that's 11+ seconds of overhead.
The FGP Solution
FGP daemons:
- Start once, stay warm
- Accept requests via UNIX socket (~1ms)
- Execute immediately
- Return results in milliseconds
The daemon handles connection pooling, state management, and resource caching.
Architecture
┌─────────────────┐ UNIX Socket ┌─────────────────┐
│ AI Agent │ ──────────────────── │ FGP Daemon │
│ (Claude Code) │ ~10-50ms RTT │ (browser, etc) │
└─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ External API │
│ (Chrome, Gmail) │
└─────────────────┘
Available Daemons
| Daemon | Description | Speedup | Status |
|---|---|---|---|
| imessage | macOS iMessage via SQLite | 480x | Stable |
| browser | Chrome automation via DevTools Protocol | 292x | Stable |
| github | GitHub GraphQL + REST | 75x | Beta |
| gmail | Gmail API operations | 69x | Beta |
| calendar | Google Calendar integration | - | Beta |
| fly | Fly.io deployments | - | Alpha |
| neon | Neon Postgres | - | Alpha |
| vercel | Vercel deployments | - | Alpha |
IDE & Agent Integrations
| Platform | Guide | Status |
|---|---|---|
| Claude Code | Integration Guide | Full support |
| Cursor | Integration Guide | Full support |
| Windsurf | Coming soon | Planned |
Next Steps
- Installation Guide - Set up FGP
- Quick Start - Build your first workflow
- Claude Code Integration - Use with Claude Code
- Cursor Integration - Use with Cursor
- Protocol Reference - Understand the wire format
- Building Daemons - Create custom integrations