codefile
v1.0.2
Published
CodeFile - MCP server for code operations, filesystem management, and project analysis
Downloads
12
Maintainers
Readme
CodeFile - MCP Server for Code Operations
A powerful Model Context Protocol (MCP) server that provides comprehensive code operations, filesystem management, and project analysis capabilities to Claude Desktop and other MCP clients.
Features
🗂️ Filesystem Operations
- Read/Write Files - Read, create, and modify files
- Directory Management - Create, list, and navigate directories
- File Operations - Move, rename, delete files and directories
- Search Files - Find files by name pattern with glob support
🔍 Code Intelligence
- Code Search - Search across codebases with regex support
- Context-Aware Results - Get surrounding lines for better context
- Multi-Language Support - Works with all major programming languages
- Project Analysis - Understand project structure and dependencies
🛠️ Developer Utilities
- Command Execution - Run shell commands with timeout protection
- Data Processing - Parse JSON/YAML, calculate hashes, encode/decode
- Project Insights - Analyze dependencies, find entry points, categorize directories
Quick Start
Installation via npx (Recommended)
- Configure Claude Desktop
Add to your Claude Desktop config:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"codefile": {
"command": "npx",
"args": ["-y", "codefile"]
}
}
}Restart Claude Desktop
Start using! Ask Claude to:
- "Search for TODO comments in my code"
- "Analyze this project structure"
- "Find all functions containing 'async'"
Automatic Setup
npx codefile-setupThis will automatically configure Claude Desktop for you.
Available Tools
File Operations
read_file- Read file contentswrite_file- Write content to fileedit_file- Replace text in filescreate_directory- Create directorieslist_directory- List directory contentsmove_file- Move or rename filesdelete_file- Delete files or directoriessearch_files- Search for files by patternget_file_info- Get file metadata
Code Intelligence
search_code- Search for code patternsanalyze_project_structure- Analyze project organization
Utilities
execute_command- Run shell commandsparse_json- Parse JSON dataparse_yaml- Parse YAML datacalculate_hash- Calculate file hashesencode_decode- Convert between encodings
Examples
Search for patterns in code
Claude: "Find all TODO comments in JavaScript files"Analyze project
Claude: "What kind of project is this and what are its dependencies?"Refactor code
Claude: "Replace all console.log statements with logger.debug"Security
- Path validation and normalization
- Automatic filtering of sensitive directories (.git, node_modules)
- Command execution timeouts
- No arbitrary code execution
Requirements
- Node.js 18.0.0 or higher
- Claude Desktop or any MCP-compatible client
License
MIT
Author
Vincent Emmanuel [email protected]
