Skip to content
Scalekit Docs
Talk to an EngineerDashboard

Context7 MCP connector

API KeyAIDeveloper ToolsProductivity

Connect to Context7 MCP to fetch up-to-date, version-specific library documentation and code examples directly from the source.

Context7 MCP connector

  1. Terminal window
    npm install @scalekit-sdk/node

    Full SDK reference: Node.js | Python

  2. Add your Scalekit credentials to your .env file. 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>
  3. 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.

    1. 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-.

      Context7 dashboard showing the API Keys section with an existing key and the Create API Key button

    2. Create a connection in Scalekit

      • In the Scalekit dashboard, go to AgentKitConnectionsCreate Connection.
      • Search for Context7 MCP and click Create.
      • Note the Connection name — use this as connection_name in your code (e.g., context7mcp).
    3. 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-...' },
      })
  4. 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.actions
    const connector = 'context7mcp'
    const identifier = 'user_123'
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'context7mcp_query_docs',
    toolInput: { libraryId: 'YOUR_LIBRARYID', query: 'YOUR_QUERY' },
    })
    console.log(result)

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

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.

NameTypeRequiredDescription
libraryIdstringrequiredThe Context7-compatible library ID (e.g. '/vercel/next.js', '/mongodb/docs')
querystringrequiredThe user's question or task to retrieve relevant documentation for
schema_versionstringoptionalOptional schema version to use for tool execution
tool_versionstringoptionalOptional tool version to use for tool execution
context7mcp_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.

NameTypeRequiredDescription
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 relevance
schema_versionstringoptionalOptional schema version to use for tool execution
tool_versionstringoptionalOptional tool version to use for tool execution