API KEY
DEVELOPER TOOLS
Up-to-date library documentation, version-specific code examples, and API references your coding agent needs live in Context7. Context7 MCP gives your agent per-user API key access to live documentation scoped to the authorizing developer account.
Resolve a library name to its Context7 identifier.
Fetch version-specific documentation for a library.
// Scalekit AgentKit — framework-agnostic
import { ScalekitClient } from "@scalekit/sdk";
const client = new ScalekitClient();
const token = await client.connections.getToken("context7mcp", userId);
const mcp = new MCPClient({ token });// OpenAI SDK
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit/sdk";
const sk = new ScalekitClient();
const token = await sk.connections.getToken("context7mcp", userId);
const client = new OpenAI();
const resp = await client.responses.create({ tools: [{ type: "mcp", server_url: mcpUrl, headers: { Authorization: `Bearer ${token}` } }] });// Anthropic SDK
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit/sdk";
const sk = new ScalekitClient();
const token = await sk.connections.getToken("context7mcp", userId);
const client = new Anthropic();
const resp = await client.beta.messages.create({ mcp_servers: [{ url: mcpUrl, authorization_token: token }] });// Google GenAI SDK
import { GoogleGenAI } from "@google/genai";
import { ScalekitClient } from "@scalekit/sdk";
const sk = new ScalekitClient();
const token = await sk.connections.getToken("context7mcp", userId);
const ai = new GoogleGenAI();
const resp = await ai.models.generateContent({ tools: [{ mcpServers: [{ serverUrl: mcpUrl, httpOptions: { headers: { Authorization: `Bearer ${token}` } } }] }] });