wiki / segments / mcpedited 2026-07-19
MCP server

Segments speaks MCP so coding agents can plan against the same task state you see in the CLI and web UI. sg setup wires the integrations: Claude Code, OpenCode, and a Pi extension embedded in the binary for task-aware AI sessions.

Scoping

Every tool call auto-resolves the current project from the agent’s working directory — an MCP call from inside a repo is about that repo’s tasks unless the agent explicitly asks otherwise (all_projects=true, or --all on the CLI). Task IDs are globally addressable: a full UUID or unique prefix resolves across all projects.

Tools

ready / recentThe ready queue (unblocked todos) and recently closed work.get / listFull task details; project and task listings.create / update / deleteSingle and bulk variants — bulk create can cross-reference tasks within the batch (#0..#N) to build dependency chains in one call.projectsCreate, list, rename.

Session integration

A SessionStart hook prints an orientation banner — in-progress claims, recently closed tasks — so an agent starts each session knowing the state of play. Agents claim work by setting a task in-progress, which every other session and the web UI see live. A stdio shim lets multiple MCP clients share one server instance.

Changes made by agents surface in the web UI over WebSocket as they happen, which makes it easy to watch an agent burn through a queue.