Claude Dev Server
Claude Dev Server
A Model Context Protocol (MCP) server that enables Claude to assist in software development by providing direct file system access within a specified workspace.
Features
- š Read file contents
- āļø Write and modify files
- š Create directories
- š List files and directories
- ā¹ļø Get file information
- š ļø Implement code artifacts directly from Claude
Installation
- Make sure you have Python 3.10 or higher installed
- Create a new project directory:
- Set up a virtual environment using UV:
- Install the package in editable mode:
Project Structure
Configuration
To use the server with Claude Desktop, add it to your Claude Desktop configuration file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Add this configuration:
Replace:
PATH_TO_YOUR_PROJECT
with the absolute path to your mcp-claude-dev directoryPATH_TO_YOUR_WORKSPACE
with the absolute path to the directory where Claude should have file access
Usage
- Start Claude Desktop
- The server will appear in the tools menu (hammer icon)
- You can now ask Claude to:
- Read files: "Can you read the contents of file.txt?"
- Write files: "Create a new file called example.py with a basic Flask app"
- List directories: "What files are in the current directory?"
- Create directories: "Create a new directory called 'src'"
- Get file info: "What's the size and modification date of main.py?"
- Implement code: "Write a Python function to calculate Fibonacci numbers and save it in math_utils.py"
Security Notes
- The server only allows access to files within the specified workspace directory
- All file operations require explicit paths relative to the workspace
- Directory traversal attempts outside the workspace are blocked
- File watching is implemented for change detection
Development
To contribute to the project:
- Clone the repository
- Install development dependencies
- Make your changes
- Test thoroughly before submitting a pull request
Running Tests
Available Tools
The server exposes these MCP tools:
read_file(path: str) -> str
: Read file contentswrite_file(path: str, content: str) -> str
: Write content to filelist_files(path: str = "") -> str
: List directory contentscreate_directory(path: str) -> str
: Create new directoryget_file_info(path: str) -> str
: Get file metadataimplement_artifact(path: str, content: str) -> str
: Save code artifacts
Error Handling
The server includes robust error handling for:
- Invalid paths
- Access attempts outside workspace
- File operation failures
- Permission issues
License
MIT License - feel free to use and modify as needed.
Contributing
Contributions are welcome! Please read our contributing guidelines and submit pull requests for any improvements.
The Claude Dev Server enables direct interaction with the file system within a specified workspace, allowing users to perform file and directory operations and implement code artifacts in software development using natural language commands.