Logo devharness

devharness

Cộng đồng
InDate

MCP server that connects AI assistants to Chrome DevTools Protocol for runtime debugging - set breakpoints, inspect variables, monitor network traffic, and automate browser interactions

Nhà phát hànhInDate
Kho mãdevharness
Ngôn ngữTypeScript
Bản fork
5
Sao
16
Công cụ có sẵn
36
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    devharness cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 36 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    16 sao và 5 bản fork từ kho mã được liên kết.

devharness

npm version license

MCP server. Your agent runs the app, sees what happened, and redoes none of it by hand.

bash
npx devharness@latest

Was cdp-tools-mcp. That name described the transport. CDP is now one of three things this does. Migrating.

Why

Three things burn a debugging session, and only the first is about seeing.

You are the eyes. You start the app, click the thing, paste the stack trace back into chat, reload and report whether it worked.

Everything gets re-driven by hand. Relaunch the browser, log in again, refill the form, click back to the screen where the bug lives — every iteration. Slow, and the retyped arguments drift from what actually ran.

One failure stalls the whole session. A dead dev server, a missing parameter, a wedged tool: the agent stops and waits for you.

devharness closes all three. Real execution instead of guesses. Every call it has already made is replayable by index. Failures have recovery paths the agent takes itself.

What it does

24 tool modules. 802 tests across 57 files, ~7s.

See — pause real execution and read the real frame: breakpoints (line, conditional, logpoint, DOM mutation, event, XHR), call stack and scope, source maps so TypeScript breakpoints hit TypeScript lines. Chrome and Node.js (node --inspect), both at once. Console, network, storage, DOM. content verify reports dead buttons, dead links, small touch targets, and overflow clipping from CDP facts, not heuristics.

Repeat — every tool response carries its own history index:

**Repeat:** replay({ action: 'repeat', indices: [58] })

indices takes a list, so four steps re-run in one call. Whatever the agent already did, it redoes by reference rather than by retyping. Worth keeping? replay({ action: 'create', ... }) promotes it to a named sequence, exportable as a Playwright or Puppeteer test.

Recover — a call that fails validation comes back with a continuationToken and the list of what was missing; the retry sends only the missing field. A validated call blocked by a guard is already recorded, so acknowledging the block and replaying resumes the exact call. If the server itself wedges, config({ action: 'restart' }) respawns it and replays the MCP handshake, so the host session never reconnects.

Prove — dev servers run under management (npm, flask, docker, compose) with port monitoring. Issues bind a bug to its reproduction: workOn navigates back to the failing state, resolve replays the sequence against the fix.

Design decisions

  • A dead server blocks tools rather than warning. An agent clicking away at a dead server produces a long, confident, entirely fictional debugging session. Configurable: inform, error, block.
  • Closing an issue needs a human click. resolve waits on a browser overlay no agent can dismiss. Recording findings is automated; declaring something actually fixed stays a human judgement.
  • Repeat is on every response, not just failures. Recovery and ordinary re-running are the same mechanism, so there's nothing extra to reach for when the session gets long.
  • getVariables degrades, never errors. full → reduced depth → names → counts. A truncated answer that says it truncated beats a tool error.
  • Connections are named. Every tool takes connectionReason, so nested agents each drive their own tab in one Chrome without fighting over "the current page".
  • Text beats screenshots. extractText costs a fraction of an image and answers most page questions. Screenshot when the question is genuinely visual.

Setup

Claude Code:

bash
claude mcp add devharness -- npx devharness@latest

Claude Desktop:

json
{
  "mcpServers": {
    "devharness": {
      "command": "npx",
      "args": ["-y", "devharness@latest"]
    }
  }
}

Other clients — npx devharness@latest over stdio.

As a Claude Code plugin — this registers the server for you:

/plugin marketplace add InDate/indate-tools
/plugin install devharness@indate-tools

The plugin pins an exact server version rather than tracking @latest, so what you installed is what runs until you update it.

Skill

Bundled Agent Skill at plugin/skills/devharness/. Same guidance as docs/instructions.md, split for progressive disclosure: name and description at session start, full catalogue only when debugging starts.

