Files
FabledScribe/src/scribe/mcp/tools/__init__.py
T
bvandeusenandClaude Opus 5.5 c26b7f248e
CI & Build / Python lint (push) Successful in 4s
CI & Build / Plugin hooks (push) Successful in 13s
CI & Build / TypeScript typecheck (push) Successful in 54s
CI & Build / integration (push) Successful in 53s
CI & Build / Python tests (push) Successful in 1m37s
CI & Build / Build & push image (push) Successful in 31s
feat(mcp): port the server to MCP Python SDK v2 (FastMCP → MCPServer) (#2196)
- server.py: `mcp.server.mcpserver.MCPServer`; StrictArgsFastMCP becomes
  StrictArgsMCPServer, whose call_tool takes and forwards v2's `context`
  and raises ToolError (the SDK logs anything else as an unexpected crash;
  the message reaches the caller either way).
- stateless_http and transport_security moved from the constructor to
  `streamable_http_app(...)` in mount_mcp, with their reasons.
- Per-request user identity is unchanged: the contextvar set around the
  ASGI call reaches the handler on both v2 paths (legacy stateless spawns
  from the request task; the 2026-07-28 modern path opens its task group
  inside the request).
- pyproject: mcp[cli]>=2.2, no ceiling (installs are --locked). uv.lock
  regenerated with --upgrade-package mcp in the ci-python image: only mcp
  and its own dependencies moved (106 → 110 packages).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 07:21:27 -04:00

35 lines
1.0 KiB
Python

"""MCP tool implementations.
Each tool module exposes a `register(mcp)` function that attaches its tools
to an MCPServer instance. `register_all(mcp)` is the single entry point called
from `mcp.server.build_mcp_server`.
"""
from scribe.mcp.tools import (
design_systems, lessons, milestones, notes, processes, projects, recent, repos,
retrieval_tuning,
wide_net,
rulebooks, search, shapes, snippets, systems, tags, tasks, trash,
)
def register_all(mcp) -> None:
"""Register every tool module's tools on the given MCPServer instance."""
search.register(mcp)
retrieval_tuning.register(mcp)
wide_net.register(mcp)
notes.register(mcp)
tasks.register(mcp)
projects.register(mcp)
milestones.register(mcp)
systems.register(mcp)
design_systems.register(mcp)
tags.register(mcp)
recent.register(mcp)
repos.register(mcp)
processes.register(mcp)
snippets.register(mcp)
lessons.register(mcp)
shapes.register(mcp)
rulebooks.register(mcp)
trash.register(mcp)