> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mira-app.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# What is MCP?

> How the Model Context Protocol lets MIRA call external tools without writing integration code.

**Model Context Protocol (MCP)** is an open standard that lets AI agents discover and call external tools through a lightweight JSON-RPC interface. MIRA implements the MCP client side — any MCP-compatible server can expose tools that both reasoning engines can invoke automatically.

## Why MCP matters

Without MCP, every new tool requires a custom integration. With MCP, any tool that speaks the protocol is immediately available to MIRA:

* **No custom code** — add a server URL or command, and the tools appear automatically
* **Namespaced** — each server's tools are prefixed to avoid collisions
* **Safe** — MIRA prompts you before executing any tool the first time

## How it works

```
┌─────────────┐      JSON-RPC 2.0        ┌─────────────────────┐
│   MIRA NAE  │ ─── list_tools ────────► │   MCP Server        │
│   or RLM    │ ◄── tool definitions ─── │  (stdio or SSE)     │
│             │ ─── call_tool ─────────► │                     │
│             │ ◄── tool result ──────── │                     │
└─────────────┘                          └─────────────────────┘
```

1. MIRA connects to the server and calls `list_tools` to discover available tools.
2. Tool definitions (name, description, JSON schema for inputs) are injected into the engine's context.
3. When the engine decides to use a tool it calls `call_tool` with validated arguments.
4. The server executes the tool and returns the result as text or structured data.

## Transport types

MIRA supports two MCP transports:

| Transport | Description                                                             | Best for                         |
| --------- | ----------------------------------------------------------------------- | -------------------------------- |
| **stdio** | MCP server runs as a subprocess; MIRA communicates via stdin/stdout     | Local CLI tools, scripts         |
| **SSE**   | MCP server runs as an HTTP server; MIRA connects via Server-Sent Events | Remote APIs, shared team servers |

## MCP tool namespacing

Tools are prefixed with the server name to prevent collisions:

```
my-server/search_web
my-server/read_file
another-server/query_db
```

The engine sees the full namespaced name and uses it when calling the tool.

## Next steps

<CardGroup cols={2}>
  <Card title="Add a stdio server" icon="terminal" href="./adding-stdio-server">
    Connect a local CLI-based MCP server
  </Card>

  <Card title="Add an SSE server" icon="wifi" href="./adding-sse-server">
    Connect a remote HTTP-based MCP server
  </Card>
</CardGroup>

<Note>Edit this page — [Open a pull request](https://github.com/satyendra2013/mira-app/edit/main/docs/features/mcp-tools/what-is-mcp.mdx)</Note>
