mcp-devtools
mcp-devtools
Model Context Protocol を介したAIネイティブな開発者ツール。 AIエージェント(Claude、Cursor、Copilot、Continueなど)に、ローカル開発環境への安全でスコープ制限されたアクセスを提供する本番環境グレードのMCPサーバーです。
なぜこれが必要か
MCPエコシステムは、単一目的のチュートリアルやベンダーロックインされたアダプターで溢れています。日常的な開発ツールとして、十分にメンテナンスされ、マルチツールに対応し、フレームワークに依存しない、本番品質のMCPパッケージは存在しませんでした。
mcp-devtools は、14個のツール、3個のMCPリソース、4個のMCPプロンプト、プラグインAPI、2つのトランスポートモード(stdio + 認証付きHTTP)、そしてDailyBotの本番環境で洗練されたパターンに基づいて構築された監査ログを備え、そのギャップを埋めます。
Related MCP server: GPT Commander
クイックスタート
stdio (デフォルト)
npx @oscarmarin/mcp-devtoolsClaude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json) に追加します:
{
"mcpServers": {
"devtools": {
"command": "npx",
"args": ["-y", "@oscarmarin/mcp-devtools"]
}
}
}または Cursor (~/.cursor/mcp.json):同じブロックを追加します。
HTTPトランスポート
プロジェクトのルートに mcp-devtools.json を作成します:
{
"transport": "http",
"port": 3333,
"auth": {
"token": "env:MCP_AUTH_TOKEN"
}
}次にサーバーを起動します:
npx @oscarmarin/mcp-devtoolsMCPエンドポイントは http://localhost:3333 で利用可能になります。
ツール
グループ | ツール |
ファイルシステム |
|
データベース |
|
プロセス |
|
OpenAPI |
|
ツールごとのリファレンス: docs/tools/。
MCPリソース
このサーバーは、MCPリソースを介して読み取り専用データを公開します:
URI | 説明 |
| スキーマを含む全登録済みツールのカタログ |
| サーバーのバージョン、トランスポート、スコープ、ツール数 |
MCPプロンプト
一般的な開発ワークフロー向けに厳選されたプロンプトテンプレート:
プロンプト | 説明 |
| mcp-devtoolsツールを使用してエラーを体系的にデバッグする |
| ファイルのバグ、セキュリティ問題、コード品質をレビューする |
| プロジェクトの構造と規約を探索・理解する |
| 可読性、パフォーマンス、テスト容易性のために関数をリファクタリングする |
プラグインAPI
mcp-devtools をカスタムツールで拡張できます(フォークは不要です)。
設定ベース(起動時に読み込み):
{
"plugins": ["./my-tools.js", "@scope/mcp-plugin-foo"]
}各プラグインモジュールは、ツール定義の配列をデフォルトエクスポートします:
import { defineTool } from "@oscarmarin/mcp-devtools";
import { z } from "zod";
export default [
defineTool({
name: "my_tool",
description: "Does something useful",
inputSchema: z.object({ input: z.string() }),
handler: async (args, config) => ({
ok: true,
data: { result: args.input.toUpperCase() },
}),
}),
];設定
設定は cosmiconfig によって mcp-devtools.json、.mcp-devtoolsrc、または package.json 内の mcpDevtools キーから読み込まれます。完全なスキーマについては mcp-devtools.example.json および docs/configuration.md を参照してください。
ゼロコンフィグもサポートされています:設定なしで npx @oscarmarin/mcp-devtools を実行すると、スキーマのデフォルト値(RNF-05)が使用されます。
セキュリティ
4つの回避不可能な制御:
ファイルシステムのスコープ境界。 すべてのパスは絶対パスに解決され、
config.scopeと比較されます。スコープ外へ脱出するシンボリックリンクはSCOPE_VIOLATIONをスローします。コマンド許可リスト。
run_commandは、ベース名がallowedCommandsに含まれるバイナリのみを実行します。呼び出しにはspawn(file, args)(シェルなし)を使用するため、コマンド引数を介したシェルインジェクションは構造的に不可能です。データベースの読み取り専用モード。
readOnly: trueの場合、すべてのSQLが解析され、INSERT/UPDATE/DELETE/DROP/CREATE/GRANTは拒否されます。クエリはPostgreSQL上でBEGIN READ ONLY ... ROLLBACKとして実行されます。HTTP Bearer認証。
auth.tokenが設定されている場合、すべてのHTTPリクエストにはAuthorization: Bearer <token>を含める必要があります。比較にはcrypto.timingSafeEqualを使用し、タイミング攻撃を防ぎます。
その他の安全対策:
監査ログ。 すべてのツール呼び出しについて、タイミング、サニタイズされた入力、結果ステータスを含むNDJSONログをオプトインで記録できます。
シークレットのマスキング。
get_envは、一般的なシークレットパターン(SECRET,TOKEN,PASSWORD,KEYなど)に一致する値を自動的にマスクします。OpenAPIホスト制限。
call_apiは、仕様のservers配列にリストされているホストへのリクエストのみを送信します。出力制限。 すべてのツールは、コンテキストの溢れを防ぐために出力を制限します(コマンドは100KB、ファイルは1MB、クエリは200行まで)。
貢献
git clone https://github.com/marin1321/mcp-devtools.git
cd mcp-devtools
npm install
npm run dev # tsup --watch
npm run test # vitest
npm run typecheck # tsc --noEmit
npm run lint # eslint .完全なワークフローについては CONTRIBUTING.md を、コミュニティガイドラインについては CODE_OF_CONDUCT.md を参照してください。
ライセンス
MIT © Oscar Humberto Marin Molina — oscarmarindev.com
Available Tools
15 toolscall_apiCall APIC
Invoke an operation defined in an OpenAPI spec.
Inputs: specPath (required), operationId (required), pathParams, queryParams, +2 more.
describe_tableDescribe tableC
Return column metadata for a table in a configured database connection.
Inputs: table (required), connection, schema.
echo_testEcho testA
Returns the provided message and a server-side ISO timestamp. Used to verify the MCP server pipeline end-to-end.
Inputs: message (required).
get_envGet environmentC
Return environment variables (process env or .env file) with optional masking.
Inputs: source, path, keys, maskSecrets.
get_file_infoGet file infoA
Return metadata (size, type, MIME, line count, symlink info) for a file or directory.
Inputs: path (required).
list_directoryList directoryC
List directory entries inside the configured scope, with optional recursion and glob filtering.
Inputs: path, depth, glob, includeHidden.
list_processesList processesB
List running processes, optionally filtered by name or listening port.
Inputs: name, port, limit.
list_tablesList tablesC
List tables in a configured database connection.
Inputs: connection, schema.
parse_openapiParse OpenAPIB
Parse an OpenAPI spec and return a summary of operations.
Inputs: path (required).
query_dbQuery databaseC
Execute a parameterized SQL query against a configured database connection. Read-only by default.
Inputs: sql (required), connection, params, timeoutMs, +1 more.
read_fileRead fileB
Read a text file inside the configured scope. Optionally restrict to a line range.
Inputs: path (required), startLine, endLine.
read_logsRead logsC
Read the tail of a configured log file with optional filter.
Inputs: path (required), tail, filter, jsonField.
run_commandRun commandC
Spawn a process from the configured allowedCommands list. Captures stdout/stderr with caps and a timeout.
Inputs: command (required), args, cwd, timeoutMs, +1 more.
search_filesSearch filesC
Search for a pattern (literal or regex) across files inside the configured scope.
Inputs: pattern (required), path, glob, regex, +4 more.
write_fileWrite fileA
Write a file atomically inside the configured scope (writes to a temp file then renames).
Inputs: path (required), content (required), encoding, createDirs.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Each tool targets a distinct operation: database metadata vs query, file read vs write vs listing vs search, process listing vs command execution, API calling vs spec parsing, etc. No two tools have overlapping purposes.
All tools follow a verb_noun pattern in snake_case (e.g., list_directory, read_file, query_db). The verbs vary but are appropriate for the action, and the naming is uniform throughout.
15 tools is slightly broad for a devtools server covering databases, files, processes, APIs, logs, and environment variables, but each tool has a clear role and the count is not excessive for a general-purpose utility server.
Core developer utilities are covered (file ops, database queries, command execution, API handling), but there are gaps like no process kill, no file editing, no HTTP utilities, and database is read-only. The set feels like a curated collection rather than a comprehensive toolkit.
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceOpen-source, local macOS MCP server for AI agents. Automate background Safari/Chrome tabs, native apps, files and shell with scoped permissions, optional approvals and delegated coding agents.97MIT
- AlicenseCqualityDmaintenanceA security-first MCP server that provides LLMs with structured tools for filesystem, process, search, build/test/lint, IDE integration, and more.402PolyForm Noncommercial 1.0.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives your AI assistant full awareness of your local dev environment — running processes, Docker containers, git state, open ports, log files, and more.8 npm1MIT
- AlicenseNot gradedqualityCmaintenanceA self-hosted MCP server that gives AI agents controlled access to a machine: filesystem, shell, background processes, git, web fetching and persistent key-value memory.GPL 3.0