Penqwin
About
An AST-based Model Context Protocol (MCP) server that provides token-efficient codebase skeletons to LLM agents (like Cursor, Claude Desktop, and Antigravity).
Details
- Author
- sarinmsari
- Downloads
- 148
- Categories
- AI
Jump to
- Five MCP tools: get_repo_index, get_folder_skeleton, get_file_skeleton, search_symbols, get_repo_stats.
- AST-based extraction reduces token context by 80–95%.
- Requires Node.js v18+ and an active eng-doc backend server.
- Configurable entirely via environment variables.
- Integrates with Cursor, Claude Desktop, and Antigravity/Gemini Code Assistant.
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
PenqwinCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install via npm install @penqwin/mcp and build with npm run build. Configure environment variables (PENQWIN_API_KEY, PENQWIN_ORG_ID, PENQWIN_REPO, PENQWIN_API_URL) and integrate with your IDE using npx or by pointing to the local build. Run node dist/index.js to start the stdio server.
get_repo_index
Returns a compact table-of-contents for the repository 'YOUR GITHUB REPO URL'. 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.
get_folder_skeleton
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.
get_file_skeleton
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.
search_symbols
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.
get_repo_stats
Returns aggregate statistics for the repository 'YOUR GITHUB REPO URL'. 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.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"penqwin": {
"penqwin": {
"command": "npx",
"args": [
"-y",
"@penqwin/mcp"
],
"env": {
"PENQWIN_API_KEY": "YOUR PENQWIN API KEY",
"PENQWIN_ORG_ID": "YOUR PENQWIN ORG ID",
"PENQWIN_REPO": "YOUR GITHUB REPO URL",
"PENQWIN_API_URL": "https://app.penqwin.com"
}
}
}
}
}
McpServers
{
"penqwin": {
"command": "npx",
"args": [
"-y",
"@penqwin/mcp"
],
"env": {
"PENQWIN_API_KEY": "YOUR PENQWIN API KEY",
"PENQWIN_ORG_ID": "YOUR PENQWIN ORG ID",
"PENQWIN_REPO": "YOUR GITHUB REPO URL",
"PENQWIN_API_URL": "https://app.penqwin.com"
}
}
}
@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 |
| :--- | :--- |
| get_repo_index | Returns a compact Table of Contents of the repository (all files + top-level exported names). ~10–20 tokens/file. |
| get_folder_skeleton | Retrieves structural skeletons for all files matching a directory/folder prefix. |
| get_file_skeleton | Retrieves the detailed structural skeleton (signatures, types, methods, parameters, and JSDocs) of a single file. |
| search_symbols | Queries the AST index to find files that export a specific class, function, struct, or type. |
| get_repo_stats | Returns aggregate statistics of the repository, including file counts and language breakdown. |
---
Requirements
Node.js (v18+)
An active eng-doc backend server (running locally or in production)
- A valid API key generated from the
eng-docplatform
---
Configuration
The MCP server is configured entirely via environment variables.
| Environment Variable | Description | Example |
| :--- | :--- | :--- |
| PENQWIN_API_KEY | Machine-to-machine API key generated from the DB | ed_live_0e21cf14... |
| PENQWIN_ORG_ID | The organization ID associated with the API key | 0db9f7b5-7206-4f4e-a61b-509d2a0b0a09 |
| PENQWIN_REPO | The repository owner and name to target | sarinmsari/daily-astrology |
| PENQWIN_API_URL | The REST API gateway URL of the eng-doc backend | http://localhost:3000 (or production URL) |
---
Setup & Running
1. Install Dependencies
npm install
2. Build the Server
The project usestsup to bundle the TypeScript code into a single executable bundle:
npm run build
This generates dist/index.js.
3. Run Locally (via Stdio)
To test the server on the command line: ```bashSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
