Skip to navigation

isMcpServerEnabled

View as MarkdownOpen in Claude

Check if the MCP server endpoint is enabled on this agent. Returns true if enableMcpServer() has been called.

Parameters

None.

Returns

boolean — true if the MCP server endpoint is enabled, false otherwise.

Example

import { AgentBase } from '@signalwire/sdk';
const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
console.log(agent.isMcpServerEnabled()); // false
agent.enableMcpServer();
console.log(agent.isMcpServerEnabled()); // true