Mcp Devtools

io.github.marin1321由 GitHub 帳號 marin1321 發布v1.0.1更新於 Oct 24, 2026

MCP server giving AI agents safe access to filesystem, databases, processes, and APIs.

概覽

AI 產生的概覽

本機 MCP 伺服器,讓 AI 助理在限定範圍內存取開發環境中的檔案、資料庫、程序與 API。

可以做什麼
  • 在設定的範圍內讀取、寫入、列出、搜尋檔案並取得檔案資訊
  • 查詢資料庫、列出資料表並檢視資料表結構
  • 執行允許清單內的指令、讀取日誌、列出程序並讀取環境變數
  • 解析 OpenAPI 規格,並僅向規格宣告的主機發出 API 呼叫
  • 提供唯讀資源(工具目錄、伺服器資訊)以及除錯、程式碼審查、程式庫探索與重構的提示範本
  • 透過外掛 API 載入自訂工具
適用情境
適合讓助理直接操作本機專案:檢視與修改檔案、查詢開發用資料庫、執行獲准的指令,或呼叫由 OpenAPI 規格描述的介面,並以範圍限制與稽核日誌取代不受限的 shell 存取。
執行需求
透過 npx 以 stdio 在本機執行(需要 Node.js),或透過 HTTP 在可設定的連接埠執行。設定來自 mcp-devtools.json、.mcp-devtoolsrc 或 package.json 中的鍵,也支援零設定預設值。HTTP 模式可透過環境變數(例如 MCP_AUTH_TOKEN)提供 Bearer 權杖。資料庫存取需在設定中填寫連線資訊。
安裝前請注意
它可以寫入檔案、執行指令與呼叫外部 API,使用前應設定好範圍、指令允許清單與資料庫唯讀模式。get_env 會暴露環境變數,僅對名稱類似密鑰的變數做遮罩。HTTP 模式若未設定權杖則無驗證。稽核日誌需自行開啟,外掛會在啟動時執行任意程式碼。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Devtools,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcp-devtools

[npm version] [CI] [License: MIT] [Node.js]

AI-native developer tools via Model Context Protocol. A production-grade MCP server that gives AI agents (Claude, Cursor, Copilot, Continue, ...) safe, scoped access to your local development environment.

Why

The MCP ecosystem is full of single-purpose tutorials and vendor-locked adapters. There is no well-maintained, multi-tool, framework-agnostic, production-quality MCP package for everyday developer tooling.

mcp-devtools fills that gap with 14 tools, 3 MCP Resources, 4 MCP Prompts, a Plugin API, two transport modes (stdio + HTTP with auth), and an audit log — built on patterns refined in production at DailyBot.

Quick start

stdio (default)

bash
npx @oscarmarin/mcp-devtools

Add it to Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

json
{  "mcpServers": {    "devtools": {      "command": "npx",      "args": ["-y", "@oscarmarin/mcp-devtools"]    }  }}

Or Cursor (~/.cursor/mcp.json): same block.

HTTP transport

Create a mcp-devtools.json in your project root:

json
{  "transport": "http",  "port": 3333,  "auth": {    "token": "env:MCP_AUTH_TOKEN"  }}

Then start the server:

bash
npx @oscarmarin/mcp-devtools

The MCP endpoint will be available at http://localhost:3333.

Tools

GroupTools
Filesystemread_file, write_file, list_directory, search_files, get_file_info
Databasequery_db, list_tables, describe_table
Processrun_command, read_logs, get_env, list_processes
OpenAPIparse_openapi, call_api

Per-tool reference: docs/tools/.

MCP Resources

The server exposes read-only data via MCP Resources:

URIDescription
devtools://toolsCatalog of all registered tools with schemas
devtools://server-infoServer version, transport, scope, tool count

MCP Prompts

Curated prompt templates for common development workflows:

PromptDescription
debug_errorSystematically debug an error using mcp-devtools tools
code_reviewReview a file for bugs, security issues, and code quality
explore_codebaseExplore and understand a project's structure and conventions
refactor_functionRefactor a function for readability, performance, or testability

Plugin API

Extend mcp-devtools with custom tools — no fork required.

Config-based (load at startup):

json
{  "plugins": ["./my-tools.js", "@scope/mcp-plugin-foo"]}

Each plugin module default-exports an array of tool definitions:

typescript
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() },    }),  }),];

Configuration

Configuration is loaded by cosmiconfig from mcp-devtools.json, .mcp-devtoolsrc, or the mcpDevtools key in package.json. See mcp-devtools.example.json and docs/configuration.md for the full schema.

Zero-config is supported: running npx @oscarmarin/mcp-devtools with no config uses schema defaults (RNF-05).

Security

Four non-bypassable controls:

  1. Filesystem scope boundary. Every path is resolved to an absolute and compared against config.scope. Symlinks that escape scope throw SCOPE_VIOLATION.
  2. Command allowlist. run_command only executes binaries whose basename is in allowedCommands. Invocation uses spawn(file, args) (no shell), so shell-injection via the command argument is structurally impossible.
  3. Database read-only mode. When readOnly: true, all SQL is parsed and INSERT/UPDATE/DELETE/DROP/CREATE/GRANT are rejected. Queries run in BEGIN READ ONLY ... ROLLBACK on PostgreSQL.
  4. HTTP Bearer auth. When auth.token is configured, every HTTP request must include Authorization: Bearer <token>. Comparison uses crypto.timingSafeEqual to prevent timing attacks.

Additional safety measures:

  • Audit log. Opt-in NDJSON log of every tool invocation with timing, sanitized inputs, and result status.
  • Secret masking. get_env automatically masks values matching common secret patterns (SECRET, TOKEN, PASSWORD, KEY, etc.).
  • OpenAPI host restriction. call_api only sends requests to hosts listed in the spec's servers array.
  • Output capping. All tools cap their output to prevent context flooding (100KB for commands, 1MB for files, 200 rows for queries).

Contributing

bash
git clone https://github.com/marin1321/mcp-devtools.gitcd mcp-devtoolsnpm installnpm run dev       # tsup --watchnpm run test      # vitestnpm run typecheck # tsc --noEmitnpm run lint      # eslint .

See CONTRIBUTING.md for the full workflow and CODE_OF_CONDUCT.md for community guidelines.

License

MIT © Oscar Humberto Marin Molina — oscarmarindev.com

來源:README.md,提交 5d4e8d6

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分