AI Dev Assistant

AI Dev Assistant

Bridges Claude Desktop to local Windows 10 development environments to enable repository reading, documentation searching, and isolated code execution. It provides a secure interface for running allowlisted terminal commands and scripts directly through natural language.

Category
访问服务器

README

🤖 AI Dev Assistant — MCP Server

A production-ready Model Context Protocol (MCP) Server that bridges Claude Desktop directly to your local Windows 10 development environment. Give Claude the ability to read your code, run scripts, search docs, and execute safe terminal commands — all without leaving the chat.


✨ What It Does

This server extends Claude Desktop with four powerful developer tools:

Tool What It Does
github_repo_reader Recursively reads any local repo (ignores .git, node_modules, binaries)
code_executor Runs Python or Node.js snippets in isolated child processes
doc_search Full-text keyword search across your local docs/ folder
terminal_commander Executes safe CMD/PowerShell commands via a strict allowlist

🏗️ Project Structure

ai-dev-assistant-mcp/
├── src/
│   ├── index.ts                  ← MCP server entry point & tool registry
│   └── tools/
│       ├── repoReader.ts         ← GitHub Repo Reader tool
│       ├── codeExecutor.ts       ← Code Executor tool
│       ├── docSearch.ts          ← Doc Search tool
│       └── terminalCommander.ts  ← Terminal Commander tool
├── dist/                         ← Compiled JavaScript (generated by `npm run build`)
├── claude_desktop_config.json    ← Example Claude Desktop config block
├── package.json
├── tsconfig.json
└── README.md

⚙️ Setup (Windows 10)

Prerequisites

  • Node.js v18 or higher — verify with node --version
  • Python 3 (optional, only needed for the code_executor Python runtime)
  • Claude Desktop installed

Step 1 — Clone / Place the Project

Place this project folder somewhere permanent, for example:

C:\ai-dev-assistant-mcp\

⚠️ Do not move the folder later — Claude Desktop will reference the compiled path.

Step 2 — Install Dependencies

Open a terminal in the project root and run:

cd C:\ai-dev-assistant-mcp
npm install

Step 3 — Build the TypeScript

npm run build

This compiles src/ → dist/. You should see dist/index.js appear.

Step 4 — Configure Claude Desktop

Open (or create) the Claude Desktop config file at:

%APPDATA%\Claude\claude_desktop_config.json

Paste in the following block (adjust the path if you placed the project elsewhere):

{
  "mcpServers": {
    "ai-dev-assistant": {
      "command": "node",
      "args": [
        "C:\\ai-dev-assistant-mcp\\dist\\index.js"
      ],
      "env": {}
    }
  }
}

💡 Already have other MCP servers? Just add the "ai-dev-assistant" key inside your existing "mcpServers" object.

Step 5 — Restart Claude Desktop

Fully quit and relaunch Claude Desktop. You should see the 🔧 tools icon in the chat input bar — click it to confirm all four tools appear.


🔒 Security Architecture

Terminal Commander Safe List

The terminal_commander tool will refuse to run any command whose base name is not on the explicit allowlist in src/tools/terminalCommander.ts:

const SAFE_COMMANDS_ALLOWLIST: Set<string> = new Set([
  "dir", "ls", "git", "node", "npm", "npx", "python",
  "tsc", "docker", "ipconfig", "ping", "whoami", ...
]);

Additionally, even allowlisted commands are blocked if they match any dangerous pattern:

rm -rf     del /s     format C:     shutdown
taskkill   net user   netsh         Invoke-Expression
curl | bash           registry edits   UAC elevation ...

To add a new command, edit SAFE_COMMANDS_ALLOWLIST in src/tools/terminalCommander.ts, then rebuild:

npm run build

Code Executor Sandbox

  • Scripts run in isolated temp files — no persistent state between calls
  • 15-second hard timeout — runaway processes are killed automatically
  • 64 KB output cap — prevents memory exhaustion from verbose output
  • Temp files are deleted immediately after execution

Repo Reader Limits

  • Ignores: .git, node_modules, .next, dist, __pycache__, .venv, etc.
  • Skips: binary files, images, archives, .lock files
  • 500 KB per-file cap — large generated files are skipped automatically
  • 500 file maximum per call

🛠️ Usage Examples

Once connected to Claude Desktop, you can ask Claude:

"Read my repo at C:\Projects\my-api and explain the architecture."

"Run this Python script and tell me the output:
  import json; print(json.dumps({'status': 'ok', 'count': 42}))"

"Search my docs folder at C:\Projects\my-api\docs for 'authentication'"

"Run git status in C:\Projects\my-api"

"What files are in C:\Projects? Run dir."

🔧 Development

Watch Mode (auto-recompile on save)

npm run watch

Run Without Building (ts-node)

npm run dev

Add a New Tool

  1. Create src/tools/myTool.ts — export a function returning { name, description, inputSchema, handler }
  2. Import it in src/index.ts and add it to the tools array
  3. Run npm run build
  4. Restart Claude Desktop

🪟 Windows Path Notes

Windows paths use backslashes. In JSON config files, always double-escape them:

"C:\\Users\\YourName\\Projects\\my-repo"

In Claude prompts, you can use either style — the tools normalize paths internally using Node's path.resolve().


📦 Tech Stack

Layer Technology
Language TypeScript 5.x
Runtime Node.js 18+
MCP SDK @modelcontextprotocol/sdk
Process execution Node.js child_process.spawn
Transport stdio (standard MCP transport)

🤝 How It Bridges Claude and Windows

┌─────────────────────────────────────────────────┐
│                  Claude Desktop                  │
│  ┌─────────────────────────────────────────────┐ │
│  │   Claude AI (Claude Sonnet / Opus)          │ │
│  │   → Decides which tool to call              │ │
│  └─────────────┬───────────────────────────────┘ │
└────────────────┼────────────────────────────────┘
                 │ MCP Protocol (stdio JSON-RPC)
┌────────────────▼────────────────────────────────┐
│           AI Dev Assistant MCP Server            │
│  ┌──────────────┐  ┌──────────────────────────┐  │
│  │ Repo Reader  │  │     Code Executor         │  │
│  │ (fs module)  │  │  (child_process.spawn)    │  │
│  └──────────────┘  └──────────────────────────┘  │
│  ┌──────────────┐  ┌──────────────────────────┐  │
│  │  Doc Search  │  │   Terminal Commander      │  │
│  │ (fs + regex) │  │   (cmd.exe / pwsh.exe)   │  │
│  └──────────────┘  └──────────────────────────┘  │
└─────────────────────────────┬───────────────────┘
                              │
              ┌───────────────▼───────────────┐
              │     Windows 10 File System    │
              │     Python / Node Runtimes    │
              │     Git / npm / Docker        │
              └───────────────────────────────┘

Claude sends a tool-call request over stdio. The MCP server validates it, executes the appropriate handler, and returns formatted Markdown back to Claude — which presents it naturally in the conversation.


📄 License

MIT — free to use, modify, and build upon.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选