Skip to content

Add MCP Connectors documentation #9757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 6, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _ml-commons-plugin/agents-tools/mcp/mcp-connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
This is an experimental feature and is not recommended for use in a production environment. For updates on the progress of the feature or if you want to leave feedback, join the discussion on the [OpenSearch forum](https://forum.opensearch.org/).
{: .warning}

OpenSearch supports agentic workflows using [agents]({{site.url}}{{site.baseurl}}/ml-commons-plugin/agents-tools/#agents). While OpenSearch provides built-in tools for running complex queries, [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) enables integration with external tools and data sources. MCP is an open protocol standard that provides a standardized way for AI models to connect to external data sources and tools, acting as a "universal adapter" for remote MCP server tools.

Check failure on line 16 in _ml-commons-plugin/agents-tools/mcp/mcp-connector.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.Spelling] Error: agentic. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks. Raw Output: {"message": "[OpenSearch.Spelling] Error: agentic. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_ml-commons-plugin/agents-tools/mcp/mcp-connector.md", "range": {"start": {"line": 16, "column": 21}}}, "severity": "ERROR"}

Currently, OpenSearch only supports MCP servers that use the Server-Sent Events (SSE) protocol. Standard Input/Output (`stdio`) protocol is not supported.
{: .note}

The following example demonstrates using MCP tools in agentic workflows.

Check failure on line 21 in _ml-commons-plugin/agents-tools/mcp/mcp-connector.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.Spelling] Error: agentic. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks. Raw Output: {"message": "[OpenSearch.Spelling] Error: agentic. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_ml-commons-plugin/agents-tools/mcp/mcp-connector.md", "range": {"start": {"line": 21, "column": 55}}}, "severity": "ERROR"}

## Prerequisites

Expand Down Expand Up @@ -74,7 +74,7 @@

| Parameter | Data type | Required | Description |
|:----------|:---------|:------------|
| `protocol` | String | Yes | Specify `mcp_sse` to use the SSE protocol (currently the only supported protocol type). |
| `protocol` | String | Yes | Specify `mcp_sse` to use the SSE protocol (currently the only supported protocol type for MCP). |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove "currently". This is implied.

| `url` | String | Yes | The complete base URL of the MCP server, including protocol, hostname, and port, if not using the default port (for example, `https://my-mcp-server.com:8443`). |
| `credential` | Object | Yes | Contains sensitive authentication information such as API keys or tokens. Values stored in this object can be securely referenced in the `headers` section using the `${credential.*}` syntax. |
| `headers` | Object | No | The HTTP headers to include with requests to the MCP server. For authentication headers, use the `${credential.*}` syntax to reference values from the `credential` object (for example, `"Authorization": "Bearer ${credential.mcp_server_key}"`). |
Expand Down Expand Up @@ -108,7 +108,7 @@
"model": "gpt-4o"
},
"credential": {
"openAI_key": "<YOUR_API_KEY>"

Check warning on line 111 in _ml-commons-plugin/agents-tools/mcp/mcp-connector.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.AcronymParentheses] 'AI': Spell out acronyms the first time that you use them on a page and follow them with the acronym in parentheses. Subsequently, use the acronym alone. Raw Output: {"message": "[OpenSearch.AcronymParentheses] 'AI': Spell out acronyms the first time that you use them on a page and follow them with the acronym in parentheses. Subsequently, use the acronym alone.", "location": {"path": "_ml-commons-plugin/agents-tools/mcp/mcp-connector.md", "range": {"start": {"line": 111, "column": 12}}}, "severity": "WARNING"}
},
"actions": [
{
Expand Down
Loading