mdpilot-mcp

v0.3.4
mdpilot-mcp Checked 3 days ago Published 5 months ago

Give your AI agent the perfect starting point — generates AGENTS.md and CLAUDE.md from your real repo, verifies every command exists, detects doc drift, and…

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

analyze_project Analyze project

Scan a repo and detect its tech stack, scripts, package manager, structure, and MCP servers. Run this before generate_md_file so output is grounded in real project data instead of guesses.

ParameterTypeDescription
rootDirstringAbsolute path to the project root. Defaults to cwd.
verbosebooleanReturn full JSON instead of compact summary.

generate_md_file Generate markdown file

Generate a production-grade, repo-grounded markdown file (readme, agents, claude, contributing, security, skill, design, context). Reads real package.json scripts and file structure — never hallucinates commands. Optionally writes the file to disk.

ParameterTypeDescription
fileType *stringWhich file to generate
rootDirstringAbsolute path to the project root. Defaults to cwd.
tokenDisciplinebooleanIf true, append a "Response style" section to AGENTS.md/CLAUDE.md instructing the AI to be terse. Cuts agent chat tokens by ~20%.
verbosebooleanReturn verbose output with full commentary instead of the compact single-line footer.
verifiedbooleanIf true, run the self-verification loop — generate, verify commands/paths against the real repo, revise if needed (max 2 attempts). Recommended for AGENTS.md and CLAUDE.md.
writeToDiskbooleanIf true, write the generated file to the project root.
writingStylestringWhen "human", appends a natural writing style directive for human-facing file types (readme, contributing, design). No effect on agent-facing files (agents, claude, skill, context).

generate_task_file Generate TASK.md from task description

Turn a pasted ticket, Slack thread, GitHub issue, or task description into an AI-agent-ready TASK.md with structured requirements, acceptance criteria, and a ready-to-paste agent prompt block.

ParameterTypeDescription
taskInput *stringRaw task text — ticket, Slack thread, GitHub issue, etc.
executionModestringOutput mode: "guide" = full TASK.md for a human; "ai_exec" = prescriptive output an AI agent executes directly; "context" = compact context-only drop for a chat window.
experienceLevelstringDeveloper experience level. "new" adds "why" explanations; "experienced" keeps output terse.
riskCheckbooleanWhen true (ai_exec mode only): if the TASK.md has a Watch-outs section, appends "check your plan against the Watch-outs" to the agent prompt block before execution.
rootDirstringAbsolute path to the project root — used to auto-detect stack if stack not provided.
stackstringTech stack hint, e.g. "Next.js, TypeScript, Supabase". Auto-detected if omitted and rootDir given.
verbosebooleanReturn verbose output with token stats. Default: compact (content only).

explain_code Explain code as WALKTHROUGH.md

Explain a file or directory of code to any audience — AI agent, new team member, non-technical stakeholder, or learner. Reads a single file or uses repo context for a directory, then generates a structured WALKTHROUGH.md.

ParameterTypeDescription
audiencestringWho will read the explanation. "ai_agent" = terse, machine-parseable; "team" = new engineer; "non_technical" = founder/PM; "learner" = teaching mode.
filePathstringAbsolute path to a single file to explain. Use this for a focused explanation of one module.
rootDirstringAbsolute path to a directory — uses repomix to gather repo context. Prefer filePath for single files.
verbosebooleanReturn verbose output with write confirmation. Default: compact (content + single-line footer).
writeToDiskbooleanIf true, write WALKTHROUGH.md to the project root (rootDir or filePath directory).
writingStylestringWhen "human", appends a natural writing style directive for a more conversational walkthrough. Auto-enabled for non_technical and learner audiences regardless of this setting.

optimize_markdown Optimize markdown for tokens

Run the MDPilot 4-pass token optimizer on existing markdown content. Strips boilerplate, removes redundant phrasing, compresses structure, and tightens prose. Returns the leaner version with token savings.

ParameterTypeDescription
content *stringMarkdown content to optimize
aggressivebooleanEnable the aggressive 5th pass — collapses soft hedges and filler phrases. Never alters code blocks, commands, paths, or numbers. Default: off.
verbosebooleanReturn verbose output with per-pass breakdown. Default: compact single-line footer.

image_to_prompt Image to generation prompt

Analyze a local image file (PNG, JPG, WEBP) and generate a detailed recreation prompt for image generation models (FLUX, Stable Diffusion, Midjourney, DALL-E, Gemini). Covers subject, composition, lighting, colors, style, camera angle, and mood.

ParameterTypeDescription
imagePath *stringAbsolute path to a .png, .jpg, .jpeg, or .webp image file

check_drift Check docs for drift

Scan the repo and detect where docs (README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md) have gone stale — broken commands, missing paths, undocumented scripts or directories, removed MCP servers. Uses two detection methods: claim verification and snapshot diff.

ParameterTypeDescription
docsarraySpecific doc filenames to check, e.g. ["AGENTS.md"]. Defaults to README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md.
rootDirstringAbsolute path to the project root. Defaults to cwd.
verbosebooleanReturn verbose output with full issue details. Default: compact one-line-per-issue format.

update_docs Update stale docs

Fix drift in a specific doc — patches ONLY the stale sections (broken commands, missing paths) and preserves everything else exactly. Uses Claude to apply the minimal fix. Optionally writes the corrected file to disk and updates the manifest.

ParameterTypeDescription
filename *stringWhich doc to fix
rootDirstringAbsolute path to the project root. Defaults to cwd.
verbosebooleanReturn verbose output with full issue list. Default: compact single-line footer.
writeToDiskbooleanIf true, overwrite the file on disk and update the manifest snapshot.

save_context Save session context to CONTEXT.md

Persist session state to CONTEXT.md at the project root — decisions made, current state, next steps, open questions. Appends a new dated entry and keeps the last 5 sessions. Secret-shaped strings (API keys) are automatically redacted before writing. Everything stays on your machine.

ParameterTypeDescription
summary *stringWhat happened this session: decisions made, current state, next steps, open questions. Free text — the tool will structure and date-stamp it.
rootDirstringAbsolute path to the project root. Defaults to cwd.
writeToDiskbooleanWrite CONTEXT.md to disk. Set to false to preview the content without saving.

load_context Load session context from CONTEXT.md

Read the project's CONTEXT.md and inject prior session state into your working context. Runs a drift check on every command and path inside the file — stale references are annotated inline. Everything stays on your machine.

ParameterTypeDescription
rootDirstringAbsolute path to the project root. Defaults to cwd.