code-knowledge

code-knowledge

Drops two local, zero-egress MCP servers (Serena for LSP and CodeGraph for call/import graph) into Claude Code, enabling code navigation and analysis without API keys or data leaving the machine.

Category
Visit Server

README

code-knowledge

Drop the Serena + CodeGraph code-intelligence MCP layer into Claude Code — in any repo, in seconds. Two local, zero-egress servers (no API keys, nothing leaves the machine), configured to auto-track @latest and auto-start everywhere.

  • Serena — LSP: symbols, definitions, references, rename-safe edits. Live language server, so it's always fresh (no stored index). Needs uv on PATH.
  • CodeGraph — tree-sitter → SQLite call/import graph + symbol search. Returns verbatim source with callers + blast-radius. Self-syncing — a file watcher re-indexes on every save.

Self-contained: zero dependencies, plain Node ≥20, runs from any working directory.

Two ways to install (use both)

1. Personal — every repo, automatically (user scope)

Registers both servers at Claude Code user scope, so they auto-start in every project you open — no per-repo config. Run once per machine. Also adds .codegraph/ + .serena/ to your global gitignore so no repo needs its own entry.

node code-knowledge.js global

2. Team-shareable — per repo (checked-in .mcp.json)

Run inside a repo. Writes/merges .mcp.json (preserving any other servers), gitignores the index dirs, pre-builds the CodeGraph index, and appends a short "query these before grep" note to CLAUDE.md. Commit .mcp.json + CLAUDE.md and your teammates inherit it on clone.

cd /path/to/other-repo
node /path/to/code-knowledge.js repo          # flags: --no-index, --no-claude-md

Both at once

node code-knowledge.js both

Check your environment

node code-knowledge.js doctor

After any install: RESTART Claude Code, then run /mcp. MCP servers attach on restart, not mid-session. Project scope (.mcp.json) also prompts once to trust the repo's servers; user scope is trusted once.

Reuse it from anywhere

Published at https://github.com/bhanutejaI4E/code-knowledge — run from any repo, no clone:

npx -y github:bhanutejaI4E/code-knowledge doctor   # check environment
npx -y github:bhanutejaI4E/code-knowledge repo     # set up the current repo
npx -y github:bhanutejaI4E/code-knowledge global   # user scope (once per machine)

Or copy this folder next to your projects and call it by path (examples above). Forking it? Swap the handle for your own GitHub username.

The @latest policy (and its cost)

Both servers deliberately track the newest release:

  • CodeGraph@colbymchenry/codegraph@latest — npx re-checks npm on each start.
  • Serenauvx --refresh … — uvx re-resolves the git source on each start.

Trade-off: each launch does a quick upstream check (a little startup latency + needs network), and an occasional CodeGraph version bump may want a fresh init if its index schema changes. If a bad release ever lands, pin a server to an exact version in lib/servers.js (e.g. @colbymchenry/codegraph@1.1.6, or a Serena git tag) and re-run the installer.

Files

File Role
code-knowledge.js CLI entry / command dispatch
lib/servers.js Single source of truth for both server definitions
lib/commands/global.js User-scope registration + global gitignore
lib/commands/repo.js Per-repo .mcp.json / gitignore / index / CLAUDE.md
lib/commands/doctor.js Prerequisite + registration report
lib/prereqs.js, lib/util.js Shared helpers
templates/claude-snippet.md The CLAUDE.md guidance block

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured