Local Dev Bridge MCP

Local Dev Bridge MCP

Provides Claude Desktop with direct access to your local file system for development tasks, enabling file operations (read, write, edit), directory browsing, command execution, and codebase search within a configured projects directory.

Category
访问服务器

README

Local Dev Bridge MCP

A Model Context Protocol (MCP) server that provides Claude Desktop with direct access to your local file system for development tasks. This tool enables Claude to read, write, edit files, run commands, and search through your codebase.

Features

  • 📖 Read files - View contents of any file in your project
  • ✏️ Write files - Create new files or overwrite existing ones
  • 🔧 Edit files - Make precise edits by replacing specific text
  • 📁 Browse directories - List contents of folders
  • 💻 Run commands - Execute shell commands (npm, git, tests, etc.)
  • 🔍 Search files - Search for text across your entire codebase

Prerequisites

  • Node.js 16 or higher
  • npm or yarn
  • Claude Desktop application

Installation

Step 1: Clone the Repository

git clone https://github.com/YOUR_USERNAME/local-dev-bridge-mcp.git
cd local-dev-bridge-mcp

Step 2: Install Dependencies

npm install

Step 3: Configure Claude Desktop

  1. Open Claude Desktop settings

  2. Navigate to the "Developer" section

  3. Find the MCP configuration file location:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  4. Edit the configuration file and add the local-dev-bridge server:

{
  "mcpServers": {
    "local-dev-bridge": {
      "command": "node",
      "args": ["/absolute/path/to/local-dev-bridge-mcp/index.js"],
      "env": {
        "PROJECTS_DIR": "/Users/YOUR_USERNAME/Desktop/Projects"
      }
    }
  }
}

Important: Replace the following:

  • /absolute/path/to/local-dev-bridge-mcp/index.js with the actual path to where you cloned this repository
  • /Users/YOUR_USERNAME/Desktop/Projects with the path to your projects directory

Step 4: Restart Claude Desktop

After saving the configuration file, completely quit and restart Claude Desktop for the changes to take effect.

Configuration

Setting the Projects Directory

The MCP server uses a base directory for all file operations. By default, it uses ~/Desktop/Projects. You can customize this by setting the PROJECTS_DIR environment variable in the Claude configuration:

"env": {
  "PROJECTS_DIR": "/your/custom/path"
}

Usage

Once installed, Claude will have access to the following tools:

Read a File

Ask Claude to read any file in your project:

  • "Read the package.json file"
  • "Show me the contents of src/index.js"

Write a File

Create new files or replace existing ones:

  • "Create a new React component in src/components/Button.jsx"
  • "Write a README.md file"

Edit a File

Make specific changes to existing files:

  • "Change the port number from 3000 to 8080 in server.js"
  • "Update the version in package.json to 2.0.0"

List Directory Contents

Browse your project structure:

  • "What files are in the src folder?"
  • "List all directories in the project"

Run Commands

Execute shell commands:

  • "Run npm install"
  • "Execute the test suite"
  • "Initialize a git repository"

Search Files

Find text across your codebase:

  • "Search for 'TODO' in all JavaScript files"
  • "Find all occurrences of 'useState' in the project"

Security Considerations

⚠️ Important: This tool provides Claude with direct access to your file system. Please note:

  1. File System Access: Claude can read, write, and execute commands in the configured directory
  2. Scope Limitation: Operations are limited to the PROJECTS_DIR path and its subdirectories
  3. Command Execution: Be cautious when allowing command execution capabilities
  4. Sensitive Data: Avoid using this in directories containing sensitive credentials or private keys

Troubleshooting

MCP Server Not Appearing in Claude

  1. Ensure the path in claude_desktop_config.json is absolute and correct
  2. Check that Node.js is installed and accessible from the command line
  3. Verify the configuration JSON is valid (no syntax errors)
  4. Completely quit and restart Claude Desktop (not just close the window)

Permission Errors

  • On macOS/Linux, ensure the script has execute permissions:
    chmod +x index.js
    
  • Verify that Claude Desktop has permissions to access your projects directory

Server Connection Issues

Check the Claude Desktop logs for error messages:

  • macOS: ~/Library/Logs/Claude/
  • Windows: %APPDATA%\Claude\Logs\
  • Linux: ~/.config/Claude/Logs/

Development

Running Locally for Testing

You can test the MCP server standalone:

npm start

This will start the server on stdio, which you can interact with for debugging.

Adding New Tools

To add new tools, modify the setupToolHandlers() method in index.js:

  1. Add the tool definition in the ListToolsRequestSchema handler
  2. Implement the tool logic in the CallToolRequestSchema handler
  3. Create a corresponding method in the class

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Support

For issues and questions, please open an issue on GitHub.


Quick Start for Team Members

For macOS Users:

# 1. Clone the repo
git clone https://github.com/YOUR_USERNAME/local-dev-bridge-mcp.git
cd local-dev-bridge-mcp

# 2. Install dependencies
npm install

# 3. Get the full path
pwd  # Copy this path

# 4. Edit Claude config
open ~/Library/Application\ Support/Claude/claude_desktop_config.json

# 5. Add the configuration (see Step 3 above)
# 6. Restart Claude Desktop

For Windows Users:

# 1. Clone the repo
git clone https://github.com/YOUR_USERNAME/local-dev-bridge-mcp.git
cd local-dev-bridge-mcp

# 2. Install dependencies
npm install

# 3. Get the full path
pwd  # Copy this path

# 4. Edit Claude config
notepad $env:APPDATA\Claude\claude_desktop_config.json

# 5. Add the configuration (see Step 3 above)
# 6. Restart Claude Desktop

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选