Skip to main content
MCP server CX Codex

knock — Claude Code MCP server: what it does, how to install

The knock MCP server provides a code map and memory for AI coding agents locally without an API key.

Apache-2.0 ★ 5 updated 2026-11-04

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add knock -- uvx knock-mcp
Open on GitHub

What knock does

The server gives the agent a skeleton of the codebase with exact line ranges and callers to reduce token consumption during investigations. It indexes files on your machine and updates notes when code changes.

Running it requires uv or Python, plus the CLI registration command for your tool. It tracks whether notes are fresh or stale and stores findings between sessions.

Setup is done via claude mcp add knock -- uvx knock-mcp inside the repository directory.

What it helps with

  • map code structure for AI agents
  • retain memory between coding sessions
  • reduce file reading overhead
  • track stale notes in the repository

Example prompts for the agent

  • Add rate limiting to the login endpoint
  • Where are expired checkouts cleaned up?
  • Why do tests fail with a Redis error?

How to install knock

Platform CLI

claude mcp add knock -- uvx knock-mcp

uvx runs the command named after the package; if the README names another one, use uvx --from knock-mcp <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about knock

How to install knock in Claude Code?

Run claude mcp add knock -- uvx knock-mcp in your project terminal.

What does knock do?

It feeds a concise code map and persistent memory to your AI coding agent, reducing token usage.

What is required to run knock?

It runs 100% locally and requires uv or Python along with the knock-mcp package.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open