# Class MCP

MCP (Model Context Protocol) server

The MCP server is a server that can be used to interact with the agent

The MCP server can be started in two ways:

- STDIO: The MCP server will be started in STDIO mode
- SSE: The MCP server will be started in SSE mode, this is case the listening url will be http://localhost:/mcp

- Defined in src/MCP/MCP.class.ts:32

##### Index

### Constructors

constructor

### Methods

starSSEpServer
start
startStdioServer
stop

## Constructors

### constructor

- new MCP(agent: Agent): MCP

  #### Parameters

  - agent: Agent

  #### Returns MCP

  - Defined in src/MCP/MCP.class.ts:38

## Methods

### starSSEpServer

- starSSEpServer(port: any): Promise<string>

  #### Parameters

  - port: any

  #### Returns Promise<string>

  - Defined in src/MCP/MCP.class.ts:56

### start

- start(settings: MCPSettings): Promise<string>

  #### Parameters

  - settings: MCPSettings

  #### Returns Promise<string>

  - Defined in src/MCP/MCP.class.ts:40

### startStdioServer

- startStdioServer(): Promise<string>

  #### Returns Promise<string>

  - Defined in src/MCP/MCP.class.ts:50

### stop

- stop(): void

  Stop the MCP server

  #### Returns void

  #### Example

      const mcp = agent.mcp(MCPTransport.SSE, 3389);
      mcp.stop();

  - Defined in src/MCP/MCP.class.ts:194