Skip to main content
Glama
han0420

MCP Dev Standards

by han0420

MCP Dev Standards

一个基于 Model Context Protocol (MCP) 的开发规范服务器,为 AI 编程助手提供前后端开发规范的上下文,确保生成的代码符合团队/项目的最佳实践。

功能特点

  • 🔧 MCP 协议支持: 完全兼容 MCP 协议,可与 Cursor、Claude Desktop、VS Code 等 AI 工具集成

  • 📚 多来源文档: 支持本地文件、远程 API、Git 仓库等多种文档来源

  • 🔍 智能搜索: 基于关键词的规范文档搜索

  • 📦 内置规范: 包含前端(Vue、React)、后端(API、数据库)等常用开发规范

  • 缓存机制: 内置缓存,提高响应速度

  • 🎯 可扩展: 支持自定义规范文档和配置

Related MCP server: PAELLADOC

快速开始

安装

# 使用 npm
npm install mcp-dev-standards

# 使用 pnpm
pnpm add mcp-dev-standards

# 使用 yarn
yarn add mcp-dev-standards

配置 Cursor

在 Cursor 的 MCP 配置文件中添加:

{
  "mcpServers": {
    "dev-standards": {
      "command": "npx",
      "args": ["-y", "mcp-dev-standards"],
      "env": {
        "STANDARDS_PATH": "./standards"
      }
    }
  }
}

配置 Claude Desktop

在 Claude Desktop 配置文件中添加:

{
  "mcpServers": {
    "dev-standards": {
      "command": "npx",
      "args": ["-y", "mcp-dev-standards"]
    }
  }
}

使用方式

可用工具

服务器提供以下 MCP 工具:

1. resolve-standard-id

根据关键词搜索匹配的规范文档。

输入: { "query": "Vue 组件" }
输出: 匹配的规范文档列表

2. get-standard-docs

获取指定规范文档的详细内容。

输入: { 
  "standardId": "frontend-vue-components",
  "topic": "命名规范",  // 可选
  "maxTokens": 2000     // 可选
}
输出: 规范文档内容

3. list-standards

列出所有可用的规范分类和文档。

输入: { "category": "frontend" }  // 可选
输出: 规范文档列表,按分类分组

使用示例

在 AI 对话中:

用户: 帮我写一个 Vue3 组件

AI: [调用 resolve-standard-id, query="Vue 组件"]
    [调用 get-standard-docs, standardId="frontend-vue-components"]
    
    根据规范,我来为您创建一个符合标准的 Vue3 组件...

配置文件

在项目根目录创建 standards.config.json

{
  "$schema": "https://mcp-dev-standards.example.com/schema/standards.json",
  "projectTitle": "我的项目规范",
  "description": "项目开发规范文档",
  "sources": [
    {
      "type": "local",
      "path": "./standards"
    },
    {
      "type": "remote",
      "url": "https://api.example.com/standards",
      "headers": {
        "Authorization": "Bearer token"
      }
    },
    {
      "type": "git",
      "repo": "org/standards-repo",
      "branch": "main",
      "path": "docs/standards"
    }
  ],
  "categories": ["frontend", "backend", "custom"],
  "cacheTimeout": 3600,
  "rules": [
    "使用 TypeScript 进行类型安全的开发",
    "遵循团队的命名规范"
  ]
}

配置项说明

配置项

类型

默认值

说明

projectTitle

string

"开发规范中心"

项目标题

description

string

-

项目描述

sources

array

[{ type: "local", path: "./standards" }]

文档来源配置

categories

array

["frontend", "backend", "custom"]

规范分类

cacheTimeout

number

3600

缓存超时时间(秒)

rules

array

-

全局规则提示

文档来源类型

本地文件

{
  "type": "local",
  "path": "./standards"
}

远程文档

远程文档来源支持三种模式:

模式 1:直接指向 Markdown 文件

{
  "type": "remote",
  "url": "https://example.com/docs/vue3.md",
  "headers": {
    "Authorization": "Bearer token"
  }
}

模式 2:配置多个远程 Markdown 文件

{
  "type": "remote",
  "url": "https://example.com/docs",
  "headers": {
    "Authorization": "Bearer token"
  },
  "docs": [
    {
      "url": "https://example.com/docs/vue3.md",
      "category": "frontend",
      "subcategory": "vue"
    },
    {
      "url": "https://example.com/docs/react.md",
      "category": "frontend",
      "subcategory": "react"
    },
    {
      "url": "https://intranet.company.com/standards/api.md",
      "category": "backend",
      "subcategory": "api"
    }
  ]
}

