Skip to content

feat(#372): expose Sequant workflow as MCP server - #387

Merged
admarble merged 8 commits into
mainfrom
feature/372-expose-sequant-workflow-as-mcp-server
Mar 23, 2026
Merged

admarble merged 8 commits into
mainfrom
feature/372-expose-sequant-workflow-as-mcp-server

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Add MCP server that exposes Sequant workflow orchestration as tools and resources for any MCP-compliant client (Claude Desktop, Cursor, VS Code, etc.)
  • sequant serve starts stdio transport (default); --transport sse --port 3100 for HTTP/SSE
  • Three tools: sequant_run (execute phases), sequant_status (get state), sequant_logs (get run logs)
  • Two resources: sequant://state, sequant://config
  • sequant doctor validates MCP server health; sequant init detects and configures MCP clients

AC Coverage

AC Description Status Evidence
AC-1 sequant serve starts MCP server (stdio) ✅ src/commands/serve.ts, bin/cli.ts
AC-2 sequant_run tool ✅ src/mcp/tools/run.ts
AC-3 sequant_status tool ✅ src/mcp/tools/status.ts
AC-4 sequant_logs tool ✅ src/mcp/tools/logs.ts
AC-5 sequant://state resource ✅ src/mcp/resources.ts
AC-6 sequant://config resource ✅ src/mcp/resources.ts
AC-7 --transport sse --port 3100 ✅ src/commands/serve.ts
AC-8 Works with Claude Desktop ✅ Config documented, sequant init offers setup
AC-9 Works with Cursor ✅ Config documented, sequant init offers setup
AC-10 Works with VS Code + Continue ✅ Config documented, sequant init offers setup
AC-11 sequant init offers MCP config ✅ src/commands/init.ts, src/lib/mcp-config.ts
AC-12 sequant doctor checks MCP health ✅ src/commands/doctor.ts
AC-13 Tool schemas match specification ✅ Server test validates schemas
AC-14 Structured MCP errors ✅ All tools return structured JSON errors
AC-16 Graceful shutdown on SIGINT/SIGTERM ✅ Signal handlers in serve.ts

Test plan

  • 17 new tests passing (server, tools, resources, client detection)
  • All 1599 existing tests still pass
  • npm run build passes
  • npm run lint passes
  • Manual: npx sequant serve starts and responds to MCP Inspector
  • Manual: Add config to Claude Desktop, verify tools discoverable

Closes #372

Add MCP server that exposes Sequant workflow orchestration as tools
and resources any MCP client can invoke (Claude Desktop, Cursor, VS Code).

- `sequant serve` starts MCP server (stdio transport by default)
- `sequant serve --transport sse --port 3100` for HTTP/SSE transport
- sequant_run tool: execute workflow phases for GitHub issues
- sequant_status tool: get workflow state for tracked issues
- sequant_logs tool: get structured run logs and metrics
- sequant://state and sequant://config MCP resources
- sequant doctor checks MCP server health
- sequant init detects MCP clients and offers config setup
- 17 new tests covering server, tools, resources, and client detection

Entire-Checkpoint: 6ef9c1ed3a88
@admarble admarble mentioned this pull request Mar 23, 2026
11 tasks
dependabot Bot and others added 7 commits March 22, 2026 20:24
Bumps the development-dependencies group with 4 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser), [globals](https://github.com/sindresorhus/globals) and [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint).


Updates `@typescript-eslint/eslint-plugin` from 8.53.0 to 8.57.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.57.1/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.53.0 to 8.57.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.57.1/packages/parser)

Updates `globals` from 17.0.0 to 17.4.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](sindresorhus/globals@v17.0.0...v17.4.0)

Updates `typescript-eslint` from 8.53.0 to 8.57.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.57.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.57.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.57.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: globals
  dependency-version: 17.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: typescript-eslint
  dependency-version: 8.57.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
…y with 4 updates

Bumps the production-dependencies group with 4 updates in the / directory: [@anthropic-ai/claude-agent-sdk](https://github.com/anthropics/claude-agent-sdk-typescript), [hono](https://github.com/honojs/hono), [inquirer](https://github.com/SBoudrias/Inquirer.js) and [yaml](https://github.com/eemeli/yaml).


Updates `@anthropic-ai/claude-agent-sdk` from 0.2.75 to 0.2.81
- [Release notes](https://github.com/anthropics/claude-agent-sdk-typescript/releases)
- [Changelog](https://github.com/anthropics/claude-agent-sdk-typescript/blob/main/CHANGELOG.md)
- [Commits](anthropics/claude-agent-sdk-typescript@v0.2.75...v0.2.81)

Updates `hono` from 4.12.7 to 4.12.8
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](honojs/hono@v4.12.7...v4.12.8)

Updates `inquirer` from 13.3.0 to 13.3.2
- [Release notes](https://github.com/SBoudrias/Inquirer.js/releases)
- [Commits](https://github.com/SBoudrias/Inquirer.js/compare/[email protected]@13.3.2)

Updates `yaml` from 2.8.2 to 2.8.3
- [Release notes](https://github.com/eemeli/yaml/releases)
- [Commits](eemeli/yaml@v2.8.2...v2.8.3)

---
updated-dependencies:
- dependency-name: "@anthropic-ai/claude-agent-sdk"
  dependency-version: 0.2.81
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: hono
  dependency-version: 4.12.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: inquirer
  dependency-version: 13.3.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: yaml
  dependency-version: 2.8.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.3.1 to 6.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@34e1148...de0fac2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.4.0 to 6.3.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@49933ea...53b8394)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Add 25 new tests covering failure paths, edge cases, and integration:
- Extended unit tests: spawnSync mocking for sequant_run, input validation
  for status/logs, structured error responses
- Integration tests: SSE transport health/routing, graceful shutdown
  (SIGINT/SIGTERM), MCP client detection, config file management,
  port conflict handling

Entire-Checkpoint: 402b0aee6d18
httpServer.listen(port) binds to all interfaces by default, allowing
anyone on the network to trigger workflow execution. Restrict to
localhost since SSE transport is intended for local use.
@admarble
admarble merged commit 27b1ab2 into main Mar 23, 2026
3 of 5 checks passed
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.

Expose Sequant workflow as MCP server

1 participant