Cortex

Local stdio server that serves a public GitHub project's Cortex-configured docs and API specs

By Cortex Docs TypeScript Local · stdio Developer toolsKnowledge and memory

38 popularity score ★ 3.3k ↓ 66/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

Claude CodeTerminal
claude mcp add cortex -- npx -y @cortex-docs/cli mcp-serve 'https://github.com/<OWNER>/<REPO>'
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "cortex": {
      "command": "npx",
      "args": [
        "-y",
        "@cortex-docs/cli",
        "mcp-serve",
        "https://github.com/<OWNER>/<REPO>"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "cortex": {
      "command": "npx",
      "args": [
        "-y",
        "@cortex-docs/cli",
        "mcp-serve",
        "https://github.com/<OWNER>/<REPO>"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "cortex": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@cortex-docs/cli",
        "mcp-serve",
        "https://github.com/<OWNER>/<REPO>"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.cortex]
command = "npx"
args = ["-y", "@cortex-docs/cli", "mcp-serve", "https://github.com/<OWNER>/<REPO>"]
Gemini CLITerminal
gemini mcp add --scope user cortex npx -- -y @cortex-docs/cli mcp-serve 'https://github.com/<OWNER>/<REPO>'

Settings 1

GITHUB_TOKEN Optional: Optional GitHub token with read access; raises GitHub's rate limits. Signing in with `gh auth login` works instead.

What it does

Cortex is mainly a command-line tool that builds documentation sites, typed SDKs and MCP server packages from OpenAPI, AsyncAPI, GraphQL, Protocol Buffer, OpenRPC and Markdown sources. The part listed here is its `mcp-serve` command: given the address of a GitHub repository that holds a `cortex.config.yml` file on its default branch, it starts a local stdio MCP server that hands the project's documentation to an assistant.

The tools are not fixed; they are built from the repository's configuration. In the v0.1.36 source, each Markdown page listed under `docs` becomes a tool named `docs_<page title>`, and each API source with an intro page becomes `intro_<rest|websocket|graphql|openrpc>`. Every tool takes no arguments and returns the whole page; calls with arguments are rejected. The config file, the listed pages and the referenced specification files are also offered as MCP resources under `cortex://repository/...` addresses. No other files from the repository are exposed (repository-server.ts, tool-info.ts).

Before every request the server checks the default branch on GitHub. When something has changed it reloads and tells the client that the tool and resource lists have changed. If a refresh fails, the call returns an error, so the assistant never gets an old copy without knowing it. Project maintainers can use the same CLI to generate and publish a standalone MCP package that also calls the API itself; that package is a separate thing from this command.

What it needs

RuntimeNode.js 20+

Node.js 20 or later (the command runs through npx). The target must be a GitHub repository with `cortex.config.yml` at its root on the default branch, and every document it lists must exist there. Its docs describe this for public repositories. It works without signing in within GitHub's anonymous API limits; for regular use, sign in with the GitHub CLI (`gh auth login`) or set GITHUB_TOKEN with read access.

Limits

It only reads. It has no tools that call the project's API; those exist only in the separately generated and published MCP package. Tools take no arguments, so there is no search or partial read: each call returns a whole page. It serves only the pages and specs named in `cortex.config.yml`, and a repository without that file has nothing to serve. Every request checks GitHub first, so without a token heavy use runs into GitHub's anonymous rate limits, and a failed check returns an error instead of a cached page.

Who it suits

It suits developers who want an assistant to read the current docs and API specs of a project that already publishes with Cortex, or maintainers who want their own Markdown docs available over MCP with no hosting or npm publishing. It runs on your machine and only reads. Choose the project's generated MCP package instead when the assistant should call the API itself, and choose something else for repositories that have no Cortex configuration.

Similar servers