zhineng.dev Tools

็ฎ€ไฝ“ไธญๆ–‡ | [English]

MCP Project Standards Server

A Model Context Protocol (MCP) based project standards management tool designed for AI-assisted development, helping teams maintain unified development standards and specifications across multiple machines.

๐Ÿ’ก Best Practices

Configure tool prompts to require the model to check project standards before each modification:

  1. Register an account:
  2. Add your own provider and model configuration
  3. Generate an API key
  4. Add to the key's tool prompts:
Tool: development_standards
Prompt: Please use the development_standards tool to check the guidelines before editing

Effect: The model will check standards before each modification round, ensuring code complies with team standards, while consuming a small amount of additional tokens.

๐Ÿš€ Core Advantages

๐Ÿ’ฐ Token Cost Optimization

๐ŸŽฏ Solving Multi-Machine Development Chaos

๐Ÿ›ก๏ธ Enterprise-Grade Development Standards Management

โœจ Key Features

๐ŸŽฏ Use Cases

Team Collaborative Development

Enterprise Projects

AI-Assisted Development

๐Ÿ“ฆ Installation

Global Install (Recommended)

npm install -g @liangshanli/mcp-server-project-standards

Local Install

npm install @liangshanli/mcp-server-project-standards

Source Install

git clone https://github.com/liliangshan/mcp-server-project-standards.git
cd mcp-server-project-standards
npm install

โš™๏ธ Configuration

The server uses ./.setting/ directory for config files by default. You can specify different directories via environment variables.

Environment Variables

VariableDefaultDescription
PROJECT_PATH.Project root path. Supports absolute and relative paths for resolving all relative paths.
CONFIG_DIR./.settingConfig directory, resolved relative to PROJECT_PATH.
TOOL_PREFIX-Tool name prefix, also used for multi-project config isolation
PROJECT_NAME-Project name prefix for tool descriptions
API_DEBUG_ALLOWED_METHODSGETAllowed request methods (supports: GET, POST, PUT, DELETE, PATCH, etc.)
API_DEBUG_LOGIN_URL/api/loginLogin endpoint URL
API_DEBUG_LOGIN_METHODPOSTLogin request method
API_DEBUG_LOGIN_BODY{"username":"","password":""}Login request body
API_DEBUG_LOGIN_DESCRIPTIONSave the returned token to the public header in the debug toolLogin endpoint description

Config Files

The server uses two config files:

config.json Defaults:

{
  "project_info": {},
  "project_structure": [],
  "api_standards": {},
  "development_standards": [],
  "database_standards": []
}

api.json Defaults:

{
  "baseUrl": "",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json"
  },
  "list": []
}

๐Ÿš€ Quick Start

1. Direct Run (Global Install)

mcp-server-project-standards

2. Using npx (Recommended)

npx @liangshanli/mcp-server-project-standards

3. Source Start

npm start

4. Managed Start (Production Recommended)

npm run start-managed

Managed start provides: auto-restart (max 10 times), error recovery, process management, logging

5. Dev Mode

npm run dev

๐Ÿ”ง Editor Config Examples

Cursor Editor Config - Single Project

{
  "mcpServers": {
    "project-standards": {
      "command": "npx",
      "args": ["@liangshanli/mcp-server-project-standards"],
      "env": {
        "PROJECT_PATH": ".",
        "CONFIG_DIR": "./.setting",
        "API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE",
        "API_DEBUG_LOGIN_URL": "/api/login",
        "API_DEBUG_LOGIN_METHOD": "POST",
        "API_DEBUG_LOGIN_BODY": "{\"username\":\"\",\"password\":\"\"}",
        "API_DEBUG_LOGIN_DESCRIPTION": "Save the returned token to the public header"
      }
    }
  }
}

Cursor Editor Config - Multi-Project

{
  "mcpServers": {
    "project-standards-A": {
      "command": "npx",
      "args": ["@liangshanli/mcp-server-project-standards"],
      "env": {
        "PROJECT_PATH": ".",
        "TOOL_PREFIX": "projA",
        "PROJECT_NAME": "Project A",
        "API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE"
      }
    },
    "project-standards-B": {
      "command": "npx",
      "args": ["@liangshanli/mcp-server-project-standards"],
      "env": {
        "PROJECT_PATH": ".",
        "TOOL_PREFIX": "projB",
        "PROJECT_NAME": "Project B",
        "API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE"
      }
    }
  }
}

VS Code Config - .vscode/mcp.json Format

