Context7 MCP connector
API KeyAIDeveloper ToolsProductivityConnect to Context7 MCP to fetch up-to-date, version-specific library documentation and code examples directly from the source.
Context7 MCP connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret> -
Set up the connector
Section titled “Set up the connector”Register your Context7 MCP credentials with Scalekit so it can authenticate requests on your behalf. You do this once per environment.
Dashboard setup steps
Register your Context7 API key with Scalekit so it can authenticate and proxy documentation requests on behalf of your users. Context7 MCP uses API key authentication — there is no redirect URI or OAuth flow.
-
Get a Context7 API key
- Go to context7.com and sign in to your account.
- Navigate to the API Keys section in the dashboard.
- Click Create API Key… and give it a name (e.g.
Agent Auth). - Copy the generated key — it starts with
ctx7sk-.

-
Create a connection in Scalekit
- In the Scalekit dashboard, go to AgentKit → Connections → Create Connection.
- Search for Context7 MCP and click Create.
- Note the Connection name — use this as
connection_namein your code (e.g.,context7mcp).
-
Add a connected account
Connected accounts link a specific user identifier in your system to a Context7 API key. Add them via the dashboard for testing, or via the Scalekit API in production.
Via dashboard (for testing)
- Open the connection and click the Connected Accounts tab → Add account.
- Fill in Your User’s ID and API Key, then click Save.
Via API (for production)
await scalekit.connect.upsertConnectedAccount({connectionName: 'context7mcp',identifier: 'user@example.com',credentials: { apiKey: 'ctx7sk-...' },})scalekit_client.connect.upsert_connected_account(connection_name="context7mcp",identifier="user@example.com",credentials={"api_key": "ctx7sk-..."},)
-
-
Make your first call
Section titled “Make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'context7mcp'const identifier = 'user_123'// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'context7mcp_query_docs',toolInput: { libraryId: 'YOUR_LIBRARYID', query: 'YOUR_QUERY' },})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "context7mcp"identifier = "user_123"# Make your first callresult = actions.execute_tool(tool_input={"libraryId":"YOUR_LIBRARYID","query":"YOUR_QUERY"},tool_name="context7mcp_query_docs",connection_name=connection_name,identifier=identifier,)print(result)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Id resolve library — Search for a library by name and resolve it to a Context7-compatible library ID
- Query docs — Fetch up-to-date, version-specific documentation and code examples for a library using its Context7 ID
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
context7mcp_query_docs#Fetch up-to-date, version-specific documentation and code examples for a library using its Context7 ID. Returns relevant docs for the given query to help answer questions about a specific library, API, or framework.4 params
Fetch up-to-date, version-specific documentation and code examples for a library using its Context7 ID. Returns relevant docs for the given query to help answer questions about a specific library, API, or framework.
libraryIdstringrequiredThe Context7-compatible library ID (e.g. '/vercel/next.js', '/mongodb/docs')querystringrequiredThe user's question or task to retrieve relevant documentation forschema_versionstringoptionalOptional schema version to use for tool executiontool_versionstringoptionalOptional tool version to use for tool executioncontext7mcp_resolve_library_id#Search for a library by name and resolve it to a Context7-compatible library ID. Use this before calling context7mcp_query_docs when you have a library name but not its Context7 ID.4 params
Search for a library by name and resolve it to a Context7-compatible library ID. Use this before calling context7mcp_query_docs when you have a library name but not its Context7 ID.
libraryNamestringrequiredThe name of the library or framework to search for (e.g. 'Next.js', 'React', 'MongoDB')querystringrequiredThe user's question or task to help rank library results by relevanceschema_versionstringoptionalOptional schema version to use for tool executiontool_versionstringoptionalOptional tool version to use for tool execution