FM

flesler/mcp-files

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

10 stars 5 forks 品質 83 トレンド 16MIT

A comprehensive MCP server providing helpful tools for AI agents like Cursor

概要

Enables agents to quickly find and edit code in a codebase with surgical precision. Find symbols, edit them everywhere. Add this to ~/.cursor/mcp.json for Cursor, ~/.config/claude_desktop_config.json for Claude Desktop. The combination of read_symbol + insert_text unlocks that transform how AI agents work with codebases. - Find ANY symbol(s) ANYWHERE in your codebase: - Make precise modifications using exact line ranges: - Find any symbol across entire repositories instantly - No manual searching through files and folders - Perfect accuracy even in massive codebases - Edit exact functions, classes, or code blocks - Replace implementations without affecting surrounding code - Insert enhancements at perfect locations - Update function signatures everywhere they exist - Modify APIs across all files simultaneously - Fix bugs with surgical precision across entire codebase

README

以下は原文 README の抜粋です。原文を見る。

MCP Tools

Enables agents to quickly find and edit code in a codebase with surgical precision. Find symbols, edit them everywhere.

📋 Table of Contents

🚀 Quick Start

Add this to ~/.cursor/mcp.json for Cursor, ~/.config/claude_desktop_config.json for Claude Desktop.

{
  "mcpServers": {
    "mcp-files": {
      "command": "npx",
      "args": ["-y", "mcp-files"]
    }
  }
}

Option 2: Docker

{
  "mcpServers": {
    "mcp-files": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "flesler/mcp-files"
      ]
    }
  }
}

Option 3: HTTP transport

First run the server:

TRANSPORT=http PORT=3000 npx mcp-files

Then:

{
  "mcpServers": {
    "mcp-files": {
      "type": "streamableHttp",
      "url": "http://localhost:3000/mcp"
    }
  }
}

🛠️ Available Tools

Tool Description Parameters
read_symbol Find and extract code blocks by symbol name(s) from files. Supports multiple symbols via array symbols (string[]), file_paths[]?, limit?, optimize?
import_symbol Import and inspect JavaScript/TypeScript modules and their properties module_path, property?
search_replace Search and replace with intelligent whitespace handling and automation-friendly multiple match resolution file_path, old_string, new_string, allow_multiple_matches?
insert_text Insert/replace text at precise line ranges. Perfect for direct line operations from code citations (12:15:file.ts) and surgical edits in large files file_path, from_line, text, to_line
os_notification Send OS notifications using native notification systems message, title?

⚡ Surgical Code Editing: Surgical Precision

GitHub で README 全文を見る

インストール

npx -y mcp-files
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "mcp-files": { "command": "npx", "args": ["-y", "mcp-files"] } } }