Class: MCPError
Defined in: mcp/errors.ts:43
Error thrown for MCP-related failures
Example
throw new MCPError(
'Failed to connect to server',
'filesystem',
MCPErrorCode.CONNECTION_FAILED
);
Extends
Constructors
Constructor
new MCPError(
message,
serverName,
code,
cause?): MCPError;
Defined in: mcp/errors.ts:44
Parameters
| Parameter | Type |
|---|---|
message | string |
serverName | string |
code | MCPErrorCode |
cause? | Error |
Returns
MCPError
Overrides
Properties
cause?
readonly optional cause?: Error;
Defined in: errors.ts:17
Inherited from
code
readonly code: MCPErrorCode;
Defined in: mcp/errors.ts:47
serverName
readonly serverName: string;
Defined in: mcp/errors.ts:46
Methods
isRetryable()
isRetryable(): boolean;
Defined in: mcp/errors.ts:64
Check if the error is retryable (connection/timeout issues)
Returns
boolean
isSDKNotInstalled()
isSDKNotInstalled(): boolean;
Defined in: mcp/errors.ts:57
Check if the error is due to missing SDK
Returns
boolean