@penqwin/mcp
An AST-based MCP server that provides token-efficient codebase skeletons to LLM agents, reducing context token usage by 80-95% by exposing structural information instead of full source files.
README
@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-docbackend 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 uses tsup 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:
# PowerShell
$env:PENQWIN_API_KEY="your_key"
$env:PENQWIN_ORG_ID="your_org"
$env:PENQWIN_REPO="your_repo"
$env:PENQWIN_API_URL="http://localhost:3000"
node dist/index.js
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:
penqwin - Type:
command - Command:
npx -y @penqwin/mcp - Add 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:
node - Args:
["d:/Projects/EngDoc/eng-doc-mcp/dist/index.js"]
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.