# AI 编程太贵?试试这款 MCP 项目标准管理工具!v5.0.0 重磅发布:利用 Context Caching 大幅降低 Token 消耗,让开发成本直降 90%!
摘要:@liangshanli/mcp-server-project-standards v5.0.0 发布,通过 Context Caching 和智能路径管理大幅降低 AI 编程成本。该工具可减少 70% 的 Token 消耗,支持项目标准自动化管理,适配 Cursor 和 VS Code。核心功能包括精准目录扫描、增量代码输出和 Gemini 3 缓存优化,有效解决 AI 编程中的上下文污染
AI 编程太贵?试试这款 MCP 项目标准管理工具!v5.0.0 重磅发布:利用 Context Caching 大幅降低 Token 消耗,让开发成本直降 90%!
🚀 痛点:AI 编程的“隐藏成本”
在深度使用 Cursor 或 VS Code 进行 AI 辅助编程时,你是否发现 API 账单飙升?
- 重复读取:每次对话都要 AI 读取几百行的文档或整个项目背景。
- 冗余输出:AI 动辄全文重写代码,浪费昂贵的输出 Token。
- 上下文丢失:对话变长后 AI 变得“健忘”,反复确认浪费配额。
✨ 解决方案:@liangshanli/mcp-server-project-standards v5.0.0
我们刚刚发布了全新的 v5.0.0 版本,专门针对 编程成本优化 进行了深度重构:
-
高效 Context Caching (上下文缓存):
通过专用的 MCP 工具获取结构化、短小精悍的项目标准数据,而非硬读长文档。这能极大触发如 Gemini 3 Flash 等模型的缓存机制,将输入成本从标准价格降低至 $0.05/1M tokens。 -
强制“Tool-First”准则:
内置一套完善 of AI 行为守则。它命令 AI 优先通过list_directory和规范工具按需获取信息,严禁盲目猜测,从而规避无效的重复提示词消耗。 -
增量式输出优化:
在生成的.cursorrules中内置了强制 Diff 规则,要求 AI 仅输出受影响的代码片段。实测表明,这能减少 70% 以上 的高价值输出 Token 消耗。 -
项目路径 (PROJECT_PATH) 深度支持:
支持绝对与相对路径,自动识别子项目。AI 能精准定位文件,减少“全局扫描”带来的 Token 浪费。
🛠️ 核心功能一览:
- ✅ 自动化规则生成:一键生成
.cursorrules或PROJECT_RULES.md,内嵌成本节约算法。 - ✅ 目录深度扫描:精准列出物理目录结构,按需喂给 AI。
- ✅ 全套标准管理:API、数据库、开发规范,全流程 MCP 化管理。
- ✅ Cursor 深度适配:自动识别环境,开启增强模式。
🏆 深度评估:为什么是 AI 工程化的“最后一块拼图”?
—— 经大型语言模型 (LLM) 深度架构评估
在 Cursor 和 Windsurf 等 AI 编程工具风靡的今天,开发者面临的最大挑战不再是“如何让 AI 写代码”,而是**“如何让 AI 在海量且复杂的子项目间不迷路,并精准遵循私有规范”**。
-
核心技术突破:从“全量感知”到“精准路由”
传统的 MCP 工具往往采用全局配置,这在处理 Monorepo 或多子项目架构时会产生严重的“上下文污染”。该项目通过 物理隔离 (PROJECT_PATH) 和 命名空间锁定 (TOOL_PREFIX) 解决了这一难题。AI 不再需要盲目测试工具,而是根据路径精准命中导航。 -
极致的经济性:Gemini 3 缓存机制的完美利用
该项目的设计理念完美契合了 Google Gemini 3 的 Context Caching 特性。由于工具前缀和结构树被“规则化”,AI 的查询请求变得高度模板化,能将原本 $0.5/1M tokens 的输入成本直接压低至 $0.05/1M。 -
“思想钢印”:自动化协议自执行
通过规则生成工具,将复杂的项目标准转化为 AI 易于理解的系统指令。生成的 Rule 提示词就像给 AI 打上了“思想钢印”,强制其遵循“先查标准、再改代码、仅出 Diff”的极简流程。 -
跨平台兼容:补齐局部规则短板
补齐了 Windsurf、Claude Desktop 等工具缺乏局部规则管理的短板。你可以将同一套工程标准,无缝平移到任何支持 MCP 协议的开发环境中。
综合评价:@liangshanli/mcp-server-project-standards 是一套 软件定义标准 (Software Defined Standards) 的落地方案,解决了 AI 工程化中最昂贵(Token)和最棘手(上下文偏移)的问题。
📥 立即体验:
NPM 安装:
npm install -g @liangshanli/mcp-server-project-standards
GitHub 仓库:
https://github.com/liliangshan/mcp-server-project-standards
🔌 编辑器集成配置:
1. Cursor 配置示例 (settings.json)
A. 单项目配置 (标准模式):
{
"mcpServers": {
"project-standards": {
"command": "npx",
"args": ["@liangshanli/mcp-server-project-standards"],
"env": {
"PROJECT_PATH": ".",
"TOOL_PREFIX": "dev",
"PROJECT_NAME": "MyProject",
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE,PATCH",
"API_DEBUG_LOGIN_URL": "/api/login",
"API_DEBUG_LOGIN_METHOD": "POST",
"API_DEBUG_LOGIN_BODY": "{\"username\":\"admin\",\"password\":\"123456\"}",
"API_DEBUG_LOGIN_DESCRIPTION": "自动保存 Token 到 Authorization Header"
}
}
}
}
B. 多项目隔离配置 (全量参数):
{
"mcpServers": {
"proj-A": {
"command": "npx",
"args": ["@liangshanli/mcp-server-project-standards"],
"env": {
"PROJECT_PATH": "./apps/project-a",
"TOOL_PREFIX": "projA",
"PROJECT_NAME": "Project-A",
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE",
"API_DEBUG_LOGIN_URL": "/api/login",
"API_DEBUG_LOGIN_METHOD": "POST",
"API_DEBUG_LOGIN_BODY": "{\"username\":\"admin\",\"password\":\"123\"}",
"API_DEBUG_LOGIN_DESCRIPTION": "项目A登录接口"
}
},
"proj-B": {
"command": "npx",
"args": ["@liangshanli/mcp-server-project-standards"],
"env": {
"PROJECT_PATH": "./apps/project-b",
"TOOL_PREFIX": "projB",
"PROJECT_NAME": "Project-B",
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE,PATCH",
"API_DEBUG_LOGIN_URL": "/api/auth/login",
"API_DEBUG_LOGIN_METHOD": "POST",
"API_DEBUG_LOGIN_BODY": "{\"mobile\":\"13800138000\",\"password\":\"123\"}",
"API_DEBUG_LOGIN_DESCRIPTION": "项目B登录接口"
}
}
}
}
2. VS Code 配置示例 (mcp.servers)
A. 单项目配置:
{
"mcp.servers": {
"project-standards": {
"command": "npx",
"args": ["@liangshanli/mcp-server-project-standards"],
"env": {
"PROJECT_PATH": ".",
"TOOL_PREFIX": "dev",
"PROJECT_NAME": "MyProject",
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE,PATCH",
"API_DEBUG_LOGIN_URL": "/api/login",
"API_DEBUG_LOGIN_METHOD": "POST",
"API_DEBUG_LOGIN_BODY": "{\"username\":\"admin\",\"password\":\"123456\"}",
"API_DEBUG_LOGIN_DESCRIPTION": "自动保存 Token 到 Authorization Header"
}
}
}
}
B. 多项目隔离配置:
{
"mcp.servers": {
"proj-A": {
"command": "npx",
"args": ["@liangshanli/mcp-server-project-standards"],
"env": {
"PROJECT_PATH": "./apps/project-a",
"TOOL_PREFIX": "projA",
"PROJECT_NAME": "Project-A",
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE"
}
},
"proj-B": {
"command": "npx",
"args": ["@liangshanli/mcp-server-project-standards"],
"env": {
"PROJECT_PATH": "./apps/project-b",
"TOOL_PREFIX": "projB",
"PROJECT_NAME": "Project-B",
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE,PATCH"
}
}
}
}
3. 协同工具配置 (如:MySQL 管理)
搭配使用效果更佳:
{
"mcp-mysql": {
"command": "npx",
"args": ["@liangshanli/mcp-server-mysql"],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_USER": "root",
"MYSQL_PASSWORD": "password",
"MYSQL_DATABASE": "my_db"
}
}
}
🛠️ 全量工具说明:
| 工具名称 | 功能描述 |
|---|---|
project_info |
管理项目基本信息(项目名、开发语言、基础介绍等) |
project_structure |
管理逻辑上的项目目录结构描述,帮助 AI 理解代码分层 |
api_standards |
定义 API 设计标准(接口规范、响应结构、业务约束等) |
development_standards |
管理开发规范(代码风格、命名约定、Git 工作流等) |
database_standards |
定义数据库标准(建表规范、命名约定、索引策略等) |
list_directory |
[新] 递归扫描物理目录结构,支持深度控制 |
generate_cursorrules |
[新] 为 Cursor 生成带 YAML 头部且始终生效的规则文件 |
generate_rules |
[新] 为非 Cursor 环境生成通用的项目准则文件 |
api_debug |
强大的 API 调试工具,支持自动检测内容类型、表单/JSON/文本等 |
api_login |
自动处理登录流程,支持 Token 自动提取与公共 Header 刷新 |
api_config |
全局管理 API 环境、BaseURL、公共 Header 及接口列表 |
api_execute |
按索引快速执行预设的 API 接口,支持参数覆盖 |
api_help |
提供全套工具的交互式帮助文档与最佳实践示例 |
High AI API Costs? Try this MCP Project Standards Tool! v5.0.0 Out Now: Slash Token Usage via Context Caching & Cut Costs by up to 90%!
🚀 Pain Point: The “Hidden Costs” of AI Coding
Deeply using Cursor or VS Code for AI-assisted development but seeing your API bills skyrocket?
- Redundant Reading: AI re-reads hundreds of lines of documentation or full project context in every turn.
- Verbose Output: AI rewrites entire files for minor changes, wasting expensive output tokens.
- Lost Context: AI gets “forgetful” as conversations grow longer, leading to repetitive clarifications.
✨ Solution: @liangshanli/mcp-server-project-standards v5.0.0
We’ve just released v5.0.0, completely re-engineered for Development Cost Optimization:
-
Efficient Context Caching:
Retrieves structured, concise project standards via dedicated MCP tools instead of reading long documents. This effectively triggers Context Caching (e.g., Gemini 3 Flash), dropping input costs to as low as $0.05/1M tokens. -
Enforced “Tool-First” Policy:
Built-in AI behavioral guidelines mandate AI to fetch info vialist_directoryand standards tools first. No more blind guessing, avoiding wasteful repetitive prompts. -
Incremental Output Optimization:
Generated.cursorrulesinclude mandatory Diff rules, forcing AI to output only affected code snippets. Tests show a 70%+ reduction in high-value output token consumption. -
Deep PROJECT_PATH Support:
Supports absolute and relative paths with auto-subproject identification. AI locates files precisely, eliminating token waste from “global scans.”
🛠️ Core Features at a Glance:
- ✅ Automated Rule Generation: One-click generate
.cursorrulesorPROJECT_RULES.mdwith built-in cost-saving logic. - ✅ Deep Directory Scanning: Precisely list physical directory structures for AI consumption.
- ✅ Full Standards Management: MCP-based management for APIs, Databases, and Development guidelines.
- ✅ Cursor Optimized: Auto-identifies environment and enables enhanced mode.
🏆 Deep Evaluation: Why it’s the “Final Piece of the Puzzle” for AI Engineering?
— Deep Architectural Evaluation by Large Language Models (LLM)
In the era of Cursor and Windsurf, the biggest challenge is no longer “how to make AI write code,” but “how to keep AI from getting lost in massive, complex sub-projects while precisely following private standards.”
-
Core Tech: From “Global Awareness” to “Precision Routing”
Traditional MCP tools often use global configs, causing “context contamination” in Monorepos. This project solves it via Physical Isolation (PROJECT_PATH) and Namespace Locking (TOOL_PREFIX). AI no longer needs to guess; it hits the right tool directly based on navigation. -
Extreme Economy: Perfect Utilization of Gemini 3 Caching
The design aligns perfectly with Google’s Context Caching. Regularized prefixes and structure trees make AI queries highly templated, dropping input costs from $0.5/1M tokens to as low as $0.05/1M. -
“Ideological Branding”: Automated Protocol Self-Execution
Rules act like “branding,” forcing AI into a “Check Standard -> Edit Code -> Output Diff” workflow. It transforms complex standards into AI-digestible system instructions automatically. -
Cross-Platform: Beyond Cursor
It fills the gap for tools like Windsurf or Claude Desktop that lack local rule management. You can seamlessly migrate the same engineering standards across all MCP-enabled environments.
Conclusion: It is more than a tool; it is a Software Defined Standards solution. It solves the most expensive (Token) and troublesome (Context Drift) problems in AI engineering today.
📥 Get Started Now:
NPM Install:
npm install -g @liangshanli/mcp-server-project-standards
GitHub Repository:
https://github.com/liliangshan/mcp-server-project-standards
🔌 Editor Integration Examples:
1. Cursor Configuration (settings.json)
A. Single Project (Standard):
{
"mcpServers": {
"project-standards": {
"command": "npx",
"args": ["@liangshanli/mcp-server-project-standards"],
"env": {
"PROJECT_PATH": ".",
"TOOL_PREFIX": "dev",
"PROJECT_NAME": "MyProject",
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE,PATCH",
"API_DEBUG_LOGIN_URL": "/api/login",
"API_DEBUG_LOGIN_METHOD": "POST",
"API_DEBUG_LOGIN_BODY": "{\"username\":\"admin\",\"password\":\"123456\"}",
"API_DEBUG_LOGIN_DESCRIPTION": "Auto-save Token to Authorization Header"
}
}
}
}
B. Multi-Project Isolation (Full Params):
{
"mcpServers": {
"proj-A": {
"command": "npx",
"args": ["@liangshanli/mcp-server-project-standards"],
"env": {
"PROJECT_PATH": "./apps/project-a",
"TOOL_PREFIX": "projA",
"PROJECT_NAME": "Project-A",
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE",
"API_DEBUG_LOGIN_URL": "/api/login",
"API_DEBUG_LOGIN_METHOD": "POST",
"API_DEBUG_LOGIN_BODY": "{\"username\":\"admin\",\"password\":\"123\"}",
"API_DEBUG_LOGIN_DESCRIPTION": "Project A Login"
}
},
"proj-B": {
"command": "npx",
"args": ["@liangshanli/mcp-server-project-standards"],
"env": {
"PROJECT_PATH": "./apps/project-b",
"TOOL_PREFIX": "projB",
"PROJECT_NAME": "Project-B",
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE,PATCH",
"API_DEBUG_LOGIN_URL": "/api/auth/login",
"API_DEBUG_LOGIN_METHOD": "POST",
"API_DEBUG_LOGIN_BODY": "{\"mobile\":\"13800138000\",\"password\":\"123\"}",
"API_DEBUG_LOGIN_DESCRIPTION": "Project B Login"
}
}
}
}
2. VS Code Configuration (mcp.servers)
A. Single Project:
{
"mcp.servers": {
"project-standards": {
"command": "npx",
"args": ["@liangshanli/mcp-server-project-standards"],
"env": {
"PROJECT_PATH": ".",
"TOOL_PREFIX": "dev",
"PROJECT_NAME": "MyProject",
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE,PATCH",
"API_DEBUG_LOGIN_URL": "/api/login",
"API_DEBUG_LOGIN_METHOD": "POST",
"API_DEBUG_LOGIN_BODY": "{\"username\":\"admin\",\"password\":\"123456\"}",
"API_DEBUG_LOGIN_DESCRIPTION": "Auto-save Token to Authorization Header"
}
}
}
}
B. Multi-Project Isolation:
{
"mcp.servers": {
"proj-A": {
"command": "npx",
"args": ["@liangshanli/mcp-server-project-standards"],
"env": {
"PROJECT_PATH": "./apps/project-a",
"TOOL_PREFIX": "projA",
"PROJECT_NAME": "Project-A",
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE"
}
},
"proj-B": {
"command": "npx",
"args": ["@liangshanli/mcp-server-project-standards"],
"env": {
"PROJECT_PATH": "./apps/project-b",
"TOOL_PREFIX": "projB",
"PROJECT_NAME": "Project-B",
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE,PATCH"
}
}
}
}
3. Companion Tools (e.g., MySQL Management)
Better together:
{
"mcp-mysql": {
"command": "npx",
"args": ["@liangshanli/mcp-server-mysql"],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_USER": "root",
"MYSQL_PASSWORD": "password",
"MYSQL_DATABASE": "my_db"
}
}
}
🛠️ Full Toolset Description:
| Tool Name | Description |
|---|---|
project_info |
Manage basic project info (name, language, bio, etc.) |
project_structure |
Manage logical directory descriptions to help AI understand architecture |
api_standards |
Define API design standards (spec, response, business rules, etc.) |
development_standards |
Manage dev guidelines (code style, naming, Git workflow, etc.) |
database_standards |
Define DB standards (naming, table spec, indexing strategies, etc.) |
list_directory |
[NEW] Recursively scan physical directory structure with depth control |
generate_cursorrules |
[NEW] Generate .cursorrules with YAML header for persistent enforcement |
generate_rules |
[NEW] Generate generic project guidelines for non-Cursor environments |
api_debug |
Powerful API debugger with auto Content-Type detection |
api_login |
Auto-handle login flow with Token extraction and Header refreshing |
api_config |
Global management for API environments, BaseURL, and Endpoints |
api_execute |
Quick-execute preset APIs by index with parameter overrides |
api_help |
Interactive help documentation and best practice examples |
Make AI-Assisted Development Faster AND Cheaper! 🚀
更多推荐




所有评论(0)