@penqwin/mcp
The @penqwin/mcp server provides token-efficient, AST-based structural "skeletons" of a codebase to LLM agents, reducing token usage by 80–95% compared to sending raw source files.
get_repo_index: Retrieve a compact table of contents of the entire repository, listing all tracked source files and their top-level exported symbol names (~10–20 tokens per file). Always recommended as the first call.get_folder_skeleton: Fetch structural skeletons (exports, function signatures, type definitions, doc comments) for all source files under a specified folder prefix (~50 tokens per file) — ideal for exploring a module or feature area.get_file_skeleton: Retrieve the detailed AST skeleton of a single file, including all exports with signatures, imports, class members, and JSDoc comments — useful when deep detail on one file is needed.search_symbols: Search the entire repository's AST index for files that export a specific symbol (function, class, type, or interface) by name, returning the file path, language, kind, signature, and doc comment.get_repo_stats: Obtain aggregate statistics about the repository, including total file count and a breakdown by programming language, for a quick overview of the tech stack and codebase scale.
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., "@@penqwin/mcp show me the skeleton of src/main.ts"
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.
@penqwin/mcp
An AST-based Model Context Protocol (MCP) server that provides token-efficient codebase skeletons to LLM agents (like Cursor, Claude Desktop, and Antigravity).
Instead of sending full raw source code files to the LLM, this server exposes structural "skeletons" (imports, exports, signatures, and JSDoc comments) of files and directories. This reduces token context sizes by 80% to 95% during codebase exploration and navigation.
Features & Tools
The server registers 5 core tools with the MCP protocol:
Tool Name | Description |
| Returns a compact Table of Contents of the repository (all files + top-level exported names). ~10–20 tokens/file. |
| Retrieves structural skeletons for all files matching a directory/folder prefix. |
| Retrieves the detailed structural skeleton (signatures, types, methods, parameters, and JSDocs) of a single file. |
| Queries the AST index to find files that export a specific class, function, struct, or type. |
| Returns aggregate statistics of the repository, including file counts and language breakdown. |
Related MCP server: cctx-mcp
Configuration
The MCP server is configured entirely via environment variables.
Environment Variable | Description | Example |
| Machine-to-machine API key generated from the DB |
|
| The organization ID associated with the API key |
|
| The repository owner and name to target |
|
| The REST API gateway URL of the |
|
IDE Integrations
You can integrate this MCP server with your favorite IDE using either npx (highly recommended for end-users, as it doesn't require cloning/building) or by pointing to your local build.
1. Direct Integration (via npm/npx)
This is the easiest setup for users. The IDE will automatically fetch and run the latest version of the package.
Cursor
Go to Cursor Settings -> Features -> MCP, and click + Add New MCP Server:
Name:
penqwinType:
commandCommand:
npx -y @penqwin/mcpAdd the required environment variables under the env settings.
Antigravity / Gemini Code Assistant
Add this to your mcp_config.json:
{
"mcpServers": {
"penqwin": {
"command": "npx",
"args": ["-y", "@penqwin/mcp"],
"env": {
"PENQWIN_API_KEY": "your_api_key",
"PENQWIN_ORG_ID": "your_org_id",
"PENQWIN_REPO": "your_repo",
"PENQWIN_API_URL": "https://app.penqwin.com"
}
}
}
}Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"penqwin": {
"command": "npx",
"args": ["-y", "@penqwin/mcp"],
"env": {
"PENQWIN_API_KEY": "your_api_key",
"PENQWIN_ORG_ID": "your_org_id",
"PENQWIN_REPO": "your_repo",
"PENQWIN_API_URL": "https://app.penqwin.com"
}
}
}
}2. Local Source Integration
If you have cloned the repository locally and compiled it:
Cursor
Command:
node d:/Projects/EngDoc/eng-doc-mcp/dist/index.js(Use forward slashes for Windows paths)
Antigravity / Claude Desktop
Command:
nodeArgs:
["d:/Projects/EngDoc/eng-doc-mcp/dist/index.js"]
Learn more:
Available Tools
5 toolsget_file_skeletonA
Returns the AST skeleton for a single specific source file. The skeleton includes: all exports with signatures, imports, class members, and doc comments. Use this when you need the details of one specific file after narrowing down from get_repo_index. For multiple related files, prefer get_folder_skeleton — it is one round trip.
Inputs: file (required).
get_folder_skeletonA
Returns compact AST skeletons for all source files under a given folder path prefix. Use this to understand a module or feature area without reading raw source files. Skeletons include: exports, function signatures, type definitions, and doc comments. Cost: ~50 tokens per file — much cheaper than raw source code. Tip: call get_repo_index first to discover valid folder paths.
Inputs: folder (required).
get_repo_indexA
Returns a compact table-of-contents for the repository 'myorg/myrepo'. Lists all tracked source files with their exported symbol names. ALWAYS call this FIRST before any other tool to understand the repository structure. Use the file paths returned here as input to get_folder_skeleton or get_file_skeleton. Cost: ~10-20 tokens per file — very cheap.
Inputs: include_stats.
get_repo_statsA
Returns aggregate statistics for the repository 'myorg/myrepo'. Includes: total file count and a breakdown by programming language. Use this to understand the tech stack and scale of the codebase at a glance.
Inputs: no named parameters.
search_symbolsA
Searches the entire repository for files that export a specific symbol name. Use this to find where a function, class, type, or interface is defined. Returns: file path, language, kind (function/class/type/etc.), signature, and doc comment. Example: search for 'createClient' to find all files that export a function by that name.
Inputs: symbol (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct aspect of repository exploration (index, stats, file skeleton, folder skeleton, symbol search) with clear instructions to avoid overlap.
Most tools follow the get_* pattern, but search_symbols deviates slightly. Overall pattern is clear and predictable.
Five tools cover the essential needs for repository exploration without being excessive or insufficient.
The set covers structure overview, detailed file analysis, and symbol search, meeting common code exploration needs.
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Codebase intelligence for agents: 152 structured artifacts across 21 programs, one call.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Codebase knowledge graph — architectural awareness for AI coding agents via MCP
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server that reduces token consumption in AI coding assistants by up to 90% via structural reads, PreToolUse hooks, and tp-\* subagents.25315 npm5MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides structure-aware code analysis (symbol trees, dependencies, docs) to reduce AI agent token consumption by up to 99%, along with Git commit intelligence.MIT
- AlicenseNot gradedqualityBmaintenanceToken-efficient code intelligence MCP server that indexes codebases with tree-sitter AST parsing and provides 150 tools for AI agents, using 61-95% fewer tokens than traditional grep/Read workflows.850 npm4Business Source 1.1
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides ultra-efficient code exploration through AST analysis, reducing LLM token usage by up to 95% while enabling instant call graph generation and dependency analysis for massive codebases.MIT