@penqwin/mcp

@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.

Category
访问服务器

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-doc backend server (running locally or in production)
  • A valid API key generated from the eng-doc platform

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"]

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选