Mcp API
MCP API
import { CodeBoltClient } from '@codebolt/clientsdk';
const client = new CodeBoltClient();
Quick Reference
| Method | Description |
|---|---|
browserNavigate | Navigates to a URL using the browser MCP server. |
configure | Applies global MCP configuration settings. |
configureServer | Configures a specific MCP server's settings. |
create | Creates a new custom MCP server configuration. |
getAll | Retrieves all MCP servers currently registered in the workspace. |
getAvailableAll | Retrieves all available MCP servers including both marketplace and community servers. |
getAvailableDetail | Retrieves detailed information about a specific available MCP server. |
getAvailableList | Retrieves the catalog of MCP servers available for installation. |
getByName | Retrieves a specific MCP server by its registered name. |
getConfiguredMcps | Retrieves all MCP servers that have been configured in the workspace. |
getLocalMcpList | Retrieves the list of locally defined MCP servers. |
getMcpConfigPath | Retrieves the filesystem path to the MCP configuration file. |
install | Installs an MCP server from the available catalog. |
toggle | Toggles an MCP server between enabled and disabled states. |
updateTools | Updates the tool configurations for MCP servers. |
Methods
browserNavigate
client.mcp.browserNavigate(data: McpBrowserNavigateRequest): Promise<unknown>
Navigates to a URL using the browser MCP server.
Sends a navigation command to the browser automation MCP server, instructing it to load a specific web page. Requires the browser MCP server to be installed and enabled.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | McpBrowserNavigateRequest | Yes | The navigation request |
Returns: Promise<unknown> — A promise that resolves when the navigation has been initiated
configure
client.mcp.configure(data: McpConfigureRequest): Promise<unknown>
Applies global MCP configuration settings.
Updates the workspace-level MCP settings that affect how all MCP servers are managed, including default timeout values, transport preferences, and security policies.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | McpConfigureRequest | Yes | The global MCP configuration to apply |
Returns: Promise<unknown> — A promise that resolves when the configuration has been saved
configureServer
client.mcp.configureServer(serverName: string, data: McpConfigureServerRequest): Promise<unknown>
Configures a specific MCP server's settings.
Updates the connection parameters, environment variables, and other settings for a named MCP server. The server may need to be restarted for changes to take effect.
| Parameter | Type | Required | Description |
|---|---|---|---|
serverName | string | Yes | The name of the MCP server to configure |
data | McpConfigureServerRequest | Yes | The server-specific configuration to apply |
Returns: Promise<unknown> — A promise that resolves when the server configuration has been saved
create
client.mcp.create(data: McpCreateRequest): Promise<unknown>
Creates a new custom MCP server configuration.
Registers a custom MCP server that is not part of the standard catalog. This is useful for connecting to proprietary or locally developed MCP-compatible services.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | McpCreateRequest | Yes | The custom server creation payload |
Returns: Promise<unknown> — A promise that resolves when the server has been created
getAll
client.mcp.getAll(): Promise<McpServer[]>
Retrieves all MCP servers currently registered in the workspace.
Returns every MCP server regardless of its enabled/disabled status, including connection details, available tools, and current health information.
No parameters.
Returns: Promise<McpServer[]> — A promise that resolves to an array of all registered MCP servers
getAvailableAll
client.mcp.getAvailableAll(): Promise<McpAvailableServer[]>
Retrieves all available MCP servers including both marketplace and community servers.
Returns the full unfiltered catalog of MCP servers from all sources. This includes official, community-contributed, and locally developed servers.
No parameters.
Returns: Promise<McpAvailableServer[]> — A promise that resolves to an array of all available MCP servers
getAvailableDetail
client.mcp.getAvailableDetail(mcpId: string): Promise<McpAvailableServer>
Retrieves detailed information about a specific available MCP server.
Returns comprehensive details about an MCP server from the catalog, including its description, supported tools, configuration schema, and installation requirements.
| Parameter | Type | Required | Description |
|---|---|---|---|
mcpId | string | Yes | The identifier of the available MCP server to inspect |
Returns: Promise<McpAvailableServer> — A promise that resolves to the detailed MCP server information
getAvailableList
client.mcp.getAvailableList(): Promise<McpAvailableServer[]>
Retrieves the catalog of MCP servers available for installation.
Returns a curated list of MCP servers that can be installed from the marketplace or registry. Use this to discover new capabilities to add to the workspace.
No parameters.
Returns: Promise<McpAvailableServer[]> — A promise that resolves to an array of available MCP servers
getByName
client.mcp.getByName(serverName: string): Promise<McpServer>
Retrieves a specific MCP server by its registered name.
Returns the full configuration and status of a single MCP server, including its tool definitions, resource list, and connection parameters.
| Parameter | Type | Required | Description |
|---|---|---|---|
serverName | string | Yes | The registered name of the MCP server to retrieve |
Returns: Promise<McpServer> — A promise that resolves to the MCP server details
getConfiguredMcps
client.mcp.getConfiguredMcps(): Promise<McpServer[]>
Retrieves all MCP servers that have been configured in the workspace.
Returns only servers that have been explicitly set up (installed and configured), as opposed to all available servers in the catalog.
No parameters.
Returns: Promise<McpServer[]> — A promise that resolves to an array of configured MCP servers
getLocalMcpList
client.mcp.getLocalMcpList(): Promise<McpServer[]>
Retrieves the list of locally defined MCP servers.
Returns MCP servers that are defined in the local workspace configuration rather than installed from the marketplace. These are typically custom or development servers.
No parameters.
Returns: Promise<McpServer[]> — A promise that resolves to an array of local MCP servers
getMcpConfigPath
client.mcp.getMcpConfigPath(): Promise<McpConfigPath>
Retrieves the filesystem path to the MCP configuration file.
Returns the absolute path where the MCP configuration is stored on disk. Useful for manual editing or backup of MCP server configurations.
No parameters.
Returns: Promise<McpConfigPath> — A promise that resolves to the MCP configuration file path
install
client.mcp.install(data: McpInstallRequest): Promise<unknown>
Installs an MCP server from the available catalog.
Downloads and registers an MCP server, making it available for configuration and use. The server may require additional configuration (e.g., API keys) before it can be started.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | McpInstallRequest | Yes | The installation request specifying which server to install |
Returns: Promise<unknown> — A promise that resolves when the installation has completed
toggle
client.mcp.toggle(data: McpToggleRequest): Promise<unknown>
Toggles an MCP server between enabled and disabled states.
Enables or disables a registered MCP server. Disabled servers will not be started or connected to, and their tools will not be available to agents.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | McpToggleRequest | Yes | The toggle request specifying the server and desired state |
Returns: Promise<unknown> — A promise that resolves when the toggle operation has completed
updateTools
client.mcp.updateTools(data: McpUpdateToolsRequest): Promise<unknown>
Updates the tool configurations for MCP servers.
Modifies which tools are exposed or hidden from agents, and updates tool-specific settings like descriptions, parameter defaults, or access permissions.
| Parameter | Type | Required | Description |
|---|---|---|---|
data | McpUpdateToolsRequest | Yes | The tool update configuration |
Returns: Promise<unknown> — A promise that resolves when the tool configurations have been updated