Sponsored by Deepsite.site

MCP Server for Software Development

Created By
kvas-it10 months ago
An MCP server that provides filesystem access to Claude desktop
Content

MCP Server for Software Development

An MCP server that provides filesystem and shell access to Claude desktop.

Architecture

Claude ←→ MCP Server ←→ Unix Socket ←→ Filesystem Daemon
       (2 tools)      (JSON RPC)     (file operations, shell)

Key Benefits

  • Single permission prompt (2 tools vs 15+ in original)
  • Environment control (daemon runs with proper venv/directory)
  • Terminal visibility (all operations logged with context)
  • Dynamic discovery (operations auto-documented)
  • Rich error handling (detailed errors with suggestions)
  • Type safety (parameter schemas with validation)

Quick Start

  1. Start the filesystem daemon (in your target directory):

    python fs_access.py           # Normal mode
    python fs_access.py --verbose # Verbose mode (shows shell output, file contents, edit details)
    
  2. Connect Claude to the MCP server via configuration:

    {
      ...
      "mcpServers": {
        "Dev": {
          "command": "uv",
          "args": [
            "run",
            "--with",
            "fastmcp",
            "$path/mcp-server-dev/mcp_server.py"
          ]
        }
      }
    }
    
  3. Test the integration:

    • Check that Dev is visible in the "search and tools" menu in Claude Desktop
    • Run the filesystem access server and talk to Claude to see if it can use the tools.

MCP Tools Available to Claude

1. get_available_operations()

  • Purpose: Discover available filesystem operations and their schemas
  • Returns: Dict with operation schemas including types, descriptions, defaults

2. execute_fs_operation(operation, params)

  • Purpose: Execute a filesystem operation via the daemon
  • Parameters:
    • operation: Name of operation (string)
    • params: Parameters for the operation (dict)
  • Returns: Dict with success status, result/error, and logs

Available Operations

File Operations

ls(path=".")

List files and directories in the specified path.

  • Example: execute_fs_operation("ls", {})
  • Example: execute_fs_operation("ls", {"path": "/tmp"})

read_file(path)

Read file contents as UTF-8 string.

  • Example: execute_fs_operation("read_file", {"path": "README.md"})

write_file(path, content)

Write content to file (creates or overwrites).

  • Example: execute_fs_operation("write_file", {"path": "test.txt", "content": "Hello world!"})

edit_file(path, changes)

Apply search/replace operations to file.

  • Example:
execute_fs_operation("edit_file", {
    "path": "config.py",
    "changes": [
        ["DEBUG = False", "DEBUG = True"],
        ["localhost", "production.com"]
    ]
})

Directory Management

mkdir(path)

Create directory and any necessary parent directories.

  • Example: execute_fs_operation("mkdir", {"path": "project/src/utils"})

rmdir(path)

Remove directory and all its contents recursively (use with caution!).

  • Example: execute_fs_operation("rmdir", {"path": "temp_project"})

File & Directory Management

rm(path)

Remove a file or empty directory.

  • Example: execute_fs_operation("rm", {"path": "unwanted_file.txt"})
  • Example: execute_fs_operation("rm", {"path": "empty_dir"}) (only if empty)

mv(src, dst)

Move or rename files and directories.

  • Example: execute_fs_operation("mv", {"src": "old_name.txt", "dst": "new_name.txt"})
  • Example: execute_fs_operation("mv", {"src": "temp", "dst": "project/temp"})

Shell Commands

shell(command, args=[], timeout=30)

Execute shell commands and return stdout, stderr, exit_code.

  • Example: execute_fs_operation("shell", {"command": "git", "args": ["status"]})
  • Example: execute_fs_operation("shell", {"command": "python", "args": ["--version"]})
  • Example: execute_fs_operation("shell", {"command": "find", "args": [".", "-name", "*.py"], "timeout": 60})
  • Returns: {"stdout": "...", "stderr": "...", "exit_code": 0, "command": "...", "working_directory": "..."}

Error Handling

  • Connection errors: Daemon not running → helpful hints provided
  • Invalid operations: Lists available operations with signatures
  • File errors: Detailed error types (FileNotFoundError, PermissionError, etc.)
  • Parameter errors: Type validation and requirements checking

Usage Pattern for Claude

  1. Discovery: Call get_available_operations() to see what's available
  2. Execution: Call execute_fs_operation(operation_name, params_dict)

Core Files

  • fs_access.py - Filesystem daemon with all operations
  • mcp_server.py - MCP server providing Claude interface
  • socket_protocol.py - Unix socket communication layer
  • shell_examples.py - Example shell commands
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
ChatWiseThe second fastest AI chatbot™
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Amap Maps高德地图官方 MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Tavily Mcp
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
DeepChatYour AI Partner on Desktop
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Serper MCP ServerA Serper MCP Server
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
CursorThe AI Code Editor
WindsurfThe new purpose-built IDE to harness magic
Playwright McpPlaywright MCP server