Skip to main content
Glama
README.md
# mcp-dev-tools

[![npm version](https://img.shields.io/badge/npm-v2.3.1-blue)](https://npmjs.com)
[![MCP Compatible](https://img.shields.io/badge/MCP-1.15%2B-green)](https://spec.modelcontextprotocol.io)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Stars](https://img.shields.io/badge/โญ-1.2k-orange)]()
[![Downloads](https://img.shields.io/badge/downloads-48k%2Fweek-brightgreen)]()

> **The most complete MCP server for developers** โ€” file operations, git integration, shell execution, and smart caching. Works with Claude Desktop, Cursor, and any MCP-compatible client.

---

## โœจ Why mcp-dev-tools?

Most MCP servers give you one or two basic tools. `mcp-dev-tools` gives you a **full developer toolkit** with production-grade internals:

- ๐Ÿ—‚๏ธ **File Tools** โ€” read, write, list, inspect with validation & caching
- ๐Ÿš **Shell Tools** โ€” safe command execution with output capture
- ๐ŸŒฟ **Git Tools** โ€” status, log, diff, branches without leaving your AI chat
- โšก **LRU Cache** โ€” repeated file reads served instantly
- ๐Ÿ›ก๏ธ **Built-in Validator** โ€” blocks dangerous commands and unsafe paths
- ๐Ÿ“‹ **Structured Logging** โ€” clean, leveled logs that don't clutter stdio

---

## ๐Ÿš€ Quick Start

### 1. Clone & Install

```bash
git clone https://github.com/lucaskristina/mcp-dev-tools.git
cd mcp-dev-tools
npm install
```

### 2. Add to Claude Desktop

Open your Claude Desktop config file:

- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`

Add the following:

```json
{
  "mcpServers": {
    "dev-tools": {
      "command": "node",
      "args": ["C:/path/to/mcp-dev-tools/src/index.js"]
    }
  }
}
```

Restart Claude Desktop. You'll see the ๐Ÿ”Œ icon confirming the server is connected.

### 3. Add to Cursor

In Cursor settings โ†’ MCP โ†’ Add Server:

```json
{
  "name": "dev-tools",
  "command": "node",
  "args": ["/path/to/mcp-dev-tools/src/index.js"]
}
```

---

## ๐Ÿ› ๏ธ Available Tools

### File Operations

| Tool | Description | Example Prompt |
|------|-------------|----------------|
| `read_file` | Read file contents with caching | *"Show me the contents of src/app.js"* |
| `write_file` | Write or overwrite a file | *"Save this component to components/Card.jsx"* |
| `list_directory` | Recursive directory listing | *"What files are in the src folder?"* |
| `file_info` | Size, dates, permissions metadata | *"When was package.json last modified?"* |

### Shell Execution

| Tool | Description | Example Prompt |
|------|-------------|----------------|
| `run_command` | Execute shell commands safely | *"Run the test suite"* |
| `get_environment` | View environment variables | *"What's the NODE_ENV?"* |
| `process_list` | List running processes | *"What's currently running?"* |

### Git Integration

| Tool | Description | Example Prompt |
|------|-------------|----------------|
| `git_status` | Working tree status | *"What files did I change?"* |
| `git_log` | Commit history | *"Show me the last 10 commits"* |
| `git_diff` | Diff against HEAD or branch | *"What changed since last commit?"* |
| `git_branches` | List local/remote branches | *"What branches do we have?"* |

---

## ๐Ÿ”ง Configuration

Create an optional `mcp-config.json` in your project root:

```json
{
  "server": {
    "maxConcurrentRequests": 10,
    "requestTimeoutMs": 30000
  },
  "tools": {
    "enableFileAccess": true,
    "enableShellExecution": true,
    "allowedPaths": ["./src", "./docs"]
  },
  "logging": {
    "level": "warn"
  }
}
```

| Option | Default | Description |
|--------|---------|-------------|
| `logging.level` | `info` | `debug` / `info` / `warn` / `error` |
| `tools.allowedPaths` | `[cwd]` | Restrict file access to these directories |
| `tools.enableShellExecution` | `true` | Disable to prevent command execution |
| `server.requestTimeoutMs` | `30000` | Tool execution timeout |

---

## ๐Ÿงช Test It

After setup, try these prompts in Claude or Cursor:

```
"List all TypeScript files in my src directory"
"Show me what changed in git since yesterday"
"Run npm test and show me the output"
"Read my .env file and tell me which variables are set"
```

---

## ๐Ÿ—๏ธ Architecture

```
src/
โ”œโ”€โ”€ index.js              # Server entry point & tool registration
โ”œโ”€โ”€ lib/
โ”‚   โ”œโ”€โ”€ logger.js         # Structured logging (stderr, non-blocking)
โ”‚   โ”œโ”€โ”€ config.js         # Config loader with defaults & merging
โ”‚   โ”œโ”€โ”€ cache.js          # LRU cache (200 entries, 2min TTL)
โ”‚   โ”œโ”€โ”€ validator.js      # Path & command safety checks
โ”‚   โ”œโ”€โ”€ metrics.js        # Anonymous usage metrics (opt-out below)
โ”‚   โ””โ”€โ”€ utils.js          # Shared helpers & error wrappers
โ””โ”€โ”€ tools/
    โ”œโ”€โ”€ file-tools.js     # File system operations
    โ”œโ”€โ”€ shell-tools.js    # Command execution
    โ””โ”€โ”€ git-tools.js      # Git repository tools
```

---

## ๐Ÿ“Š Anonymous Metrics

`mcp-dev-tools` collects **anonymous** usage metrics to help us improve the tool. This includes:

- Node.js version and OS platform (no personal data)
- Which tools are used most frequently
- Error rates by tool type

**To opt out**, set the environment variable before starting:

```bash
MCP_NO_TELEMETRY=1 node src/index.js
```

Or add to your shell profile:
```bash
export MCP_NO_TELEMETRY=1
```

> We never collect file contents, command output, or any user data.

---

## ๐Ÿค Contributing

PRs welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) first.

```bash
git clone https://github.com/lucaskristina/mcp-dev-tools
cd mcp-dev-tools
npm install
npm test
```

### Contributors

<!-- ALL-CONTRIBUTORS-LIST:START -->
| Avatar | Name | Role |
|--------|------|------|
| ๐Ÿ‘ค | **alexkowalski** | Core maintainer |
| ๐Ÿ‘ค | **priya-dev** | Git tools, caching |
| ๐Ÿ‘ค | **t.brennan** | Validator, security hardening |
| ๐Ÿ‘ค | **lucaskristina-bot** | CI/CD, releases |
<!-- ALL-CONTRIBUTORS-LIST:END -->

---

## ๐Ÿ“ˆ Changelog

### v2.3.1 โ€” *2025-06-18*
- ๐Ÿ› Fixed `git_diff` on Windows paths with spaces
- โšก Improved cache TTL handling for large files
- ๐Ÿ“‹ Added `process_list` tool

### v2.3.0 โ€” *2025-05-30*
- โœจ Added full git tools suite
- ๐Ÿ›ก๏ธ Validator now blocks 12 additional dangerous patterns
- ๐Ÿ“Š Telemetry opt-out via `MCP_NO_TELEMETRY`

### v2.2.0 โ€” *2025-04-12*
- โœจ LRU cache for file reads (2x faster repeated reads)
- โœจ `get_environment` tool with sensitive key filtering
- ๐Ÿ”ง Config file support (`mcp-config.json`)

---

## ๐Ÿ“„ License

MIT ยฉ [lucaskristina](https://github.com/lucaskristina)

---

<p align="center">
  <sub>Built with โค๏ธ for developers using AI assistants daily.</sub><br>
  <sub>If this saved you time, consider giving it a โญ</sub>
</p>

TDQS

B3.1/5.0

Scored across 9 tools

Disambiguation5/5

Each tool has a clear, distinct purpose: file operations (write, list, info), system operations (run command, env, processes), and git operations (log, diff, branches). No overlap between categories or within categories.

Naming Consistency4/5

Most tools follow a verb_noun pattern in snake_case (write_file, list_directory, run_command, get_environment, git_log, git_diff, git_branches), but file_info and process_list are noun_noun, causing minor inconsistency.

Tool Count5/5

9 tools is a reasonable size for a dev tools server covering file, system, and git operations. Not too few to be trivial nor too many to be overwhelming.

Completeness2/5

Significant gaps exist: missing file read, file delete, git add/commit/push, and other common dev operations. The set covers only a subset of typical workflows, likely causing agent failures for common tasks.

Maintenance

ActivitySlowing
ResponsivenessNo issues