Skip to content

feat: add duckflow-mcp MCP server with install script and agent instructions#1

Open
Copilot wants to merge 2 commits intomainfrom
copilot/implement-obo-server-for-ducktyping-tools
Open

feat: add duckflow-mcp MCP server with install script and agent instructions#1
Copilot wants to merge 2 commits intomainfrom
copilot/implement-obo-server-for-ducktyping-tools

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 24, 2026

Exposes duckflow's annotation extraction, stitching, and Mermaid rendering tools as an MCP server so AI agents (Copilot, Codex, Claude Code, Cline) can drive duckflow workflows directly.

MCP server (duckflow/server.py)

Five FastMCP tools mirroring the CLI surface:

Tool Description
duckflow_extract Extract entries from a repo path; accepts include globs, match filter, stitched flag
duckflow_extract_text Extract from source text already in context
duckflow_stitch Build call/data-flow graph
duckflow_mermaid Render Mermaid flowchart from a repo
duckflow_mermaid_text Render Mermaid flowchart from source text

All tools return ERROR: <message> strings on failure rather than raising, consistent with the MCP tool contract. Repo-existence is validated eagerly.

Package changes

  • pyproject.toml: new [mcp] optional dependency group (mcp>=1.0), new duckflow-mcp console script entry point
  • Run with uvx --from . duckflow-mcp or duckflow-mcp after pip install -e ".[mcp]"

Agent instruction templates (templates/agent-setup/)

  • AGENTS.md / CLAUDE.md — Codex, Cline, and Claude Code workflow rules
  • copilot/copilot-instructions.md — Copilot workspace instructions
  • copilot/skills/duckflow/SKILL.md — skill definition with tool reference table
  • copilot/prompts/duckflow.prompt.md/duckflow prompt with annotate / update / review / regenerate workflow

Install script (install.sh)

Interactive bash script modelled on oboe-mcp/install.sh. Prompts for client selection (Copilot / Codex / Claude Code / Cline / all) and install scope (user-level vs. project directory), then merges the MCP server entry and instruction blocks into each client's config without clobbering existing content.

Tests

34 new unit tests in tests/test_mcp_server.py covering all five tools: valid extraction, glob filtering, match filtering, stitched graph edges, incompatible-status edge suppression, error paths for nonexistent paths and malformed JSON.


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] Implement OBO server for the ducktyping tools feat: add duckflow-mcp MCP server with install script and agent instructions Mar 24, 2026
Copilot AI requested a review from warnes March 24, 2026 18:48
@warnes warnes marked this pull request as ready for review March 24, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants