---
title: Context7
description: Look up up-to-date, version-specific library docs and code examples.
url: "https://eve.dev/integrations/context7"
docs_index: /llms.txt
type: connection
keywords:
  - mcp
  - documentation
  - library docs
  - code examples
  - api reference
  - coding agent
  - Upstash
  - api key
---

> For an index of all documentation, see [/llms.txt](/llms.txt).

Connection integration for eve. Look up up-to-date, version-specific library docs and code examples.

## Install

Add the connection from eve's registry. This writes the initial definition under `agent/connections/` and installs its authentication dependency when needed:

```bash
eve add connection/context7
```

## Quick start

Create `agent/connections/context7.ts`. The connection name is derived from the filename:

```ts
// agent/connections/context7.ts
import { defineMcpClientConnection } from "eve/connections";

const apiKey = process.env.CONTEXT7_API_KEY;

export default defineMcpClientConnection({
  url: "https://mcp.context7.com/mcp",
  description: "Context7: up-to-date, version-specific library documentation and code examples.",
  auth: apiKey ? { getToken: async () => ({ token: apiKey }) } : undefined,
  tools: { allow: ["resolve-library-id", "query-docs"] },
});
```

The allowlist limits the connection to Context7's two read-only documentation tools, `context7__resolve-library-id` and `context7__query-docs`, even if the server adds more tools later. For a named library, the agent resolves its Context7 library ID first, then queries the docs with that ID. A prompt that already includes an ID such as `/vercel/next.js` can skip straight to `query-docs`.

## Configure

### MCP · API key

Set `CONTEXT7_API_KEY` as a server-side environment variable:

```bash
CONTEXT7_API_KEY=your_api_key
```

Create a free API key in the [Context7 dashboard](https://context7.com/dashboard?tab=settings). eve sends it as an Authorization Bearer token, and Context7 uses it to apply your plan's limits. The connection still works without a key, at Context7's anonymous limits. Vercel Connect is not required.

See the [Connections docs](/docs/connections) for principal types, headers, approval, and protocol-specific filters.

[Read the full connection documentation](https://context7.com/docs/integrations/eve)

---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/llms.txt](/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/agents.md](/agents.md)