$ show exa-labs/exa-mcp-server
Exa MCP Server is a Model Context Protocol server that connects AI agents to Exa's web search and research capabilities. It provides a standardized interface for agents to perform web searches, fetch webpage content, run multi-step research agents, and access other Exa functionalities. The architecture features clear separation of concerns with API handlers for Vercel deployment, core MCP server logic, tool implementations for each Exa capability, and utility functions for authentication, logging, and error handling. Key entry points include stdio CLI for local usage and Vercel HTTP functions for cloud deployment. The system handles authentication via API keys or OAuth, implements rate limiting for free tier users, and includes mechanisms to prevent API key leakage between requests.
The LLM identified 5 files worth highlighting for reuse:
Handles OAuth JWT verification for Exa authentication with proper JWKS caching and issuer/audience validation. Demonstrates secure token verification patterns that prevent authentication bypass while caching JWKS keys for performance. Can be extracted to any Node.js application needing to verify Exa OAuth tokens with minimal modification.
Processes and sanitizes MCP client metadata according to specification with proper truncation, escaping, and serialization. Shows expertise in handling metadata fields while preventing injection attacks and ensuring compliance with MCP standards. The pure functions are highly reusable in any MCP server implementation with zero dependencies.
Sanitizes Exa API responses by removing sensitive keys while preserving useful data in nested structures. Demonstrates careful recursive sanitization that maintains data utility while preventing leakage of internal fields like requestTags. The implementation is framework-independent and could be used in any Exa API integration.
Creates Exa API clients with proper integration headers including MCP metadata and OAuth support. Shows skill in handling both API key and OAuth authentication flows while constructing headers that comply with Exa's reporting requirements. The component is loosely coupled and reusable in projects needing to call Exa API with contextual metadata.
Tracks Exa Agent run progress with coalescing, throttling, and state management for long-running processes. Demonstrates advanced state handling that balances real-time updates with performance through intelligent message coalescing. The self-contained state machine is reusable for tracking any long-running operation with progress reporting.