模式 3:JSON API 返回文档列表

{
  "type": "remote",
  "url": "https://api.example.com/standards",
  "headers": {
    "Authorization": "Bearer token"
  }
}

API 应返回以下格式:

{
  "standards": [
    {
      "id": "vue-components",
      "title": "Vue 组件规范",
      "category": "frontend",
      "content": "# Vue 组件规范\n..."
    }
  ]
}

Git 仓库

{
  "type": "git",
  "repo": "org/standards-repo",
  "branch": "main",
  "path": "docs/standards",
  "token": "github_token"  // 可选,或使用 GITHUB_TOKEN 环境变量
}

规范文档格式

规范文档使用 Markdown 格式,支持 frontmatter 元数据:

---
title: Vue 3 组件开发规范
description: Vue 3 组件的编写规范和最佳实践
category: frontend
subcategory: vue
tags:
  - vue
  - vue3
  - component
version: "1.0.0"
lastUpdated: "2024-12-23"
---

# Vue 3 组件开发规范

正文内容...

Frontmatter 字段

字段

类型

必填

说明

title

string

文档标题(可从内容提取)

description

string

文档描述

category

string

分类(可从路径推断)

subcategory

string

子分类

tags

array

标签列表

version

string

版本号

lastUpdated

string

最后更新时间

目录结构

推荐的规范文档目录结构:

standards/
  frontend/
    vue/
      components.md
      composables.md
    react/
      components.md
      hooks.md
    styles/
      tailwind.md
  backend/
    api/
      restful.md
      error-handling.md
    database/
      naming.md
  custom/
    team-rules.md

内置规范

本项目包含以下内置规范文档:

前端

  • Vue 3 组件开发规范 - Vue 3 组件的编写标准

  • Vue 3 Composables 规范 - 组合式函数的最佳实践

  • React 组件开发规范 - React 函数组件标准

  • React Hooks 规范 - 自定义 Hooks 编写指南

  • Tailwind CSS 规范 - Tailwind CSS 使用规范

后端

  • RESTful API 设计规范 - API 设计最佳实践

  • API 错误处理规范 - 统一的错误处理标准

  • 数据库命名规范 - 数据库对象命名标准

通用

  • 团队开发规范 - 团队内部约定和规范

开发

本地开发

# 安装依赖
pnpm install

# 开发模式
pnpm dev

# 构建
pnpm build

# 运行测试
pnpm test

项目结构

src/
  index.ts              # 入口文件
  server.ts             # MCP 服务器实现
  tools/
    resolve-standard.ts # 规范搜索工具
    get-docs.ts         # 获取文档工具
    list-standards.ts   # 列出规范工具
  sources/
    local.ts            # 本地文档加载器
    remote.ts           # 远程 API 加载器
    git.ts              # Git 仓库加载器
  utils/
    parser.ts           # Markdown 解析
    cache.ts            # 缓存管理
    manager.ts          # 文档管理器
    search.ts           # 搜索工具
  types/
    index.ts            # 类型定义
standards/              # 默认规范文档

环境变量

变量名

说明

默认值

STANDARDS_PATH

规范文档路径

./standards

STANDARDS_CONFIG

配置文件路径

standards.config.json

GITHUB_TOKEN

GitHub API Token(用于 Git 来源)

-

许可证

MIT

贡献

欢迎提交 Issue 和 Pull Request!

相关链接

Available Tools

3 tools
get-standard-docsA

获取指定规范文档的详细内容。需要先通过 resolve-standard-id 获取规范 ID。

ParametersJSON Schema
NameRequiredDescriptionDefault
topicNo可选的主题过滤,用于获取规范中特定部分的内容
maxTokensNo返回内容的最大 token 数,默认不限制
standardIdYes规范文档的唯一标识符,从 resolve-standard-id 获取

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, so the description carries the full burden of behavioral disclosure. However, it only mentions the prerequisite and does not disclose what 'detailed content' includes, how the topic filter or maxTokens affect results, any return format, or error scenarios. For a get operation, more details would be expected.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that conveys the purpose and a key prerequisite without any fluff. Every word earns its place, making it highly concise and effectively front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While there is no output schema, the parameter schema is fully covered, and the tool's complexity is low. The description provides the crucial prerequisite context. However, it could add a brief note on what the returned content looks like or how topic filtering behaves, but the current level is adequate given the schema richness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All three parameters have descriptions in the schema, providing 100% coverage. The description adds no extra meaning beyond the schema, but the schema already explains each parameter sufficiently, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb and resource: get detailed content of a specified standard document. It also distinguishes from sibling tools by specifying that the standard ID must first be obtained from resolve-standard-id, which differentiates its role from the sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides an explicit prerequisite: must use resolve-standard-id first to get the standard ID. This gives clear context for when to use the tool and implies the ID resolution step, though it does not explicitly mention list-standards as an alternative for discovering standards.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list-standardsA

