NE

neilberkman/editorconfig_mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

5 stars 3 forks 품질 54 트렌드 13MIT

A Model Context Protocol (MCP) compliant server that formats files using .editorconfig rules.

개요

A Model Context Protocol (MCP) compliant server that formats files using .editorconfig rules. This project started from a specific workflow issue I kept running into. I found that while working with AI coding agents, they would often generate code with minor formatting errors, like trailing whitespace or inconsistent newlines. Our linters would then flag these issues, and the agent would spend valuable cycles fixing its own simple mistakes. This EditorConfig MCP Server is the tool I built to solve that problem for myself. It acts as a proactive formatting gatekeeper, using your project's .editorconfig rules to ensure files are correct from the start. My hope is that it might be useful to others who've encountered a similar frustration in their AI-assisted development process. Then add to your project's scripts in package.

README

원문 README의 일부입니다. 원문 보기.

EditorConfig MCP Server

A Model Context Protocol (MCP) compliant server that formats files using .editorconfig rules.

This project started from a specific workflow issue I kept running into. I found that while working with AI coding agents, they would often generate code with minor formatting errors, like trailing whitespace or inconsistent newlines. Our linters would then flag these issues, and the agent would spend valuable cycles fixing its own simple mistakes.

This EditorConfig MCP Server is the tool I built to solve that problem for myself. It acts as a proactive formatting gatekeeper, using your project’s .editorconfig rules to ensure files are correct from the start. My hope is that it might be useful to others who’ve encountered a similar frustration in their AI-assisted development process.

Installation

npm install -g editorconfig-mcp-server

Then start the server:

editorconfig-mcp-server

Using npx (No Installation)

npx editorconfig-mcp-server

Local Installation

npm install editorconfig-mcp-server

Then add to your project’s scripts in package.json:

{
  "scripts": {
    "format-server": "editorconfig-mcp-server"
  }
}

From Source

git clone https://github.com/yourusername/editorconfig-mcp-server.git
cd editorconfig-mcp-server
npm install
npm start

Features

  • MCP Compliant: Follows all MCP design patterns and best practices
  • JSON Schema Validation: All inputs are validated using JSON Schema
  • Rate Limiting: Built-in rate limiting (100 requests/minute)
  • OpenAPI Spec: Self-documenting API with OpenAPI 3.0 specification
  • Versioned API: Uses semantic versioning with /v1/ prefix
  • Stateless: No state retained between requests
  • Security: Path validation prevents directory traversal attacks
  • Error Handling: Consistent error format with helpful hints

Installation

npm install

Usage

Starting the Server

# If installed globally
editorconfig-mcp-server

# Using npx
npx editorconfig-mcp-server

# With custom port
PORT=8080 editorconfig-mcp-server

# From source
npm start

The server will start on port 8432 by default.

Configuration

  • PORT - Server port (default: 8432)
    • Default port chosen to avoid conflicts with common development servers
    • Example: PORT=8080 editorconfig-mcp-server

Integration with AI Tools

Claude Code

To add this server to Claude Code, run:

claude mcp add editorconfig npx editorconfig-mcp-server

Other MCP-Compatible Tools

This server is designed to be used with AI coding assistants that support MCP. Configure your AI tool to connect to:

  • Base URL: http://localhost:8432
  • Protocol: MCP over HTTP

API Endpoints

Tools (Actions)

POST /v1/tools/format_file

Format a single file using .editorconfig rules.

Request:

{
GitHub에서 전체 README 보기

설치

npx editorconfig-mcp-server
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →