Context7 MCP

eve

Filesystem-first framework for building durable AI agents
2 min read

eve is Vercel's filesystem-first framework for building durable AI agents. By adding Context7 as an MCP connection, an eve agent can retrieve up-to-date, version-specific library documentation and code examples while it works.

For more details on how eve handles MCP connections, see the eve MCP connections documentation.

Setup#

Create the Context7 connection

Create agent/connections/context7.ts in your eve project:

The API key is optional, so the connection can use Context7's anonymous limits when CONTEXT7_API_KEY is not set. For higher rate limits, create an API key in the Context7 dashboard.

Configure an API key (recommended)

Add the key to .env.local for local development. Do not commit this file.

For a deployed eve agent, add the same variable to the linked Vercel project and pull it locally:

eve's getToken callback sends the value as an Authorization: Bearer token. Vercel Connect is not required when using an API key.

Verify the connection

Inspect the agent and confirm that it compiles with 0 errors and 0 warnings:

Then start the agent and ask a documentation question. When the connection is used, eve discovers only the two tools in the allowlist:

How It Works#

The filename registers the connection as context7. eve discovers the remote MCP tools and makes them available as context7__resolve-library-id and context7__query-docs when the model searches for a relevant connection.

The allowlist keeps the connection limited to Context7's documentation tools, including if the server adds more tools later. Both tools are read-only, so they do not require an approval gate.

When a request names a library, the agent first calls resolve-library-id to find its Context7 library ID, then calls query-docs with that ID and the user's specific question. If the prompt already includes a Context7 library ID such as /vercel/next.js, the agent can call query-docs directly.