Skip to content

[feat]: Add MCP support for emdash #2937

Description

@kchung

Feature Summary

Run a local MCP server inside emdash so that the agents it runs can create and manage emdash tasks and projects themselves.

Problem or Use Case

Agents working on a task often identify work that belongs in its own task: a follow-up fix, a refactor worth isolating, or subtasks that could run in parallel. Today only the user can create tasks, so the agent either bundles everything into one branch or stops and asks. If agents could create and manage tasks directly, work could fan out into isolated worktrees without manual setup.

Proposed Solution

A built-in HTTP MCP server on localhost, on by default, secured with a locally stored bearer token.

Tools:

Tool Description
list_projects List open projects
list_tasks List tasks in a project with status
create_task Create a task from a prompt, with optional provider and branch
rename_task Rename a task
archive_task Archive a task
delete_task Delete a task, with a confirmation step when the worktree has uncommitted changes
run_task_script Run a task's setup, run, or teardown worktree lifecycle script
stop_task_script Stop a task's run_task_script lifecycle script

Possible follow-ups:

Tool Description
read_messages Read a task's conversation transcript (chat UI conversations only)
send_message Send a follow-up prompt to a task's agent (chat UI conversations only)

Alternatives Considered

Scripting the emdash database or CLI directly. That bypasses worktree provisioning and session management, and MCP is the interface agents already speak.

Additional Context

Deleting a task is destructive, so delete_task should refuse dirty worktrees unless the agent passes an explicit confirmation after asking the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions