
flesler/mcp-files
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
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
- 🛠️ Available Tools
- ⚡ Surgical Code Editing: Surgical Precision
- 🎛️ Environment Variables
- 🖥️ Server Usage
- 💻 CLI Usage
- 🏗️ Architecture
- 🧪 Development
- 🛠️ Troubleshooting
- 📝 License
- 🔗 Links
🚀 Quick Start
Option 1: NPX (Recommended)
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
Установка
npx -y mcp-filesКонфигурация
{
"mcpServers": {
"mcp-files": {
"command": "npx",
"args": ["-y", "mcp-files"]
}
}
}