codebase-context-mcp
Detects Axios HTTP calls in frontend code and matches them to backend routes for cross-stack tracing.
Enables analysis of Express routes in a codebase, extracting HTTP method, path, and file:line location.
Enables analysis of Fastify routes in a codebase, including method, path, and file:line location.
Enables analysis of Koa routes in a codebase, extracting HTTP method, path, and file:line location.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@codebase-context-mcpanalyze the architecture of this repo"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
codebase-context-mcp
한글 요약 — 코드베이스 정적 분석 결과(임포트 그래프·API 라우트·프런트-백엔드 연결)를 MCP 도구로 제공합니다 — AI 에이전트가 매번 토큰을 태워 repo를 재탐색하는 대신 지도를 갖고 시작하게 합니다. (전체 한국어 문서: README_KOR.md)
Static codebase analysis as MCP tools — give AI coding agents a map of your repo instead of letting them burn half their tokens rediscovering it file by file.
One tool call returns: file/module overview, internal import graph, HTTP routes
(Express / Fastify / Koa, with file:line), and cross-stack edges — which frontend
fetch/axios call hits which backend route.
Why
AI coding agents entering an unfamiliar codebase spend a large share of their context window
on grep/read loops just to learn the structure — and repeat it every session. Static
analysis answers most of those questions in milliseconds, deterministically, offline. This
server packages that as Model Context Protocol tools any
MCP client (Claude Code, Cursor, Cline, ...) can call.
Related MCP server: RepoMap
Quick start
git clone https://github.com/oh-namgyu/codebase-context-mcp && cd codebase-context-mcp
npm install
# as a CLI
npx codebase-context analyze /path/to/repo # markdown architecture doc
npx codebase-context analyze /path/to/repo -f mermaid # flowchart
npx codebase-context analyze /path/to/repo -f json # raw model
# as an MCP server (Claude Code)
claude mcp add codebase-context -- node /path/to/codebase-context-mcp/src/mcp.jsMCP tools
Tool | What it answers |
| "What does this codebase look like?" — full architecture map (markdown or mermaid) |
| "What HTTP endpoints exist?" — method, path, |
| "Who calls this API?" — frontend call sites matched to a route |
Example output (this section is real output for a small Express repo):
# Architecture
- Routes: 7
- Cross-stack edges: 2
- Internal import edges: 5
## Routes
- `GET /api/claims` — src/server.js:29 (express)
...
## Cross-stack edges (frontend call → backend route)
- public/app.js:12 → `GET /api/claims` (src/server.js:29)What it detects (v0.1)
Languages: JavaScript / TypeScript / JSX / TSX (Babel parser, error-tolerant)
Import graph: ESM
import+ CJSrequire, relative specifiers resolved to repo filesRoutes: Express / Fastify / Koa-router member calls (
app.get('/x', ...)) and Fastify'sroute({method, url})object form — only in files that actually import those frameworksCall sites:
fetch('/x')(incl. template literals →:param) andaxios.get('/x')Cross-stack matching: method + path segments, route
:paramsmatch any segment
Not yet: Next.js/NestJS conventions, non-JS languages, incremental caching. PRs welcome.
Configuration
Env | Default | |
|
| file cap per analysis (guards huge monorepos) |
No network access, no telemetry, nothing leaves your machine.
Development
npm test # analyzer fixtures + render snapshots + CLI e2e + MCP stdio round-tripLicense
MIT — see LICENSE. Security policy: SECURITY.md.
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Codebase intelligence for agents: 152 structured artifacts across 21 programs, one call.
Codebase intelligence for AI agents — dead code, blast radius, ownership.
Codebase graphs, caller impact analysis, and recorded project context for AI coding agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenancePersistent codebase knowledge layer for AI agents. Pre-digests codebases into structured knowledge (symbols, dependency graphs, co-change patterns, architectural decisions) and serves via MCP. 28 languages, 14 tools, ~85% token reduction.12 npm8MIT
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants with a structured, token-efficient map of a codebase's symbols, dependencies, and relationships via MCP tools like overview, query, and impact analysis.8MIT
- FlicenseNot gradedqualityDmaintenanceGive your AI coding agents superpowers — a local MCP server for fast, token-efficient code navigation, search & analysis.-
- AlicenseNot gradedqualityAmaintenanceEnables AI coding agents to query a codebase as a knowledge graph, providing token-budgeted context, search, and impact analysis via MCP tools.MIT