列出所有可用的开发规范分类和文档。可按分类过滤。

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryNo按分类过滤,可选值:frontend、backend、custom

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the tool lists and filters, but it does not mention return format, error handling, or whether the filter is case-sensitive or exact match. For a simple read-only list, the core behavior is transparent enough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences, front-loaded with the main purpose and then the optional filter. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with one optional parameter and no output schema, the description covers the essential behavior. It could mention the output structure or that the list includes both categories and documents, but the current description is adequate for a straightforward browsing action.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already describes the 'category' parameter with allowed values (frontend, backend, custom), giving 100% coverage. The description only says '可按分类过滤' without adding new detail. Baseline of 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists all available standards categories and documents ('列出所有可用的开发规范分类和文档') and mentions filtering by category. This distinguishes it from siblings like get-standard-docs (which retrieves specific docs) and resolve-standard-id (which resolves IDs).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage: it's for listing available standards with optional filtering. However, it does not explicitly contrast with sibling tools or state when to prefer this over get-standard-docs or resolve-standard-id. No exclusions are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

resolve-standard-idA

根据关键词搜索匹配的开发规范文档。在获取具体规范内容前,必须先调用此工具获取规范 ID。

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes搜索规范的关键词或描述,例如:Vue 组件、RESTful API、命名规范

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the prerequisite positioning and that it retrieves an ID, but does not explain response format, edge-case behavior (no matches, multiple matches), or whether the operation has side effects. This is a significant gap for a tool without annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded: two sentences that state the core action and the critical usage prerequisite. Every word earns its place, with no redundant or vague phrasing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema, no annotations), the description provides essential context about the need to call this tool first. However, it lacks clarity on return value specifics (single ID vs list) and potential failure modes, which would make it more complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% coverage with a clear description of the 'query' parameter, including examples. The tool description adds no additional parameter semantics beyond what the schema already provides, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: searching development specification documents by keywords and retrieving the specification ID. It explicitly differentiates from siblings by noting this must be called before obtaining specific content, which distinguishes it from get-standard-docs and list-standards.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage context: 'Before obtaining specific specification content, you must call this tool to get the specification ID.' This establishes a clear sequencing requirement relative to the sibling tools, though it doesn't name the alternatives explicitly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv1.0.12
    • First observedget-standard-docs
    • First observedlist-standards
    • First observedresolve-standard-id

TDQS

A4.1/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: resolve-standard-id searches by keyword, get-standard-docs retrieves content by ID, and list-standards provides a browsable overview. There is no overlap between searching, fetching, and listing.

Naming Consistency5/5

All tool names follow the same verb_noun hyphenated pattern: resolve-standard-id, get-standard-docs, list-standards. The verbs and objects are consistent and readable.

Tool Count5/5

Three tools are well-scoped for a read-only standards documentation server. The set covers the essential operations—search, fetch, and list—without unnecessary extras.

Completeness5/5

The tool surface covers the full lifecycle for a documentation server: discovering standards (list), finding specific ones (resolve), and retrieving details (get). There are no obvious dead ends; the dependency between resolve and get is clearly documented.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    A Model Context Protocol server that enhances AI-generated code quality through comprehensive analysis across 10 critical dimensions, helping identify issues before they become problems.
    1
    90
    Apache 2.0
  • A
    license
    Not graded
    quality
    F
    maintenance
    A Model Context Protocol (MCP) server that implements AI-First Development framework principles, allowing LLMs to interact with context-first documentation tools and workflows for preserving knowledge and intent alongside code.
    338
    AGPL 3.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    A Model Context Protocol server that enhances AI agents by providing deep semantic understanding of codebases, enabling more intelligent interactions through advanced code search and contextual awareness.
    89
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that analyzes application codebases with real-time file watching, providing AI assistants like Claude with deep insights into project structure, code patterns, and architecture.
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/han0420/mcp-dev-standards'

If you have feedback or need assistance with the MCP directory API, please join our Discord server