Single Instance
{
  "servers": {
    "project-standards": {
      "command": "npx",
      "args": ["@liangshanli/mcp-server-project-standards"],
      "env": {
        "PROJECT_PATH": ".",
        "CONFIG_DIR": "./.setting",
        "API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE",
        "API_DEBUG_LOGIN_URL": "/api/login"
      }
    }
  }
}
Multi Instance
{
  "servers": {
    "project-standards-A": {
      "command": "npx",
      "args": ["@liangshanli/mcp-server-project-standards"],
      "env": {
        "PROJECT_PATH": ".",
        "TOOL_PREFIX": "projA",
        "PROJECT_NAME": "Project A",
        "CONFIG_DIR": "./.setting-a",
        "API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE"
      }
    },
    "project-standards-B": {
      "command": "npx",
      "args": ["@liangshanli/mcp-server-project-standards"],
      "env": {
        "PROJECT_PATH": ".",
        "TOOL_PREFIX": "projB",
        "PROJECT_NAME": "Project B",
        "CONFIG_DIR": "./.setting-b",
        "API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE"
      }
    }
  }
}

๐Ÿ› ๏ธ Available Tools

1. Project Info (project_info)

Get and manage project basic info including name, development language, description, etc.

{
  "name": "project_info",
  "arguments": {
    "action": "set",
    "key": "projectName",
    "value": "My Project"
  }
}

2. Project Structure (project_structure)

Get and manage project directory structure with depth control and hidden file inclusion.

{
  "name": "project_structure",
  "arguments": {
    "action": "set",
    "structure": [{"path": "/src", "description": "Source code directory"}]
  }
}

3. API Standards (api_standards)

Get and manage API interface standards and best practices.

{
  "name": "api_standards",
  "arguments": {
    "action": "set",
    "key": "requirements",
    "value": ["Unified response format", "Error code standards"],
    "forceOverwrite": true
  }
}

4. Development Standards (development_standards)

Get and manage development standards including code style, Git workflow, testing and documentation specs.

{
  "name": "development_standards",
  "arguments": {
    "action": "set",
    "standards": ["Use 2 spaces for indentation", "Use single quotes"],
    "forceOverwrite": false
  }
}

5. Database Standards (database_standards)

Get and manage database standards including table design, naming conventions, indexing strategies, etc.

{
  "name": "database_standards",
  "arguments": {
    "action": "set",
    "standards": ["Use snake_case for table and field names"],
    "forceOverwrite": true
  }
}

6. API Debug Tool (api_debug)

Complete API testing and debugging functionality supporting multiple HTTP methods, authentication, parameter passing, etc.

Features:

7. Directory List Tool (list_directory)

Recursively explore directory structure relative to project root.

{
  "name": "list_directory",
  "arguments": {
    "depth": 3
  }
}

8. Rules Generation Tool (generate_cursorrules / generate_rules)

Generate AI project guidance files based on your standards (Cursor uses .cursorrules, other clients use PROJECT_RULES.md).

{
  "name": "generate_cursorrules",
  "arguments": {
    "save": true
  }
}

9. File Download Tool (download_file)

Download files from specified URLs and save to designated locations in the project path.

{
  "name": "download_file",
  "arguments": {
    "url": "https://example.com/logo.png",
    "savePath": "assets/logo.png"
  }
}

๐Ÿ”— Related Tools Integration

๐Ÿ—„๏ธ Database Management Tools

๐ŸŽจ Icon Management Tools

๐Ÿ”ง Version Control Tools

๐ŸŒ Browser Tools

๐Ÿ—ƒ๏ธ Cache Database Tools

๐Ÿ“‹ Version History

v5.1.0 (2025-12-22)

v5.0.0 (2025-12-19) - Major Update

v3.0.0 (2025-10-31) - Major Update

v1.1.0 (2024-12-19)

๐Ÿ“ Project Structure

mcp-server-project-standards/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ server-final.js           # Main server file
โ”‚   โ””โ”€โ”€ utils/                    # Utility functions
โ”‚       โ”œโ”€โ”€ get_project_info.js   # Project info management
โ”‚       โ”œโ”€โ”€ get_project_structure.js # Project structure management
โ”‚       โ”œโ”€โ”€ get_api_standards.js  # API standards management
โ”‚       โ”œโ”€โ”€ get_development_standards.js # Development standards management
โ”‚       โ”œโ”€โ”€ database_standards.js # Database standards management
โ”‚       โ””โ”€โ”€ api_debug.js          # API debug tool
โ”œโ”€โ”€ bin/
โ”‚   โ””โ”€โ”€ cli.js                    # CLI startup script
โ”œโ”€โ”€ start-server.js               # Managed startup script
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ README.md

View GitHub Repository