# Model Context Protocol (MCP)

## Introduction to Model Context Protocol (MCP) <a href="#introduction-to-model-context-protocol-mcp" id="introduction-to-model-context-protocol-mcp"></a>

The Model Context Protocol (MCP) is an open standard, created by the AI company Anthropic, that enables seamless integration between AI models and local or remote data sources. It provides a universal way for AI agents to safely access your files, databases, and software tools without requiring custom code for every new integration.

### **Why Use MCP?**

Instead of fragmented integrations, MCP allows you to build a server once and use it across various AI platforms. By using MCP-servers, you can:

* Securely connect your private data to LLMs.
* Standardize how tools and "functions" are exposed to the model.
* Scale your AI capabilities by plugging into a growing ecosystem of pre-built servers.

### **Setting up your MCP server**

As the originators and primary maintainers of the MCP specification, Anthropic provides the most accurate and up-to-date technical reference. Using the official documentation ensures you are working with the latest security standards, SDK updates, and architectural best practices as the protocol evolves.

View the official guide here: <https://modelcontextprotocol.io/docs/getting-started/intro>

## Connect your MCP server with Ebbot <a href="#connect-your-mcp-server-with-ebbot" id="connect-your-mcp-server-with-ebbot"></a>

Follow these instructions to connect your MCP server to the Ebbot chat platform.&#x20;

### Where settings are configured <a href="#where-settings-are-configured" id="where-settings-are-configured"></a>

Users configure MCP by filling in fields in the EbbotGPT Configurations under **MCP Configuration**.

These values are entered as UI inputs (not typically edited as raw JSON):

* URL
* Transport (`streamable_http` / `sse`)
* Auth Header Name
* Auth Secret
* Additional Header key/value pairs
* Default Resource URIs

### What MCP does in EbbotGPT for chat agents <a href="#what-mcp-does-in-ebbot-gpt" id="what-mcp-does-in-ebbot-gpt"></a>

When MCP is enabled in a EbbotGPT configuration, the chat agent can:

* Discover tools from your MCP server.
* Call MCP tools during the tool-calling loop.
* Optionally read configured default MCP resources before generation.
* Optionally expose a `get_resource` helper tool when your MCP server publishes resources.

### Configuration options <a href="#configuration-options" id="configuration-options"></a>

**URL**

* MCP server URL.
* If omitted, MCP is disabled.

**Transport**

Supported values:

* `streamable_http`
* `sse` (legacy/deprecated)

Transport guidance:

* `streamable_http` is the current MCP standard for new server integrations.
* `sse` is retained for compatibility with older MCP servers.

**Auth Header Name and Auth Secret**

* Auth Header Name defines which header should carry your secret.
* Auth Secret is treated as sensitive input and is stored securely on the backend.

**Additional Headers**

* Extra static headers as key/value pairs.

**Default Resource URIs**

* Optional list of resources that should be fetched at startup.
* Format: array of objects with `uri`.

### Tool behaviour <a href="#tool-behaviour" id="tool-behaviour"></a>

* MCP tools are mapped into GPT callable tools.
* Tool input schemas are forwarded from MCP `inputSchema`.
* Tool responses are returned as text content to the model.
* If no text content is returned by the MCP tool, result falls back to `<no_content>`.

### Chat-level bearer token support <a href="#chat-level-bearer-token-support" id="chat-level-bearer-token-support"></a>

MCP requests can also include a bearer token from chat session state:

* Field name: `mcp_bearer_token`
* If present, requests include `Authorization: Bearer <token>`.

Typical usage is to set this token for a specific chat/session when you need per-chat or per-user MCP authorization.

## Best practices using MCP in Ebbot <a href="#best-practices" id="best-practices"></a>

* Use `streamable_http` for new MCP server integrations.
* Use `sse` only when you must support a legacy MCP endpoint.
* Keep tool descriptions and schemas clear on the MCP server side, since they are surfaced to the model.
* Limit default resources to small, high-value context to reduce prompt bloat.
* Use least-privilege auth headers and rotate secrets regularly.
* Prefer chat-scoped bearer tokens when auth should vary between users or conversations.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ebbot.ai/ebbot-docs/core-capabilities/ebbotgpt/ebbotgpt-configurations/model-context-protocol-mcp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
