Server
An MCP server on top of a pluggable transport.
This server automatically responds to the initialization flow as initiated by the client. You can register tools, prompts, and resources using addTool, addPrompt, and addResource. The server will then automatically handle listing and retrieval requests from the client.
Parameters
Information about this server implementation (name, version).
Configuration options for the server.
Optional provider for instructions from the server to the client about how to use this server. The provider is called each time a new session is started to support dynamic instructions.
Constructors
Alternative constructor that provides the instructions directly as a string.
Functions
Registers a single prompt. The client can then retrieve the prompt.
Registers a single prompt by constructing a Prompt from given parameters.
Registers multiple prompts at once.
Registers a single resource. The client can then read the resource content.
Registers multiple resources at once.
Registers a single tool. The client can then call this tool.
Registers multiple tools at once.
Starts a new server session with the given transport and initializes internal request handlers based on the server's capabilities.
Registers a callback to be invoked when the server has completed initialization.
Removes a single prompt by name.
Removes multiple prompts at once.
Removes a single resource by URI.
Removes multiple resources at once.
Removes a single tool by name.
Removes multiple tools at once.