MCPServerStreamableHttp
Extended MCP server surface for servers that expose resources.
Extends
Section titled “Extends”BaseMCPServerStreamableHttp
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MCPServerStreamableHttp(options): MCPServerStreamableHttp;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”MCPServerStreamableHttp
Overrides
Section titled “Overrides”BaseMCPServerStreamableHttp.constructor
Properties
Section titled “Properties”cacheToolsList
Section titled “cacheToolsList”cacheToolsList: boolean;Implementation of
Section titled “Implementation of”MCPServerWithResources.cacheToolsList
Inherited from
Section titled “Inherited from”BaseMCPServerStreamableHttp.cacheToolsList
customDataExtractor?
Section titled “customDataExtractor?”customDataExtractor?: MCPToolCustomDataExtractor;Implementation of
Section titled “Implementation of”MCPServerWithResources.customDataExtractor
Inherited from
Section titled “Inherited from”BaseMCPServerStreamableHttp.customDataExtractor
errorFunction?
Section titled “errorFunction?”errorFunction?: | MCPToolErrorFunction | null;Optional function to convert MCP tool failures into model-visible messages. Set to null to rethrow errors instead of converting them.
Implementation of
Section titled “Implementation of”MCPServerWithResources.errorFunction
Inherited from
Section titled “Inherited from”BaseMCPServerStreamableHttp.errorFunction
toolFilter?
Section titled “toolFilter?”toolFilter?: | MCPToolFilterCallable | MCPToolFilterStatic;Implementation of
Section titled “Implementation of”MCPServerWithResources.toolFilter
Inherited from
Section titled “Inherited from”BaseMCPServerStreamableHttp.toolFilter
toolInputGuardrails?
Section titled “toolInputGuardrails?”toolInputGuardrails?: ToolInputGuardrailDefinition<any>[];Guardrails applied before every tool on this server is invoked.
Implementation of
Section titled “Implementation of”MCPServerWithResources.toolInputGuardrails
Inherited from
Section titled “Inherited from”BaseMCPServerStreamableHttp.toolInputGuardrails
toolMetaResolver?
Section titled “toolMetaResolver?”toolMetaResolver?: MCPToolMetaResolver;Implementation of
Section titled “Implementation of”MCPServerWithResources.toolMetaResolver
Inherited from
Section titled “Inherited from”BaseMCPServerStreamableHttp.toolMetaResolver
toolOutputGuardrails?
Section titled “toolOutputGuardrails?”toolOutputGuardrails?: ToolOutputGuardrailDefinition<any>[];Guardrails applied after every tool on this server returns.
Implementation of
Section titled “Implementation of”MCPServerWithResources.toolOutputGuardrails
Inherited from
Section titled “Inherited from”BaseMCPServerStreamableHttp.toolOutputGuardrails
useStructuredContent?
Section titled “useStructuredContent?”useStructuredContent?: boolean;Whether to use MCP structuredContent as the model-visible tool output when available.
Defaults to false to preserve the existing content-based output behavior.
Implementation of
Section titled “Implementation of”MCPServerWithResources.useStructuredContent
Inherited from
Section titled “Inherited from”BaseMCPServerStreamableHttp.useStructuredContent
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get name(): string;Returns
Section titled “Returns”string
Implementation of
Section titled “Implementation of”Overrides
Section titled “Overrides”BaseMCPServerStreamableHttp.name
sessionId
Section titled “sessionId”Get Signature
Section titled “Get Signature”get sessionId(): string | undefined;Returns
Section titled “Returns”string | undefined
Overrides
Section titled “Overrides”BaseMCPServerStreamableHttp.sessionId
Methods
Section titled “Methods”callTool()
Section titled “callTool()”callTool( toolName, args, meta?, options?): Promise<CallToolResultContent>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<CallToolResultContent>
Implementation of
Section titled “Implementation of”MCPServerWithResources.callTool
Overrides
Section titled “Overrides”BaseMCPServerStreamableHttp.callTool
callToolResult()
Section titled “callToolResult()”callToolResult( toolName, args, meta?, options?): Promise<{ _meta?: Record<string, unknown>; content: object[]; isError?: boolean; structuredContent?: Record<string, unknown>;}>;Invoke a tool and return the full serializable MCP result.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<{
_meta?: Record<string, unknown>;
content: object[];
isError?: boolean;
structuredContent?: Record<string, unknown>;
}>
Implementation of
Section titled “Implementation of”MCPServerWithResources.callToolResult
Overrides
Section titled “Overrides”BaseMCPServerStreamableHttp.callToolResult
close()
Section titled “close()”close(): Promise<void>;Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Overrides
Section titled “Overrides”BaseMCPServerStreamableHttp.close
connect()
Section titled “connect()”connect(): Promise<void>;Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”MCPServerWithResources.connect
Overrides
Section titled “Overrides”BaseMCPServerStreamableHttp.connect
invalidateToolsCache()
Section titled “invalidateToolsCache()”invalidateToolsCache(): Promise<void>;Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”MCPServerWithResources.invalidateToolsCache
Overrides
Section titled “Overrides”BaseMCPServerStreamableHttp.invalidateToolsCache
listResources()
Section titled “listResources()”listResources(params?): Promise<MCPListResourcesResult>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”Promise<MCPListResourcesResult>
Implementation of
Section titled “Implementation of”MCPServerWithResources.listResources
Overrides
Section titled “Overrides”BaseMCPServerStreamableHttp.listResources
listResourceTemplates()
Section titled “listResourceTemplates()”listResourceTemplates(params?): Promise<MCPListResourceTemplatesResult>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”Promise<MCPListResourceTemplatesResult>
Implementation of
Section titled “Implementation of”MCPServerWithResources.listResourceTemplates
Overrides
Section titled “Overrides”BaseMCPServerStreamableHttp.listResourceTemplates
listTools()
Section titled “listTools()”listTools(): Promise<object[]>;Returns
Section titled “Returns”Promise<object[]>
Implementation of
Section titled “Implementation of”MCPServerWithResources.listTools
Overrides
Section titled “Overrides”BaseMCPServerStreamableHttp.listTools
readResource()
Section titled “readResource()”readResource(uri): Promise<MCPReadResourceResult>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<MCPReadResourceResult>
Implementation of
Section titled “Implementation of”MCPServerWithResources.readResource
Overrides
Section titled “Overrides”BaseMCPServerStreamableHttp.readResource