-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I'm building an MCP server in TypeScript using @modelcontextprotocol/sdk
.
I can dynamically register tools using registerTool()
, but there is no documented way to unregister/deregister tools at runtime.
This is problematic for scenarios where:
- Tools are user/session-specific and need to be removed when a user disconnects.
- Tools are loaded from a database and must be refreshed dynamically.
- We want to implement plugin-like behavior with hot-swapping tools.
A method like unregisterTool(name: string)
that removes a previously registered tool from the server's active registry.
- Maintaining my own registry and filtering calls manually, but this feels like duplicating what the SDK should already manage.
- Restarting the server when tool sets change (not ideal for production).
Additional context
This feature would allow more flexible, real-time management of tools in MCP servers.
Is this something planned, or would you accept a PR implementing it?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request