AutoDev MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add autodev-mcp -- node "<FULL_PATH_TO_AUTOCODING_MCP>/dist/index.js"

Replace <FULL_PATH_TO_AUTOCODING_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

A dual-track testing server combining CLI and Playwright browser testing.

AutoDev MCP (Dual-Track Testing)

AutoDev MCP is a TypeScript MCP server that keeps your original CLI testing and adds an extra Chrome Dev (browser) testing track with persistent logs.

What it does

  • Keeps original test flow via CLI (run_tests) - not replaced
  • Adds browser test flow (browser_* tools) via Playwright + CDP events
  • Persists everything to SQLite:
    • sessions
    • logs (cli/browser/console/error/network/assertion)
    • screenshots
  • Supports combined execution via run_pipeline
  • After pipeline completion, automatically provides 10 requirement/optimization directions (中文输出)

Install

npm install
npm run build

Run MCP server (stdio)

npm run start

For local development:

npm run dev

Optional config: `autodev.config.json`

{
  "projectRoot": ".",
  "storage": {
    "databasePath": ".autodev/logs/autodev.db",
    "screenshotsDir": ".autodev/logs/screenshots"
  },
  "commands": {
    "test": "npm test"
  },
  "browser": {
    "headless": true,
    "timeoutMs": 15000
  },
  "pipeline": {
    "maxIterations": 3
  },
  "compact": {
    "enabled": true,
    "warningThreshold": 0.8,
    "compactThreshold": 1.0,
    "estimatedMaxChars": 120000
  },
  "git": {
    "enabled": true,
    "autoCommitOnFeatureComplete": true,
    "defaultCommitPrefix": "feat",
    "protectSensitiveFiles": true,
    "sensitiveFilePatterns": [
      "(^|/)\\.env(\\..*)?$",
      "(^|/)credentials\\.json$",
      "(^|/)secret(s)?(\\.|$)",
      "(^|/).+\\.pem$",
      "(^|/).+\\.key$"
    ]
  }
}

Tool overview

CLI track (original)

  • run_tests
  • generate_tests (stub)
  • fix_failures (stub)

Browser track (new, additional)

  • browser_open
  • browser_navigate
  • browser_interact
  • browser_assert
  • browser_screenshot
  • browser_get_console
  • browser_get_errors
  • browser_get_network
  • browser_close

Orchestration/query

  • run_pipeline (CLI first, browser optional)
  • propose_requirements (always outputs 10 directions)
  • check_compact (检查上下文占用并给出 none/warn/compact 建议)
  • git_commit_feature(小功能完成后按策略提交 git)
  • git_status_summary(查看当前仓库改动状态)
  • test_get_session_logs
  • test_compare_sessions

Example workflow

  1. Run original tests:
    • call run_tests
  2. Start browser session:
    • call browser_open with URL
  3. Interact and assert:
    • browser_interact
    • browser_assert
  4. Capture screenshot if needed:
    • browser_screenshot
  5. Close and finalize summary:
    • browser_close
  6. Query persisted logs:
    • test_get_session_logs
  7. Generate next-cycle demand directions:
    • propose_requirements

run_pipeline also includes suggestedRequirements in the final output so you can directly pick your next approved requirement.

run_pipeline now also returns compactSuggestion:

  • none: 上下文充足,继续执行
  • warn: 上下文超过预警阈值(默认 80%),建议当前小任务结束后 compact
  • compact: 上下文达到 compact 阈值(默认 100%),建议立即 compact

run_pipeline 现在也会在测试通过后尝试执行 gitCommit

  • 若目录是 git 仓库且存在可提交改动,会自动提交
  • 若不是 git 仓库,自动跳过并给出原因
  • 默认会拦截疑似敏感文件(如 .env*.pem*.key

测试日志与截图位置

  • SQLite 数据库:.autodev/logs/autodev.db
  • 截图目录:.autodev/logs/screenshots

你可以通过 MCP 工具查看:

  • test_get_session_logs:按 sessionId 拉取日志、摘要、截图路径
  • test_compare_sessions:对比两次测试结果

评分标准(需求方向)

每条方向的评分由以下字段组成:

  • impact:影响面(1-10)
  • confidence:把握度(1-10)
  • effort:工作量映射分值(S=2, M=5, L=8)

公式:

priorityScore = (impact × confidence) / effort

分数越高,优先级越高。

Notes

  • Browser track is explicitly additive and independent from original CLI tests.
  • generate_tests and fix_failures are stubs in this version and intentionally logged for future extension.
  • Requirement generation is evidence-based (sessions/logs/assertions/errors) and returns exactly 10 scored directions each cycle (中文输出).

Tools (9)

run_testsExecutes the original CLI test flow.
browser_openOpens a browser session at a specified URL.
browser_interactPerforms interactions within the browser session.
browser_assertPerforms assertions on the current browser state.
browser_screenshotCaptures a screenshot of the current browser page.
run_pipelineExecutes a combined CLI and browser test pipeline.
propose_requirementsGenerates 10 requirement or optimization directions based on test logs.
git_commit_featureCommits changes to the git repository after a feature is complete.
test_get_session_logsRetrieves logs, summaries, and screenshot paths for a session.

Configuration

claude_desktop_config.json
{"projectRoot": ".", "storage": {"databasePath": ".autodev/logs/autodev.db", "screenshotsDir": ".autodev/logs/screenshots"}, "commands": {"test": "npm test"}, "browser": {"headless": true, "timeoutMs": 15000}, "pipeline": {"maxIterations": 3}}

Try it

Run the full test pipeline and generate optimization suggestions for my current project.
Open the browser to my local development server and perform an assertion on the login button.
Capture a screenshot of the current browser state and retrieve the latest session logs.
Check the current git status and commit the recent changes if the tests passed.
Compare the logs of my last two test sessions to identify regressions.

Frequently Asked Questions

What are the key features of AutoDev MCP?

Dual-track testing combining CLI execution and Playwright browser automation.. Persistent logging of sessions, console output, network requests, and errors to SQLite.. Automated requirement and optimization generation based on test evidence.. Integrated Git workflow with automatic commits and sensitive file protection.. Context management with compacting suggestions to optimize LLM token usage..

What can I use AutoDev MCP for?

Automating end-to-end testing workflows that require both backend CLI checks and frontend browser interactions.. Generating evidence-based feature roadmaps and optimization tasks after test cycles.. Maintaining a persistent history of test results and screenshots for debugging complex UI issues.. Streamlining development by automatically committing verified features to Git..

How do I install AutoDev MCP?

Install AutoDev MCP by running: npm install && npm run build

What MCP clients work with AutoDev MCP?

AutoDev MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep AutoDev MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare