loading…
Search for a command to run...
loading…
Manages project standards, configurations, and API debugging for AI-assisted development, ensuring unified development practices across teams and machines.
Manages project standards, configurations, and API debugging for AI-assisted development, ensuring unified development practices across teams and machines.
A MCP (Model Context Protocol) server for project standards management, designed for AI-assisted development to help teams maintain unified development standards and specifications across multiple machines.
download_file tool to download files from URL to project path.PROJECT_PATH environment variable for resolving relative paths.list_directory, generate_cursorrules, and generate_rules.CONFIG_DIR and TOOL_PREFIX:CONFIG_DIR is set, it is used as-isCONFIG_DIR is not set and TOOL_PREFIX is set, use ./.setting.<TOOL_PREFIX>./.settingtools/call now strips the TOOL_PREFIX from tool names before method dispatch. If you call xxx_api_debug (with TOOL_PREFIX=xxx), the server routes the call to api_debug internally.getConfigDir() used by both server-final.js and api_common.jstools/list shows environment with resolved CONFIG_DIRTOOL_PREFIX and PROJECT_NAME are providedapi_debug method definitionTOOL_PREFIX without code changesapi_login): Direct login authentication using environment variablesapi_debug): Simplified API request execution api_config): Comprehensive configuration managementAPI_DEBUG_ALLOWED_METHODS - Control allowed request methods (default: GET)API_DEBUG_LOGIN_URL - Set login API URL (default: /api/login)API_DEBUG_LOGIN_METHOD - Set login request method (default: POST)API_DEBUG_LOGIN_BODY - Set login request body (default: {"username":"","password":""})API_DEBUG_LOGIN_DESCRIPTION - Set login API description (default: Save returned token to common headers in debug tool, field name Authorization, field value Bearer token)Smart Login API Recognition:
Error Handling Optimization:
Dynamic Tool Description:
npm install -g @liangshanli/mcp-server-project-standards
npm install @liangshanli/mcp-server-project-standards
git clone https://github.com/liliangshan/mcp-server-project-standards.git
cd mcp-server-project-standards
npm install
The server uses the ./.setting/ directory to store configuration files by default. You can specify a different directory using environment variables.
| Variable | Default | Description | Example |
|---|---|---|---|
| PROJECT_PATH | . | Root path of the project. Supports both absolute (e.g., / or C:\) and relative paths. Used to resolve all relative paths. |
export PROJECT_PATH="/path/to/project" |
| CONFIG_DIR | ./.setting or ./.setting. |
Configuration directory. Resolved relative to PROJECT_PATH. | export CONFIG_DIR="./config" |
| TOOL_PREFIX | Optional tool prefix for tool names and config isolation | export TOOL_PREFIX="projA" |
|
| PROJECT_NAME | Optional project branding for tool descriptions | export PROJECT_NAME="MyProject" |
|
| API_DEBUG_ALLOWED_METHODS | GET | Control allowed request methods (supports: GET,POST,PUT,DELETE,PATCH, etc.) | export API_DEBUG_ALLOWED_METHODS="GET,POST" |
| API_DEBUG_LOGIN_URL | /api/login | Set login API URL | export API_DEBUG_LOGIN_URL="/api/auth/login" |
| API_DEBUG_LOGIN_METHOD | POST | Set login request method | export API_DEBUG_LOGIN_METHOD="POST" |
| API_DEBUG_LOGIN_BODY | {"username":"","password":""} | Set login request body | export API_DEBUG_LOGIN_BODY='{"mobile":"","password":""}' |
| API_DEBUG_LOGIN_DESCRIPTION | Save returned token to common headers in debug tool, field name Authorization, field value Bearer token | Set login API description | export API_DEBUG_LOGIN_DESCRIPTION="User Login API" |
The server uses two configuration files:
config.json - Project standards configurationapi.json - API debugging configurationconfig.json default values:
{
"project_info": {},
"project_structure": [],
"api_standards": {},
"development_standards": [],
"database_standards": []
}
api.json default values:
{
"baseUrl": "",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json"
},
"list": []
}
config.json fields:
api.json fields:
mcp-server-project-standards
npx @liangshanli/mcp-server-project-standards
npm start
npm run start-managed
Managed start provides:
npm run dev
{
"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 returned token to common headers in debug tool, field name Authorization, field value Bearer token"
}
}
}
}
{
"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",
"API_DEBUG_LOGIN_URL": "/api/login",
"API_DEBUG_LOGIN_METHOD": "POST",
"API_DEBUG_LOGIN_BODY": "{\"username\":\"\",\"password\":\"\"}"
}
},
"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",
"API_DEBUG_LOGIN_URL": "/api/auth/login",
"API_DEBUG_LOGIN_METHOD": "POST",
"API_DEBUG_LOGIN_BODY": "{\"mobile\":\"\",\"password\":\"\"}"
}
}
}
}
{
"mcp.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",
"API_DEBUG_LOGIN_METHOD": "POST",
"API_DEBUG_LOGIN_BODY": "{\"username\":\"\",\"password\":\"\"}"
}
}
}
}
{
"mcp.servers": {
"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",
"API_DEBUG_LOGIN_URL": "/api/login",
"API_DEBUG_LOGIN_METHOD": "POST",
"API_DEBUG_LOGIN_BODY": "{\"username\":\"\",\"password\":\"\"}"
}
},
"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",
"API_DEBUG_LOGIN_URL": "/api/auth/login",
"API_DEBUG_LOGIN_METHOD": "POST",
"API_DEBUG_LOGIN_BODY": "{\"mobile\":\"\",\"password\":\"\"}"
}
}
}
}
Get and manage project basic information, including project name, development language, description, etc.
Parameters:
action (required): Operation type - "get" to retrieve info, "set" to set infokey (optional): Field to set - "projectName", "developmentLanguage", "basicInfo"value (optional): Value to setExample:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "project_info",
"arguments": {
"action": "set",
"key": "projectName",
"value": "My Project"
}
}
}
Get and manage project directory structure with depth control and hidden file inclusion.
Parameters:
action (required): Operation type - "get" to retrieve structure, "set" to set structure, "delete" to delete structure itemstructure (optional): Structure item array (required for set action)path (optional): Path to delete (required for delete action)Example:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "project_structure",
"arguments": {
"action": "set",
"structure": [
{
"path": "/src",
"description": "Source code directory"
}
]
}
}
}
Get and manage API interface standards and best practices.
Parameters:
action (required): Operation type - "get" to retrieve standards, "set" to set standards, "delete" to delete standardskey (optional): Field to set - "interfaceType", "successStructure", "errorStructure", "basicHeaders", "requirements"value (optional): Value to setforceOverwrite (optional): Whether to force overwrite array values (default: false)Example:
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "api_standards",
"arguments": {
"action": "set",
"key": "requirements",
"value": ["Unified response format", "Error code standards", "Parameter validation"],
"forceOverwrite": true
}
}
}
Get and manage development standards, including code style, Git workflow, testing, and documentation.
Parameters:
action (required): Operation type - "get" to retrieve standards, "set" to set standards, "delete" to delete standardsstandards (optional): Standards array (required for set action)forceOverwrite (optional): Whether to force overwrite array values (default: false)Example:
{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "development_standards",
"arguments": {
"action": "set",
"standards": ["Use 2 spaces for indentation", "Use single quotes", "Use camelCase naming"],
"forceOverwrite": false
}
}
}
Get and manage database standards, including table structure design, naming conventions, indexing strategies, etc.
Parameters:
action (required): Operation type - "get" to retrieve standards, "set" to set standards, "delete" to delete standardsstandards (optional): Standards array (required for set action)forceOverwrite (optional): Whether to force overwrite array values (default: false)Example:
{
"jsonrpc": "2.0",
"id": 5,
"method": "tools/call",
"params": {
"name": "database_standards",
"arguments": {
"action": "set",
"standards": [
"Use test_ prefix for all table names",
"Use snake_case for table and field names",
"Use singular form for table names"
],
"forceOverwrite": true
}
}
}
Complete API interface testing and debugging functionality, supporting multiple HTTP methods, authentication, parameter passing, etc.
Parameters:
action (required): Operation type - "get" to retrieve config, "set" to update config, "delete" to delete API, "execute" to execute API, "updateBaseUrl" to update base URL, "updateHeaders" to update headers, "deleteHeader" to delete specific header, "search" to search APIsconfig (optional): API debug configuration (required for set action)index (optional): API index (required for execute/delete actions)baseUrl (optional): New base URL (required for updateBaseUrl action)headers (optional): New headers (required for updateHeaders action)headerName (optional): Header name to delete (required for deleteHeader action)keyword (optional): Search keyword (required for search action)Features:
🔐 Special Note - Login Authentication Flow:
The API debugging tool supports a complete login authentication flow, making it easy to manage API access permissions:
Login API Configuration:
/api/login)Automatic Token Management:
token or cookieAuthorization: Bearer token)Authentication Expiration Handling:
updateHeaders operation to update common request headersUsage Flow Example:
# 1. Configure login API
api_debug set config={login_api_config}
# 2. Execute login to get token
api_debug execute index=0
# 3. Update common request headers (automatic)
api_debug updateHeaders headers={Authorization: Bearer token}
# 4. Debug other APIs that require authentication
api_debug execute index=1
# 5. If token expires, re-login
api_debug execute index=0 # Re-execute login
This design eliminates the need for manual authentication state management, as the tool automatically handles login and token updates, greatly simplifying the API debugging process!
Recursively explores the directory structure relative to the project root.
Parameters:
path (optional): Subdirectory path to list.depth (optional): Max recursion depth (default: 2).Example:
{
"jsonrpc": "2.0",
"id": 10,
"method": "tools/call",
"params": {
"name": "list_directory",
"arguments": {
"depth": 3
}
}
}
Generates AI project guidance files (.cursorrules for Cursor, PROJECT_RULES.md for others) based on your standards.
Parameters:
save (optional): Whether to save content to disk (default: false).Example:
{
"jsonrpc": "2.0",
"id": 11,
"method": "tools/call",
"params": {
"name": "generate_cursorrules",
"arguments": {
"save": true
}
}
}
Download a file from a URL and save it to a specified path within the project.
Parameters:
url (required): The URL of the file to download.savePath (required): The path where the file should be saved (relative to project path or absolute).Example:
{
"jsonrpc": "2.0",
"id": 12,
"method": "tools/call",
"params": {
"name": "download_file",
"arguments": {
"url": "https://example.com/logo.png",
"savePath": "assets/logo.png"
}
}
}
To provide a more complete development experience, we recommend using the following MCP tools in collaboration:
MySQL Database Support
SQL Server Database Support
Icon Resource Management
Complete Development Stack:
Team Collaboration:
Development Efficiency:
Usage Example:
# 1. Install project standards management tool
npm install -g @liangshanli/mcp-server-project-standards
# 2. Install database management tools (choose as needed)
npm install -g @liangshanli/mcp-server-mysql
# or
npm install -g @liangshanli/mcp-server-mssqlserver
# 3. Install icon management tool
npm install -g @liangshanli/mcp-server-icon
# 4. Configure multiple MCP servers in your editor
Example:
Set API Configuration:
{
"jsonrpc": "2.0",
"id": 6,
"method": "tools/call",
"params": {
"name": "api_debug",
"arguments": {
"action": "set",
"config": {
"baseUrl": "https://api.example.com",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer your-token"
},
"list": [
{
"description": "User Login",
"url": "/api/login",
"method": "POST",
"body": {
"username": "user",
"password": "pass"
}
}
]
}
}
}
}
Execute API Request:
{
"jsonrpc": "2.0",
"id": 7,
"method": "tools/call",
"params": {
"name": "api_debug",
"arguments": {
"action": "execute",
"index": 0
}
}
}
Search API:
{
"jsonrpc": "2.0",
"id": 8,
"method": "tools/call",
"params": {
"name": "api_debug",
"arguments": {
"action": "search",
"keyword": "login"
}
}
}
Update Authentication Headers:
{
"jsonrpc": "2.0",
"id": 9,
"method": "tools/call",
"params": {
"name": "api_debug",
"arguments": {
"action": "updateHeaders",
"headers": {
"Authorization": "Bearer new-token"
}
}
}
}
mcp-server-project-standards/
├── src/
│ ├── server-final.js # Main server file
│ └── utils/ # Utility functions directory
│ ├── get_project_info.js # Project information 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 debugging tool
│ └── ... # Other tools
├── bin/
│ └── cli.js # CLI startup script
├── start-server.js # Managed startup script
├── package.json
└── README.md
npm test
MIT
Welcome to submit Issues and Pull Requests to improve this project!
If you encounter problems during use, please:
Make AI-assisted development more standardized and efficient! 🚀
Выполни в терминале:
claude mcp add mcp-project-standards-server -- npx Read, send and search emails from Claude
автор: GoogleSend, search and summarize Slack messages
автор: SlackNo-code MCP client for team chat platforms, such as Slack, Microsoft Teams, and Discord.
A community discord server dedicated to MCP by [Frank Fiegel](https://github.com/punkpeye)
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории communication