Skip to content

feat(mcpapp): register SDD's tools onto a host-supplied server - #27

Open
hlubek wants to merge 2 commits into
mainfrom
worktree-mcp-host-tools
Open

hlubek wants to merge 2 commits into
mainfrom
worktree-mcp-host-tools

Conversation

@hlubek

@hlubek hlubek commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A host composing the shared MCP wrapper can now add tools of its own on the same MCP server and endpoint as SDD's, so agents reach both through one connector (graph entry 20261106-232735-d-tac-d3f).

  • mcpapp.Register(server, opts) adds SDD's 14 tools to an *mcp.Server the host constructs. The host owns the server's name and version, instructions, transport, authentication and lifecycle; Register installs no middleware.
  • mcpapp.Instructions exports SDD's server instructions text for the host to include in its own.
  • mcpapp.New stays the wrapper for compositions without tools of their own: it builds a server named sdd, installs the shutdown middleware and registers onto it. Handler, Run, RunStdio, Connect and Shutdown are unchanged, so sdd serve and the external example keep their code.
  • Tool handlers moved from Server onto a private toolSet, independent of the server they are registered on.
  • The MCP SDK replaces a same-named tool without error; Register's doc states that host tools must not reuse SDD's tool names (accepted in the directive).

The tool-contract snapshot is unchanged. shutdown_test.go is renamed to shutdown_internal_test.go, since it needs unexported access.

The branch also carries the SDD work-in-progress marker commit for the directive; the closing done removes it.

Test plan

  • register_test.go: a host server with SDD's tools plus a host tool lists both, serves the host's name and instructions starting with mcpapp.Instructions, and drives start_session and the host tool over one connection; Register(nil, …) fails
  • go vet ./..., devbox run lint, devbox run test (root and examples/extendingsdd) green

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Adds mcpapp.Register so hosts can serve SDD’s 14 tools alongside their own tools.

  • Hosts can serve SDD’s tools alongside their own on one MCP server.

Acknowledged choices: hlubek explicitly accepts documented tool-name collisions and identifies the WIP marker as intentional.

Reviews (1) · Last reviewed commit: "feat(mcpapp): register SDD's tools onto ..." · Reviewed by Greptile

hlubek and others added 2 commits November 6, 2026 23:29
SDD-Mutation: v1:8d142be58e9c9fdb910fdf34010cad39a3c4214bac4a2769a61caf278f5d9e2c
Register adds SDD's tools to an mcp.Server the host constructs, beside
the host's own tools; Instructions exports the server instructions text.
New stays a wrapper that builds a server named sdd and registers onto it.
Implements 20261106-232735-d-tac-d3f.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant