﻿---
title: MCP in Agent Builder
description: Agent Builder uses MCP in two distinct ways: as a server that external tools can connect to, and as a client that can call external MCP servers.
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7104/explore-analyze/ai-features/agent-builder/mcp-in-agent-builder
products:
  - Kibana
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available
---

# MCP in Agent Builder
Elastic Agent Builder has two distinct, complementary uses of the Model Context Protocol (MCP). Understanding the difference helps you navigate the relevant documentation.

## Two directions


|                                            | What it does                                                                                    | Who initiates                             | Where to configure                                                                                                                                          |
|--------------------------------------------|-------------------------------------------------------------------------------------------------|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Elastic Agent Builder as an MCP server** | Exposes your agents and their tools to external MCP hosts (Claude Desktop, Cursor, Claude Code) | External host connects to Kibana          | [Elastic Agent Builder MCP server](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7104/explore-analyze/ai-features/agent-builder/mcp-server) |
| **Elastic Agent Builder as an MCP client** | Lets your agents call tools on external MCP servers                                             | Kibana connects out to an external server | [MCP tools](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7104/explore-analyze/ai-features/agent-builder/tools/mcp-tools)                   |

These are independent features. You can use one, both, or neither.

## Agent Builder as an MCP server

The Elastic Agent Builder [MCP server](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7104/explore-analyze/ai-features/agent-builder/mcp-server) lets external MCP hosts connect to Kibana and invoke your agent's tools directly — for example, running an ES|QL query from Claude Desktop without opening the Kibana UI.
External clients authenticate using either:
- **OAuth 2.1** — for interactive, user-consented access. An MCP host such as Claude Desktop opens a browser for the user to authenticate, then acts with that user's permissions. See [Authenticate MCP clients with OAuth](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7104/explore-analyze/ai-features/agent-builder/mcp-client-oauth).
- **API keys** — for static, machine-to-machine access. See [Elastic Agent Builder MCP server](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7104/explore-analyze/ai-features/agent-builder/mcp-server).


## Agent Builder as an MCP client

[MCP tools](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7104/explore-analyze/ai-features/agent-builder/tools/mcp-tools) let you extend your agents by pointing them at external MCP servers. You configure an MCP connector (the connection details for the remote server), then import individual tools from that server into your agent's tool catalog. The agent can then call those tools during a conversation.
This direction is unrelated to authentication on the Kibana side — it's about what your agents can reach outward.

## Terminology quick reference


| Term          | Meaning in Agent Builder                                                               |
|---------------|----------------------------------------------------------------------------------------|
| MCP server    | The Kibana interface that external hosts connect to                                    |
| MCP client    | An OAuth-registered application allowed to connect to the Kibana MCP server            |
| MCP host      | The application a user runs (Claude Desktop, Cursor); contains one or more MCP clients |
| MCP connector | Configuration in Agent Builder for reaching an external MCP server                     |
| MCP tool      | A specific callable function imported from an external MCP server into an agent        |


## Related pages

- [Elastic Agent Builder MCP server](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7104/explore-analyze/ai-features/agent-builder/mcp-server)
- [Authenticate MCP clients with OAuth](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7104/explore-analyze/ai-features/agent-builder/mcp-client-oauth)
- [MCP tools](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7104/explore-analyze/ai-features/agent-builder/tools/mcp-tools)