Overview
Grip AI implements the Model Context Protocol (MCP) for seamless integration with external tools and services. MCP servers expose capabilities as tools that agents can invoke, from file systems and databases to APIs and cloud services.Architecture
The MCP integration consists of:- Transport layer — stdio (subprocess) and HTTP/SSE connections
- Tool discovery — Automatic detection of server capabilities
- Tool wrapping — Converting MCP tools to Grip’s Tool interface
- OAuth support — Token management and refresh for authenticated servers
Transports
stdio (Subprocess)
Spawns a subprocess and communicates via stdin/stdout:HTTP/SSE
Connects to HTTP endpoints with Server-Sent Events:Built-in Presets
Grip AI includes 14 pre-configured MCP server presets:Preset Details
Preset Details
- todoist: Task management and productivity
- excalidraw: Diagram creation and collaboration
- firecrawl: Web scraping and content extraction
- bluesky: Social media posting and management
- filesystem: File operations (read, write, search)
- git: Git repository management
- memory: Persistent key-value storage
- postgres: PostgreSQL database queries
- sqlite: SQLite database operations
- fetch: HTTP requests and API calls
- puppeteer: Browser automation
- stack: Stack Overflow search and answers
- tomba: Email finder and verification
- supabase: Supabase database and auth
CLI Usage
Tool Discovery
When a server connects, Grip automatically discovers and wraps all exposed tools:mcp_todoist_create_task, mcp_filesystem_read_file
Tool Execution
OAuth Support
Some MCP servers (like Supabase, Todoist) require OAuth authentication:- Run
grip mcp login <server_name> - Browser opens for authorization
- Token stored in
~/.grip/tokens/<server_name>.json - Tokens auto-refresh when expired
Connection Management
The MCPManager handles all server lifecycle:Configuration
Error Handling
Connection Failures
Connection Failures
When a server fails to connect:Grip continues startup with remaining servers.
Tool Execution Errors
Tool Execution Errors
Best Practices
Server Selection
Server Selection
- Use stdio for local tools (filesystem, git, sqlite)
- Use HTTP for remote services (APIs, cloud platforms)
- Enable only servers you actively use (reduces startup time)
- Test servers individually before adding to workflows
OAuth Management
OAuth Management
- Store tokens securely (never commit to git)
- Set up token refresh to avoid manual re-login
- Use environment variables for client secrets
- Rotate tokens periodically
Performance
Performance
- Stdio servers spawn processes (higher overhead)
- HTTP servers share connection pools (lower overhead)
- Disable unused servers to reduce memory footprint
- Monitor connection health via logs
Related Features
- Skills — Specialized agent knowledge
- Workflows — Orchestrate MCP tool usage
- Scheduling — Periodic MCP server interactions