bash
mkdir -p .claude/skills
ln -s ../../node_modules/devharness/plugin/skills/devharness .claude/skills/devharness

Installing as a Claude Code plugin does this for you.

Example

Node service:

1. node --inspect=9229 app.js
2. connectDebugger({ reference: "api", port: 9229 })
3. breakpoint({ action: 'set', connectionReason: "api", file: "user.ts", line: 42 })
4. Trigger the request.
5. inspect({ action: 'getVariables', connectionReason: "api" })
   → real frame: what userId and userRole actually were

Browser fix:

1. launchChrome({ reference: "app" })   # launches and connects
2. Record the five clicks that reproduce it.
3. Fix the code.
4. Replay → pass or fail, against the real app

docs/GUIDE.md for depth, docs/instructions.md for the tool reference. examples/test-app ships eight seeded bugs to exercise it against known-wrong code.

Command line

devharness <command>, run from a shell inside an editor session, executes the tool in that session's own server process - against the browser and dev servers it already has open. Only sessions rooted at the shell's directory or above it are candidates, because issues, config and sequences resolve against the answering server's root; process ancestry picks among those. Nothing needs to be passed in.

sh
devharness which                                  # which session this shell belongs to
devharness call config '{"action":"status"}'      # any tool, arguments as one JSON object
devharness sessions                               # who else is reachable
devharness send a1b2c3d4 "check this" --wait=60000
devharness bug "Title" Body words here            # files an issue; feature does the same

--session=<id> targets a session explicitly, --json prints the unrendered response, and the exit code is 1 when the tool returns an error. Each session listens on a unix socket under ~/.devharness/endpoints/, mode 0600 - not a TCP port, because the tools reachable through it evaluate JavaScript in that session's browser.

devharness run <sequenceName> is separate: it starts its own headless Chrome and replays a saved sequence, with no session involved.

vs Chrome DevTools MCP

Chrome DevTools MCP is better at performance tracing, device emulation, advanced browser automation.

devharness adds breakpoint debugging with variable inspection, Node.js targets, simultaneous connections, logpoints, server lifecycle, and — the part that compounds over a long session — replayable call history and self-service recovery.

Browser-only and performance-shaped → theirs. Backend code, stepping execution, long sessions where the agent keeps re-driving the same setup → this.

Migrating

cdp-tools-mcp is deprecated on npm and points here. Tools unchanged. Package, repo, and skill renamed.

diff
-"args": ["-y", "cdp-tools-mcp@latest"]
+"args": ["-y", "devharness@latest"]

Your MCP server name (devharness, or whatever you called it) is yours and keeps working. Renaming it is cosmetic — but tools are addressed as mcp__<server-name>__<tool>, so update project docs if you do.

State moved .cdp-tools/ → .devharness/ in 0.9.0. Migrates itself on first run; profiles, config, sequences, and issues carry over. DEVHARNESS_DIR supersedes CDP_TOOLS_DIR, which still works.

From source

bash
git clone https://github.com/InDate/devharness.git
cd devharness
npm install && npm run build && npm test

Contributing

Issues and PRs welcome. Reporting a bug? Attach a recorded reproduction sequence.

License

MIT

Cài đặt

TypingMind
{
  "mcpServers": {
    "devharness": {
      "command": "npx",
      "args": [
        "devharness@latest"
      ]
    }
  }
}

