Sponsored by Deepsite.site

Mcp Clean Code

创建者
aidalinfoa year ago
内容

MCP Clean Code

An MCP server implementation that provides a tool for planning and creating clean, well-structured code with comprehensive English comments.

Features

  • Plan code architecture step by step
  • Design modular, maintainable components
  • Follow clean code principles and best practices
  • Create comprehensive documentation with English comments
  • Revise design decisions as requirements become clearer
  • Branch into alternative implementation strategies
  • Focus on code readability and simplicity

Tool

cleancode

Facilitates clean code planning with a focus on readability, maintainability, and well-structured English comments.

Inputs:

  • thought (string): Your current code planning step
  • nextThoughtNeeded (boolean): Whether another code planning step is needed
  • thoughtNumber (integer): Current step number
  • totalThoughts (integer): Estimated total steps needed
  • isRevision (boolean, optional): Whether this revises a previous planning step
  • revisesThought (integer, optional): Which step is being reconsidered
  • branchFromThought (integer, optional): Branching point step number for alternative approach
  • branchId (string, optional): Alternative implementation identifier
  • needsMoreThoughts (boolean, optional): If more planning steps are needed

Usage

The Clean Code tool is designed for:

  • Before writing complex code that needs careful planning
  • When designing new features or refactoring existing code
  • When code structure and organization are critical
  • For ensuring comprehensive documentation with English comments
  • For following clean code principles and best practices
  • For breaking down complex functionality into modular components
  • For planning testable and maintainable implementations

Configuration

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

npm installation

{
  "mcpServers": {
    "cleancode": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-clean-code"
      ]
    }
  }
}

Manual installation

# Install from npm
npm install -g mcp-clean-code

# Then use in configuration
{
  "mcpServers": {
    "cleancode": {
      "command": "mcp-clean-code"
    }
  }
}

PNPM installation

# Install from npm using PNPM
pnpm add -g mcp-clean-code

# Then use in configuration
{
  "mcpServers": {
    "cleancode": {
      "command": "mcp-clean-code"
    }
  }
}

docker

{
  "mcpServers": {
    "cleancode": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "mcp-clean-code"
      ]
    }
  }
}

Building

Docker:

docker build -t mcp-clean-code .

From source:

# Clone the repository
git clone https://github.com/your-username/mcp-clean-code.git
cd mcp-clean-code

# Install dependencies and build
pnpm install
pnpm build

GitHub Actions CI/CD

This repository includes a GitHub Actions workflow that automatically publishes the package to npm when a new release is created.

Setting up for automatic npm publishing

To enable automatic publishing to npm, you need to add an NPM_TOKEN secret to your GitHub repository:

  1. Generate an npm access token:

    • Go to npmjs.com and log in
    • Click on your profile picture in the top right corner and select "Access Tokens"
    • Click "Generate New Token" and choose the "Publish" option
    • Copy the generated token
  2. Add the token to your GitHub repository:

    • Go to your GitHub repository
    • Click on "Settings" > "Secrets and variables" > "Actions"
    • Click "New repository secret"
    • Name: NPM_TOKEN
    • Value: Paste the token you copied from npm
    • Click "Add secret"
  3. Create a new release:

    • Go to your GitHub repository
    • Click on "Releases" > "Create a new release"
    • Choose a tag version (e.g., v1.0.0)
    • Add a release title and description
    • Click "Publish release"

The GitHub Actions workflow will automatically trigger, build the package, and publish it to npm.

License

This MCP server is licensed under the MIT License and is developed by Aidalinfo (https://aidalinfo.fr). You are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License.

推荐的 MCP Server
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
DeepChatYour AI Partner on Desktop
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Serper MCP ServerA Serper MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
WindsurfThe new purpose-built IDE to harness magic
Amap Maps高德地图官方 MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Tavily Mcp
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Playwright McpPlaywright MCP server