{
  "version": 3,
  "summary": "Context7 provides up-to-date, version-specific documentation and code examples for software libraries, delivered to AI coding agents via a REST API, a hosted MCP server, and the ctx7 CLI. Anonymous access works at low rate limits; an API key or OAuth login raises limits and enables private repositories.",
  "credentials": {
    "apiKey": {
      "type": "api_key",
      "label": "Context7 API key",
      "generateUrl": "https://context7.com/dashboard",
      "setup": "Create a free account at [context7.com/dashboard](https://context7.com/dashboard) and generate an API key. Search and docs endpoints also work anonymously at low rate limits, but a key is required for higher rate limits, some endpoints (e.g. adding libraries), and private repositories. On the REST API send it as `Authorization: Bearer <key>`; on the MCP server send it as a `CONTEXT7_API_KEY` header; for the CLI run `ctx7 login` or `ctx7 setup --api-key <key>`. See the [API guide](https://context7.com/docs/api-guide)."
    },
    "oauth": {
      "type": "oauth2",
      "label": "Context7 OAuth",
      "setup": "MCP clients can authenticate interactively via OAuth 2.0 instead of an API key. Discovery is standard: the MCP endpoint publishes RFC 9728 metadata at `https://mcp.context7.com/.well-known/oauth-protected-resource`, pointing at the authorization server `https://context7.com` (RFC 8414 metadata at `/.well-known/oauth-authorization-server`). See [Set Up OAuth](https://context7.com/docs/howto/oauth)."
    }
  },
  "surfaces": [
    {
      "type": "http",
      "slug": "context7-api",
      "name": "Context7 REST API",
      "docs": "https://context7.com/docs/api-guide",
      "url": "https://context7.com/api",
      "spec": "https://context7.com/openapi.json",
      "basis": {
        "via": "declared",
        "source": "https://context7.com/.well-known/integrations.json"
      },
      "auth": {
        "status": "required",
        "entries": [
          {
            "use": [
              {
                "id": "apiKey",
                "mechanics": {
                  "source": "http",
                  "in": "header",
                  "headerName": "Authorization",
                  "scheme": "Bearer"
                }
              }
            ],
            "basis": {
              "via": "declared",
              "source": "https://context7.com/.well-known/integrations.json"
            }
          }
        ]
      }
    },
    {
      "type": "mcp",
      "slug": "context7-mcp",
      "name": "Context7 MCP Server",
      "docs": "https://context7.com/docs/resources/all-clients",
      "url": "https://mcp.context7.com/mcp",
      "transports": ["streamable-http"],
      "basis": {
        "via": "declared",
        "source": "https://context7.com/.well-known/integrations.json"
      },
      "auth": {
        "status": "required",
        "entries": [
          {
            "use": [
              {
                "id": "apiKey",
                "mechanics": {
                  "source": "http",
                  "in": "header",
                  "headerName": "CONTEXT7_API_KEY"
                }
              }
            ],
            "basis": {
              "via": "declared",
              "source": "https://context7.com/.well-known/integrations.json"
            }
          },
          {
            "use": [
              {
                "id": "oauth",
                "mechanics": {
                  "source": "well-known"
                }
              }
            ],
            "basis": {
              "via": "declared",
              "source": "https://context7.com/.well-known/integrations.json"
            }
          }
        ]
      }
    },
    {
      "type": "cli",
      "slug": "ctx7-cli",
      "name": "ctx7 CLI",
      "docs": "https://context7.com/docs/clients/cli",
      "command": "ctx7",
      "packages": [
        {
          "registryType": "npm",
          "identifier": "ctx7",
          "runtimeHint": "npx"
        }
      ],
      "basis": {
        "via": "declared",
        "source": "https://context7.com/.well-known/integrations.json"
      },
      "auth": {
        "status": "required",
        "entries": [
          {
            "use": [
              {
                "id": "apiKey",
                "mechanics": {
                  "source": "cli",
                  "command": "ctx7 login"
                }
              }
            ],
            "basis": {
              "via": "declared",
              "source": "https://context7.com/.well-known/integrations.json"
            }
          }
        ]
      }
    }
  ]
}