Công cụ có sẵn

  • launchChrome

    Launch Chrome with debugging

  • killChrome

    Kill Chrome process

  • resetChromeLauncher

    Reset Chrome launcher

  • getChromeStatus

    Get Chrome status

  • setDebugLogging

    Toggle debug logging

  • getDebugLoggingStatus

    Check debug logging status

  • connectDebugger

    Connect to debugger

  • disconnectDebugger

    Disconnect debugger

  • loadSourceMaps

    Load source maps

  • getDebuggerStatus

    Get debugger status

  • listConnections

    List debugger connections

  • switchConnection

    Switch debugger connection

  • tab

    Manage browser tabs. Actions: list (show all open tabs), create (open new tab with reference), rename (change tab reference), switch (switch active tab), close (close a tab)

  • breakpoint

    Manage breakpoints and logpoints. Actions: set (line breakpoint), remove (remove by ID), list (list all), setLogpoint (log without pausing), validate (test expressions), resetCounter (reset logpoint counter), waitForScript (wait for script load), setDOMBreakpoint (pause when element changes), setEventBreakpoint (pause when event fires), setXHRBreakpoint (pause on network requests), await (set breakpoint and wait for hit - user can abort)

  • execution

    Control execution flow when paused at breakpoints. Actions: pause (pause execution), resume (resume execution), stepOver (step to next line), stepInto (step into function call), stepOut (step out of current function), acknowledge (acknowledge breakpoint pause to allow other tools to run while paused)

  • inspect

    Inspect and debug code. Actions: getCallStack (get call stack when paused), getVariables (get variables in call frame), evaluateExpression (evaluate JavaScript), searchCode (search code by pattern), searchFunctions (find function definitions)

  • getSourceCode

    Get source code at line range

  • console

    Monitor and manage console messages. Actions: list, get, recent, search, clear, setObjectDepth

  • network

    Monitor and manage network requests. Actions: list (list requests with optional type filter and pagination), get (get specific request by ID), search (search requests by regex pattern), enable (enable network monitoring), disable (disable network monitoring), setConditions (set network throttling conditions)

  • navigate

    Navigate and control browser pages. Actions: goto (navigate to URL), reload (reload page), back (navigate back), forward (navigate forward), info (get page information)

  • dom

    Inspect and query the DOM. Actions: querySelector (find element by CSS selector and get basic info), getProperties (get detailed properties of an element), snapshot (get full DOM structure snapshot)

  • screenshot

    Visual verification only. Use extractText for content. Actions: fullPage (full page screenshot), viewport (viewport screenshot), element (element screenshot), pdf (print to PDF with Chrome or WeasyPrint engines)

  • input

    Perform browser input actions. Actions: click (click element), type (type text into element), press (press keyboard key), hover (hover over element), focus (focus element by selector), focusNext (Tab to next focusable element), focusPrevious (Shift+Tab to previous focusable element), drag (drag from one point to another), scroll (scroll wheel at position), mousemove (move mouse to position), pinch (pinch zoom gesture), tap (real touch tap - selector or x/y), swipe (real touch drag - selector + direction, or raw from/to - for touch-only gestures the mouse cannot drive)

  • content

    Primary tool for page content. Prefer over screenshots. Actions: extractText (extract webpage text with outline/full/section modes), findInteractive (find all interactive elements like links, buttons, inputs with summary or filtered view), verify (run CDP-based UI verification for dead buttons, viewport issues, touch targets, overflow clipping), parse (run a page-parser plugin from .cdp-tools/parsers/ against the current page — omit name to list available plugins)

  • detectModals

    Detect modals

  • dismissModal

    Dismiss modal

  • storage

    Access and manage browser storage (cookies, localStorage, sessionStorage, IndexedDB). Cookies: getCookies, setCookie. localStorage: getLocalStorage (omit key to read the whole store), setLocalStorage, removeLocalStorage (delete one key). sessionStorage: getSessionStorage, setSessionStorage, removeSessionStorage - a full peer of localStorage. IndexedDB: idbListDatabases, idbListStores({db}), idbGet({db,store,key}), idbGetAll({db,store,limit}), idbPut({db,store,record,key?}), idbDelete({db,store,key}). IndexedDB reads return values that JSON cannot represent as typed descriptors instead of dropping them - e.g. {__type:"CryptoKey",keyType,algorithm,extractable,usages}, and the same for Blob/File, ArrayBuffer and typed arrays, Map, Set, Date, RegExp and BigInt; cycles come back as {__type:"Circular",path}. That makes a non-extractable key assertable even though its material cannot be read. Very large values are bounded rather than returned whole: an oversized read is marked with {__type:"B

  • saveToDisk

    Download file to disk

  • request

    Make an HTTP request as a sequence step. destination "node" sends it from the MCP server process directly (no browser, no CORS/cookies). destination "browser" runs fetch() inside a connected tab (uses that page's cookies/session/origin).

  • assert

    Assert a condition as a sequence step. Fails the sequence (isError, executor stops) if the condition is false. Two forms: a VALUE check against {{var:name.path}} templates captured by a prior request({saveAs}) or inspect({saveAs}) step; or a DOM check via selector + condition, which polls the page until it holds and reports what it actually found - use that instead of hand-writing a wait loop inside inspect({evaluateExpression}), which invites acting on the page from the same step.

  • wait

    Wait as a sequence step - the primitive for "the previous step kicked off async work". Exactly one of: selector (element appears), selectorGone (element disappears), expression (synchronous JS predicate polls truthy), ms (fixed sleep, last resort). Condition forms poll from the MCP side, so they survive navigations mid-wait and never depend on in-page timers or promises; on timeout the step fails cleanly instead of hanging.

  • replay

    Record and replay command sequences for testing and automation. Actions: repeat (immediately re-execute commands by history index - use this to repeat recent actions), history (view command history), recordInteraction (record real mouse/keyboard/navigation via a browser overlay - BLOCKS until the person finishes, so do not call it unattended; tune the capture with simplifyEvents/includeHovers/preferCoordinates/preferSelectors, and add outputFormat: events|commands|review|playwright|puppeteer to dump the recording - review is a human-readable walkthrough of the captured events), create (create sequence from history indices), list (list in-memory sequences), get (get sequence details; outputFormat: commands|playwright|puppeteer returns the raw command JSON or generated test code), delete (delete from memory), export (write a sequence to disk as sequence/playwright/puppeteer), load (load sequence from disk), listSaved (list saved files), deleteSaved (delete saved file), run (start executi

  • server

    Manage development servers. Actions: start (start a server from npm script; pass watch: true to auto-restart it on file changes instead of --watch/nodemon - coordinates with a paused breakpoint debugger by deferring the restart), stop (stop a running server), restart (restart a server), list (list running servers with status), logs (get log file paths or docker command), stopAll (stop all servers), setAutoRun (enable/disable auto-start on MCP startup), cancelPendingRestart (discard a watch-mode restart that's queued behind a paused debugger, to keep debugging)

  • config

    Manage cdp-tools configuration. Actions: status (show where config is loaded from), useLocal (switch to project-local config), useGlobal (switch to global ~/.cdp-tools config), reset (reset to defaults), backup (create timestamped backup), cloneFromGlobal (copy global config to local), show (display current settings), listTools (list all toggleable tools with their status and dependencies), reload (re-read config.json now; edits also hot-reload automatically within ~250ms), restart (restart cdp-tools itself if stuck or broken), listProfiles (list named persistent Chrome profiles and where they live), resetProfile (wipe and recreate a named persistent Chrome profile, clearing its cookies/localStorage/IndexedDB)

  • issues

    Track and manage bugs and features as Markdown issues (title, Markdown body, labels, comments). Actions: list (show all issues with optional filters), create (create new issue with title/body/labels, optionally linking a sequence), workOn (start working on issue with auto-replay), resolve (HUMAN-ONLY interactive verification: opens a browser overlay and waits for a person to confirm the fix before marking fixed/implemented - agents are refused immediately, use comment instead), acknowledge (acknowledge pending bugs to unblock tools), comment (append a Markdown comment to an issue)

  • dashboard

    Manage the cdp-tools web dashboard. Actions: open (get URL to open in browser), status (show whether this session is hub or client), stop (stop the hub server if this session is the hub)

Dùng MCP devharness với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối devharness, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm devharness làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của devharness.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "devharness": {
      "command": "npx",
      "args": [
        "-y",
        "devharness"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của devharness, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của devharness.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng devharness giúp tôi làm việc này không?
devharness
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng devharness.

Câu hỏi thường gặp

Máy chủ MCP devharness dùng để làm gì?

devharness là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP devharness với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng devharness với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP devharness với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối devharness, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP devharness với TypingMind?

devharness hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP devharness cung cấp những công cụ nào trong TypingMind?

devharness cung cấp 36 công cụ MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP devharness không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu devharness yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