# McpClient

**Kind:** Class

**Source:** [`atloria-monorepo/libs/agent-core/src/mcp/mcp-client.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/agent-core/src/mcp/mcp-client.ts#L87)

## Methods

| Method | Signature | Returns |
|---|---|---|
| `initialize` | `initialize()` | `Promise<McpServerInfo>` |
| `listTools` | `listTools()` | `Promise<McpToolDefinition[]>` |
| `callTool` | `callTool(name: string, args: Record<string, unknown>)` | `Promise<McpCallResult>` |
| `close` | `close()` | `Promise<void>` |

## Where it refuses work

- `McpClient` stops the work with an early return when `!pending`.

## When something fails

- `McpClient` handles failure in 2 places: it logs it and continues in 1, and discards it silently in 1. A failure discarded silently leaves no trace for whoever debugs this later.
