Skip to content

feat(mcp): add Takt MCP transport-allowlist adapter#2095

Merged
dyoshikawa merged 2 commits into
mainfrom
resolve-issue-2068-takt-mcp
Jun 30, 2026
Merged

feat(mcp): add Takt MCP transport-allowlist adapter#2095
dyoshikawa merged 2 commits into
mainfrom
resolve-issue-2068-takt-mcp

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Follow-up for Takt MCP support (#2068). rulesync had no TaktMcp adapter, so --targets takt --features mcp errored.

Chosen surface

Takt has no project/global registry of MCP server definitions — the concrete mcp_servers map is declared per workflow step inside workflow YAML files. The only MCP knob .takt/config.yaml exposes is the default-deny transport allowlist workflow_mcp_servers, and Takt hard-rejects unknown top-level config keys. So TaktMcp faithfully emits only the workflow_mcp_servers transport allowlist into the shared .takt/config.yaml (project) / ~/.takt/config.yaml (global), read-modify-write preserving sibling keys (mirroring TaktPermissions), deriving permitted transports from the rulesync servers (stdio/sse/http). This opens the default-deny gate that permits workflow-defined servers.

Documented lossiness

Per-server names/commands/env/URLs/headers are not representable in a shared config (per-step scoping only), so they are not written; import yields an empty mcpServers map. This is inherent to Takt design.

Changes

  • New src/features/mcp/takt-mcp.ts (+ tests); registered in mcp-processor.ts and tool-target-tuples.ts. Project + global scope.
  • Corrected references/takt.md, docs/tools/takt.md, file-formats.md; regenerated supported-tools tables.

Verification

pnpm cicheck fully green: 297 test files, 6614 tests; e2e mcp 93/93.

References

Refs #2068

cm-dyoshikawa and others added 2 commits June 30, 2026 15:15
Takt gained MCP support in v0.21.0 but rulesync had no TaktMcp adapter, so `--targets takt --features mcp` errored with "does not support the feature 'mcp'".

Takt has no project/global registry of MCP server definitions: the concrete mcp_servers map (command/args/env or type/url/headers) is declared per workflow step inside workflow YAML files. config.yaml exposes only the default-deny transport allowlist workflow_mcp_servers: { stdio, sse, http }, and its loader hard-rejects unknown top-level keys, so a server map cannot be written there.

TaktMcp therefore emits only that allowlist into the shared .takt/config.yaml (project) / ~/.takt/config.yaml (global), enabling exactly the transports the rulesync servers use (local/stdio->stdio, sse->sse, http/streamable-http/ws->http). The merge is in place (provider/provider_profiles and all other keys preserved); the file is never deleted. Per-server names/commands/env/URLs/headers are intentionally not written (not representable), and import yields an empty mcpServers map.

Registers takt in mcpProcessorToolTargetTuple and the McpProcessor factory (project + global), regenerates the supported-tools tables, syncs skill docs, documents the surface and lossiness in docs/tools/takt.md and docs/reference/file-formats.md, corrects the stale references/takt.md map, and adds unit + e2e coverage (generate, global, non-deletable check).

Refs #2068

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Address PR review (mid DRY): the identical parseTaktConfig YAML reader was duplicated in takt-mcp.ts and takt-permissions.ts. Extract it to src/features/shared/takt-config.ts (with tests) so future Takt features that read .takt/config.yaml reuse one implementation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dyoshikawa
dyoshikawa merged commit 30ef0b1 into main Jun 30, 2026
8 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-2068-takt-mcp branch June 30, 2026 22:35
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