Skip to main content
Glama

npm npm downloads CI License: Apache 2.0

Quick Start  ·  Tools  ·  Configuration  ·  vs Context7

Why you want this

Your AI assistant learned a library from training data that is months or years old. So it writes code against an API that moved, invents options that never existed, and hands you snippets for a version you're not running. You catch it in review, or worse, in production.

Context7 saw this first and solved part of it: a hosted index of curated docs snippets, which already beats stale training data for popular libraries. But a hosted corpus can't pin to the exact commit you're on, reach a package inside a monorepo or your own private repo, or reflect a version that shipped an hour ago.

ctxpeek fixes the root cause. It is a local MCP server that pulls the actual docs from the actual repo, pinned to the version you name, and hands them to your assistant before it answers. You keep working in plain language. The right files show up underneath.

What that gets you:

  • Answers you can trust. Your assistant works from the live repo at the ref you name, so its code matches the version you actually run.

  • The version you pick. owner/repo@v15.0.0, @main, or @<sha> all read the matching git snapshot, down to a branch you pushed five minutes ago.

  • Any public repo on GitHub, GitLab, or Bitbucket, including your own.

  • Nothing leaves your machine. The cache and every fetch run locally. No telemetry, no query logging.

  • Free to run. Works anonymously, or add a GitHub token for higher rate limits.

Related MCP server: devdocs-mcp

Quick Start

1. Add ctxpeek to your MCP client

Claude Code

claude mcp add --transport stdio --scope user ctxpeek -- npx -y ctxpeek

Run /mcp inside Claude Code to confirm it connected.

Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project):

{
  "mcpServers": {
    "ctxpeek": {
      "command": "npx",
      "args": ["-y", "ctxpeek"]
    }
  }
}

Add to .vscode/mcp.json:

{
  "servers": {
    "ctxpeek": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "ctxpeek"]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "ctxpeek": {
      "command": "npx",
      "args": ["-y", "ctxpeek"]
    }
  }
}
codex mcp add ctxpeek -- npx -y ctxpeek
{
  "mcpServers": {
    "ctxpeek": {
      "command": "npx",
      "args": ["-y", "ctxpeek"]
    }
  }
}

npx is a .cmd shim on Windows and some clients can't spawn it directly. Wrap it with cmd /c:

{
  "mcpServers": {
    "ctxpeek": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "ctxpeek"]
    }
  }
}

2. Just ask

No special syntax. Ask the way you already do, and your assistant picks the right ctxpeek tool on its own.

"Set up Drizzle ORM with Postgres in Next.js 15 server actions"
"Show me the routing docs from vercel/next.js@v15.0.0"
"Search tailwindlabs/tailwindcss@main for 'arbitrary values'"
"Use the latest vercel/ai@main API to wire up a streaming endpoint"

When you want to pin an exact repo, ref, or subfolder, name it in this format:

[forge:]owner/repo[@ref][#subpath]

vercel/next.js                                          // main HEAD
vercel/next.js@v15.0.0                                  // tagged release
vercel/next.js@canary                                   // branch
vercel/next.js@a3b1f7c                                  // commit sha
tailwindlabs/tailwindcss@main#packages/tailwindcss/docs // monorepo subfolder
gitlab:gitlab-org/gitlab@master                         // GitLab (alias: gl:)
bitbucket:atlassian/python-bitbucket                    // Bitbucket (alias: bb:)

You can also name a library the way you'd say it out loud. ctxpeek resolves fuzzy names for you ("drizzle orm"drizzle-team/drizzle-orm).

Authentication (optional)

ctxpeek works with no token at all. Add a GitHub token only if you hit rate limits. It looks for one in this order and uses the first it finds:

  1. --token <pat> flag

  2. $GITHUB_TOKEN env var

  3. gh auth token (if you're logged into the GitHub CLI)

  4. Anonymous

Run npx -y ctxpeek doctor to check your setup and see which path won.

Tools

Your assistant calls these for you. You rarely need to name them.

resolve_repo  // "drizzle orm" → drizzle-team/drizzle-orm, with the latest release tag.
list_docs     // The docs tree for a repo, with size and freshness hints.
fetch_doc     // One doc file at a pinned commit. Supports partial reads.
peek          // Quick look at a file, or grep inside it for a query.
get_changes   // What changed in a file between two refs.
changelog     // The CHANGELOG slice between two refs.
related_repos // "Often used with…" peer libraries.
get_issues    // Search issues / PRs, or read one in full.

Full reference: docs/reference/tools.md.

vs Context7

Context7 answers from a hosted docs corpus: resolve a library ID, ask about a topic, get curated snippets.

ctxpeek answers from a git snapshot: you name a repo and ref, and your assistant reads the exact files at that version.

The difference shows up when your question depends on which branch, tag, or commit the docs came from: a version that just shipped, a package inside a monorepo, or your own unreleased library. If you'd rather have ranked snippets across a curated index of popular libraries, Context7 is the better fit.

Long-form comparison (vs Context7, GitMCP, Ref Tools): docs/comparison.md.

Configuration

ctxpeek runs with zero config. To customize, drop a .ctxpeek.toml in your project or ~/.config/ctxpeek/config.toml:

[cache]
dir      = "~/.cache/ctxpeek"
max_size = "1GiB"
gc_days  = 14

[fetch]
prefer_cdn = true

Full reference: docs/reference/configuration.md.

Recipes let you pre-warm a whole stack of pinned repos with one command, handy for putting your team on a known-good set of versions. See docs/guides/recipes.md.

Privacy

ctxpeek talks only to the hosts it needs, only when you use them:

  • api.github.com, cdn.jsdelivr.net

  • gitlab.com, api.bitbucket.org (only for gitlab: / bitbucket: specs)

  • Package registries like npm and PyPI (only when resolving a fuzzy name)

No telemetry, no analytics. Your queries never leave your machine except as the URL path to those hosts.

Security posture and threat model: SECURITY.md.

When not to use ctxpeek

  • You need symbol-level navigation (where is useState defined?) - use github-mcp-server.

  • You want to write to a repo (open issues, create PRs) - ctxpeek is read-only by design.

  • You want ranked snippets across a curated hosted index - that's Context7's strength.

Documentation

Getting started

Install and first session

Tools reference

Every tool's input / output

Configuration

All config keys

Repo spec grammar

The owner/repo[@ref][#subpath] format

Authentication

Tokens, gh auth, anonymous mode

Recipes

Stack bundles

Caching

What's cached, where, for how long

Troubleshooting

Windows, ENOENT, rate limits

Comparison

ctxpeek vs Context7 vs GitMCP vs Ref Tools

Architecture

How it works inside

Contributing

Dev setup, conventions

Contributing

ctxpeek is free and built in the open. Setup, conventions, and CI gates live in CONTRIBUTING.md.

If your team relies on it, sponsoring covers maintenance and the next round of features.

License

Apache-2.0. Apache over MIT for the explicit patent grant.

A
license - permissive license
-
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
1wRelease cycle
4Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ruwadgroup/ctxpeek'

If you have feedback or need assistance with the MCP directory API, please join our Discord server