AI Development Guidelines MCP Server

AI Development Guidelines MCP Server

Provides AI agents with professional coding standards, development best practices, and context-aware guidance through static documentation and AI-powered custom recommendations. Enables agents to access comprehensive development guidelines including coding rules, debugging techniques, and AI steering instructions.

Category
访问服务器

README

AI Development Guidelines MCP Server

An MCP (Model Context Protocol) server that provides AI agents with professional development guidelines, coding standards, and best practices. The server uses an AI orchestration layer powered by Anthropic Claude to intelligently select and deliver the right documentation based on incoming agent requests.

Features

  • Professional Coding Rules: Comprehensive standards for writing production-quality code
  • Development Skills: Best practices for problem-solving, debugging, testing, and more
  • AI Steering Instructions: Context-aware guidance for AI agents
  • AI Orchestration: Intelligent document selection using Claude
  • MCP Protocol: Standard protocol for AI agent communication
  • CI/CD Pipeline: GitLab CI/CD with automated testing and deployment
  • Token Optimization: Monitors and optimizes token usage (~60% compression)
  • Feedback Collection: Tracks usage patterns and performance metrics
  • Compressed Caching: Efficient delivery with gzip compression (59.7% reduction)

Architecture

The server implements the Model Context Protocol and provides:

  1. Resources: Documentation files accessible via MCP resource URIs
  2. Tools: Four main tools for retrieving guidelines:
    • get_coding_rules: Professional coding standards
    • get_development_skills: Development best practices
    • get_steering_instructions: AI agent guidance
    • get_custom_guidance: AI-curated context-specific advice

Installation

Prerequisites

  • Python 3.11+
  • Anthropic API key (optional, but required for get_custom_guidance tool)

Setup

  1. Clone this repository

  2. Install dependencies:

    pip install -r requirements.txt
    

    or with uv:

    uv sync
    
  3. (Optional) Set your Anthropic API key for AI-powered custom guidance:

    export ANTHROPIC_API_KEY="your-api-key-here"
    

    Note: The server works without an API key, but the get_custom_guidance tool will return a graceful error message directing users to the other three tools. The static documentation tools (get_coding_rules, get_development_skills, get_steering_instructions) work fully without any API key.

Usage

Running the MCP Server

python main.py

The server runs as an MCP stdio server, communicating over standard input/output.

MCP Client Configuration

To use this server with an MCP client (like Claude Desktop), add it to your MCP configuration:

{
  "mcpServers": {
    "ai-dev-guidelines": {
      "command": "python",
      "args": ["/path/to/this/repo/main.py"],
      "env": {
        "ANTHROPIC_API_KEY": "your-api-key"
      }
    }
  }
}

Available Tools

1. get_coding_rules

Get professional coding rules and standards for writing production-quality code.

# No parameters required
result = await session.call_tool("get_coding_rules", {})

2. get_development_skills

Get development skills, best practices, and professional techniques.

# No parameters required
result = await session.call_tool("get_development_skills", {})

3. get_steering_instructions

Get AI agent steering instructions for context-aware development.

# No parameters required
result = await session.call_tool("get_steering_instructions", {})

4. get_custom_guidance

Get AI-curated guidance tailored to your specific development context.

# Requires query parameter
result = await session.call_tool("get_custom_guidance", {
    "query": "How do I implement secure authentication in a Python web app?",
    "context": "Building a Flask application with user login"  # optional
})

Available Resources

The server exposes three documentation resources:

  • guidelines://rules - Professional Coding Rules
  • guidelines://skills - Development Skills & Practices
  • guidelines://steering - AI Steering Instructions

Configuration

Edit config.yaml to customize:

  • Server name and version
  • Documentation file paths
  • AI model settings (model, max_tokens, temperature)
  • Tool descriptions

Documentation

The server includes three main documentation files in the docs/ directory:

  • rules.md: Professional coding standards, security practices, testing requirements
  • skills.md: Development skills from debugging to API design
  • steering.md: AI agent guidance for effective code generation

You can customize these documents to match your organization's standards.

Project Structure

.
├── main.py                    # Entry point
├── config.yaml                # Configuration
├── src/
│   ├── mcp_server.py         # Main MCP server implementation
│   ├── ai_orchestrator.py    # AI-powered context selector
│   └── utils/
│       ├── config.py          # Configuration management
│       └── document_loader.py # Documentation file loader
├── docs/
│   ├── rules.md              # Coding rules
│   ├── skills.md             # Development skills
│   └── steering.md           # AI steering
└── README.md

How It Works

  1. Agent Request: An AI agent calls one of the MCP tools
  2. Document Loading: The server loads relevant documentation from markdown files
  3. AI Orchestration (for custom guidance): Claude analyzes the query and selects relevant content
  4. Response: The server returns targeted, actionable guidance

Development

Running Tests

pytest

Adding New Documentation

  1. Create or edit markdown files in docs/
  2. Update config.yaml to reference new files
  3. Restart the server

Customizing AI Behavior

Edit the system prompts in src/ai_orchestrator.py to change how the AI selects and presents documentation.

Environment Variables

  • ANTHROPIC_API_KEY: Required for AI orchestration features

License

MIT

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues.

Support

For issues or questions, please open a GitHub issue.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选