Skip to content

Commit bbfdf3f

Browse files
authored
Merge branch 'main' into clarify-autoops-trial-ending
2 parents 9d5c63b + 763813f commit bbfdf3f

303 files changed

Lines changed: 7188 additions & 2841 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

contribute-docs/api-docs/elasticsearch-api-docs-quickstart.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,31 @@ You should run `make setup` every time you begin work on a contribution, because
5656
::::{step} Make your docs changes
5757
Edit the relevant TypeScript files in the `specification` directory. Use JSDoc comments to describe your API interfaces, following the [guidelines](./guidelines.md). Add or update summaries, descriptions, tags, metadata, links, and examples as needed.
5858
::::
59+
60+
::::{step} Format your changes
61+
```shell
62+
make spec-format-fix
63+
```
64+
Run this command to format your changes according to the standard used in the specification.
65+
::::
66+
67+
::::{step} Open a pull request
68+
69+
Once you're satisfied with your docs changes:
70+
1. Create a pull request from a branch on your local clone
71+
2. Do not include generated files in the PR, including files under `output/` and `docs/examples/languageExamples.json`. CI regenerates these files, and committing them can cause backport jobs to fail.
72+
3. The CI will generate the output and validate your additions
73+
4. Once approved, merge your changes and ensure they are backported to the appropriate branches
74+
::::
75+
76+
:::::
77+
78+
This is everything that is needed to contribute to the spec, as most validation is performed by CI.
79+
If you need to preview the changes locally and check how they'll be displayed in Bump, then a few more steps are needed.
80+
81+
## Generate a Bump preview
82+
83+
:::::{stepper}
5984
::::{step} Format, generate and validate your changes
6085
```shell
6186
make contrib
@@ -118,14 +143,7 @@ Run these commands to generate short-lived previews:
118143
bump preview output/openapi/elasticsearch-openapi-docs-final.json # Preview Elasticsearch API docs
119144
bump preview output/openapi/elasticsearch-serverless-openapi-docs-final.json # Preview Elasticsearch serverless API docs
120145
```
121-
::::
122-
123-
::::{step} Open a pull request
124-
125-
Once you're satisfied with your docs changes:
126-
1. Create a pull request from a branch on your local clone
127-
2. The CI will validate your OpenAPI specs
128-
3. Once approved, merge your changes and ensure they are backported to the appropriate branches
146+
After generating the previews, make sure files under `output/` and `docs/examples/languageExamples.json` are not included in your pull request. CI regenerates these files.
129147
::::
130148

131149
:::::

contribute-docs/how-to/cumulative-docs/example-scenarios.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ applies_to:
309309

310310
#### If the section lifecycle is different than the page level [unversioned-added-different]
311311

312-
For example, on the [Dashboard controls](https://www.elastic.co/docs/explore-analyze/dashboards/add-controls#add-esql-control) page we added content about new ES|QL controls functionality that was added to Serverless in preview.
312+
For example, on the [Add variable controls with ES|QL](https://www.elastic.co/docs/explore-analyze/visualize/add-variable-controls) page we added content about new ES|QL controls functionality that was added to Serverless in preview.
313313
Because this is different than the page-level applicability in the frontmatter, `serverless: ga`,
314314
label the content about the new functionality with `serverless: preview`.
315315

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
All application connections mirror the permissions of the user that authorizes the connection. If you authorize the connection and you have read and write permissions, then so will your connected application.
2+
3+
When a user's permissions change, the change applies on the next token refresh; changes to a custom role apply immediately.
4+
5+
You can use a secondary user with limited permissions to restrict what the connected application can access. Permissions follow the user who authorizes the connection, so ensure that user is signed in before authorizing it. This user does not need to be the same account used to create the OAuth client or manage application connections.

deploy-manage/api-keys.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ Depending on the APIs you want to use, the API keys to create are different, and
3232
| [](api-keys/elasticsearch-api-keys.md) | {applies_to}`stack: ga` | • Use [{{es}}]({{es-apis}}) and [{{kib}}]({{kib-apis}}) APIs in stack-versioned deployments, including ECH, ECE, ECK, and self-managed clusters.<br><br>• Manage remote cluster connections. |
3333
| [](api-keys/serverless-project-api-keys.md) | {applies_to}`serverless: ga`| Use [{{es}} {{serverless-short}}]({{es-serverless-apis}}) and [{{kib}} {{serverless-short}}]({{kib-serverless-apis}}) APIs. |
3434
| [](api-keys/elastic-cloud-api-keys.md) | {applies_to}`ess: ga` {applies_to}`serverless: ga` | • Manage your {{ecloud}} organization, {{ech}} deployments, and {{serverless-short}} projects using the [{{ecloud}}]({{cloud-apis}}) and [{{ecloud}} {{serverless-short}}]({{cloud-serverless-apis}}) APIs.<br><br>• {applies_to}`serverless: ga` Use [{{es}} {{serverless-short}}]({{es-serverless-apis}}) and [{{kib}} {{serverless-short}}]({{kib-serverless-apis}}) APIs. Using {{ecloud}} keys for project-level API access allows you to create keys that can interact with multiple projects, and manage API access centrally from the {{ecloud}} console. |
35-
|[](api-keys/elastic-cloud-enterprise-api-keys.md) | {applies_to}`ece: ga` | Manage your {{ece}} platform and deployments using the [{{ece}}]({{ece-apis}}) API. |
35+
|[](api-keys/elastic-cloud-enterprise-api-keys.md) | {applies_to}`ece: ga` | Manage your {{ece}} platform and deployments using the [{{ece}}]({{ece-apis}}) API. |

deploy-manage/app-connections.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
navigation_title: Application connections
3+
description: Register OAuth clients and manage application connections for authorized access to Elastic Serverless projects.
4+
type: overview
5+
applies_to:
6+
serverless: preview
7+
products:
8+
- id: cloud-serverless
9+
- id: kibana
10+
---
11+
12+
<!-- this url is referenced in the UI - do not move without a redirect -->
13+
14+
# Application connections [app-connections]
15+
16+
Application connections let users authorize external applications to act on their behalf in {{serverless-short}} projects using OAuth 2.1.
17+
18+
Currently, only MCP clients for the [](/explore-analyze/ai-features/agent-builder/mcp-server.md) are supported. For that use case, OAuth 2.1 replaces static API keys when you need multi-user, delegated access. OAuth tokens are accepted only by the MCP server endpoint.
19+
20+
The sections below describe tasks for registering MCP clients, connecting hosts, revoking access, and managing connections at the project or organization level.
21+
22+
:::{note}
23+
Application connections are not the same as [{{kib}} connectors](/deploy-manage/manage-connectors.md) or [search connectors](elasticsearch://reference/search-connectors/index.md). {{kib}} connectors store credentials so {{kib}} can send actions to external systems. Search connectors sync data from third-party sources into {{es}}. Application connections allow external systems access to your {{serverless-short}} projects.
24+
:::
25+
26+
## Before you begin
27+
28+
To choose between an application connection or API keys to authorize external applications for the {{agent-builder}} MCP server, refer to [MCP server authentication](/explore-analyze/ai-features/agent-builder/mcp-server.md#mcp-server-authentication).
29+
30+
## Manage application connections [application-connections-tasks]
31+
32+
Use the following pages to set up and manage application connections for MCP clients:
33+
34+
- [](app-connections/oauth-clients.md): Set up and manage OAuth access for MCP clients, including registering clients, connecting hosts, and revoking access at the project level.
35+
- [](app-connections/manage-app-connections.md): Audit and revoke authorized connections across your organization's {{serverless-short}} projects in the {{ecloud}} Console.
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
---
2+
navigation_title: "Connect an MCP host"
3+
description: "Configure an MCP host to use an OAuth client and complete the authorization flow to establish a connection to Agent Builder."
4+
type: how-to
5+
applies_to:
6+
serverless: preview
7+
products:
8+
- id: elasticsearch
9+
- id: kibana
10+
- id: cloud-serverless
11+
---
12+
13+
# Connect an MCP host to {{agent-builder}}
14+
15+
After an OAuth client is [created](create-oauth-client.md), configure your MCP host, usually your AI agent, with the client ID and MCP server URL, then complete the OAuth authorization flow to establish the connection. After completing the setup, your MCP host has an authorized OAuth connection to {{agent-builder}} and can run its tools with your permissions.
16+
17+
This page covers two common MCP hosts:
18+
* Claude Code CLI, which has native OAuth support
19+
* Claude Desktop, which uses the `mcp-remote` adapter
20+
21+
Other OAuth 2.1 hosts follow the same general pattern, so consult your host's documentation for the specific configuration format.
22+
23+
## Before you begin [connect-mcp-host-before-you-begin]
24+
25+
Confirm the following before you configure your MCP host:
26+
27+
- You have an MCP host that supports OAuth 2.1, such as the Claude Code CLI or Claude Desktop.
28+
- You have the client ID and MCP server URL for the OAuth client. You either [created the client](create-oauth-client.md) yourself or received these values from the person who did.
29+
- You have access to the {{serverless-short}} project that the OAuth client is scoped to, not just organization-level access. The connection acts with your own permissions in that project, so you also need the privileges required for the tools you'll run through the MCP server, such as {{agent-builder}} access and **Read** access to any data those tools query. To learn more, refer to [Permissions](/explore-analyze/ai-features/agent-builder/permissions.md).
30+
31+
## Connect your MCP host to an OAuth client [connect-mcp-host]
32+
33+
Complete the following steps to start using your OAuth client in your MCP host.
34+
35+
:::::::{stepper}
36+
37+
::::::{step} Configure your MCP host
38+
39+
Choose the instructions for your host.
40+
41+
:::::{tab-set}
42+
43+
::::{tab-item} Claude Code CLI
44+
45+
**Option 1: Native HTTP transport (recommended)**
46+
47+
The Claude Code CLI supports OAuth natively, so no additional adapter is required.
48+
49+
Run the following command, replacing `{CLIENT_ID}` and `{MCP_SERVER_URL}` with the values for your OAuth client:
50+
51+
```bash
52+
claude mcp add --transport http --client-id {CLIENT_ID} kibana-mcp {MCP_SERVER_URL}
53+
```
54+
55+
:::{note}
56+
For a confidential client, add the `--client-secret` flag. The flag takes no value: the CLI prompts for the secret with masked input. To skip the prompt, set the `MCP_CLIENT_SECRET` environment variable before you run the command.
57+
58+
```bash
59+
claude mcp add --transport http --client-id {CLIENT_ID} --client-secret kibana-mcp {MCP_SERVER_URL}
60+
```
61+
:::
62+
63+
When Claude Code starts the OAuth flow, it listens for the authorization response at `http://localhost/callback`. This is one of the default redirect URIs populated in the [OAuth client registration form](/deploy-manage/app-connections/create-oauth-client.md#create-the-client), so it should be included in your client's redirect URIs unless you explicitly removed it.
64+
65+
**Option 2: mcp-remote adapter**
66+
67+
Use this option if your version of Claude Code doesn't support native HTTP OAuth transport.
68+
69+
```bash
70+
claude mcp add --transport stdio kibana-mcp -- \
71+
npx mcp-remote \
72+
"{MCP_SERVER_URL}" \
73+
--static-oauth-client-info \
74+
"{\"client_id\":\"{CLIENT_ID}\"}"
75+
```
76+
77+
Replace `{MCP_SERVER_URL}` and `{CLIENT_ID}` with the values for your OAuth client.
78+
79+
:::{note}
80+
Confidential clients must include the client secret in the `--static-oauth-client-info` JSON: `{"client_id":"{CLIENT_ID}","client_secret":"{CLIENT_SECRET}"}`.
81+
:::
82+
83+
When the `mcp-remote` adapter starts the OAuth flow, it listens for the authorization response at `http://localhost/oauth/callback`. This is one of the default redirect URIs populated in the [MCP client registration form](/deploy-manage/app-connections/create-oauth-client.md#create-the-client), so it should be included in your client's redirect URIs unless you explicitly removed it.
84+
85+
The server is now configured. Start a Claude Code session. The OAuth authorization flow triggers automatically on the first use of the server.
86+
87+
::::
88+
89+
::::{tab-item} Claude Desktop
90+
91+
Claude Desktop uses the [mcp-remote](https://www.npmjs.com/package/mcp-remote) adapter to handle OAuth connections.
92+
93+
To configure Claude Desktop:
94+
95+
1. In Claude Desktop, open **Settings → Developer → Edit Config**. This opens `claude_desktop_config.json` in your text editor.
96+
2. Add your MCP client to the `mcpServers` object:
97+
98+
```json
99+
{
100+
"mcpServers": {
101+
"kibana-mcp": {
102+
"command": "npx",
103+
"args": [
104+
"mcp-remote",
105+
"{MCP_SERVER_URL}",
106+
"--static-oauth-client-info",
107+
"{\"client_id\":\"{CLIENT_ID}\"}"
108+
]
109+
}
110+
}
111+
}
112+
```
113+
114+
Replace `{MCP_SERVER_URL}` and `{CLIENT_ID}` with the values for your OAuth client.
115+
116+
:::{note}
117+
Confidential clients also require a `client_secret` in the `--static-oauth-client-info` JSON: `{"client_id":"{CLIENT_ID}","client_secret":"{CLIENT_SECRET}"}`.
118+
:::
119+
120+
3. Save the file and restart Claude Desktop to load the new configuration.
121+
122+
When the `mcp-remote` adapter starts the OAuth flow, it listens for the authorization response at `http://localhost/oauth/callback`. This is one of the default redirect URIs populated in the [OAuth client registration form](/deploy-manage/app-connections/create-oauth-client.md#create-the-client), so it should be included in your client's redirect URIs unless you explicitly removed it.
123+
124+
::::
125+
126+
::::{tab-item} Other
127+
128+
Most hosts that support OAuth 2.1 accept a similar configuration to Claude. Provide the `{MCP_SERVER_URL}` and `{CLIENT_ID}` in the format your host requires.
129+
130+
::::
131+
132+
:::::
133+
134+
::::::
135+
136+
::::::{step} Authorize the connection
137+
:anchor: authorize-connection
138+
139+
The first time your MCP host tries to use the configured server, it opens a browser window and starts the OAuth authorization flow.
140+
141+
:::{note}
142+
Some tools might require additional manual steps. For example, Claude Code CLI requires that you type `/mcp` or run `claude mcp login <mcp-server-name>` before the browser window opens.
143+
:::
144+
145+
1. Your browser opens to an {{ecloud}} sign-in page. Sign in with your {{ecloud}} credentials. If you have an active session, you are not prompted to log in again.
146+
2. The **Connect and authorize** page opens, showing which project the OAuth client is requesting access to. Click **Authorize** to grant access.
147+
3. The browser confirms the authorization is complete. Close the tab and return to your MCP host.
148+
149+
A new app connection is created scoped to your account and the project associated with the OAuth client. The connection name is auto-generated in the format `<client-name>#<word-pair>`. This connection is visible in both {{kib}} and the {{ecloud}} Console.
150+
151+
If you click **Deny** on the **Connect and authorize** page, then no connection is created. The host retries the flow the next time you use a tool, or you can restart the host to trigger a fresh attempt.
152+
153+
:::: {admonition} Application permissions
154+
:::{include} /deploy-manage/_snippets/app-connection-permissions.md
155+
:::
156+
::::
157+
158+
::::::
159+
160+
::::::{step} Verify the connection
161+
162+
This step is optional. To ensure that the connection is registered in {{kib}}, you can check the number of currently active connections for your client.
163+
164+
In {{kib}}, go to **Agent Builder****Tools library**, click **Manage MCP**, and select **Manage MCP clients (OAuth)** to confirm the connection count for your client has increased. If you don't see it within a minute of authorizing, refresh the page.
165+
166+
You can also check your connection in the {{ecloud}} Console at **Organization****Security settings****Application connections**.
167+
168+
::::::
169+
170+
:::::::
171+
172+
## Troubleshoot
173+
174+
**The host shows an error and doesn't open a browser.**
175+
176+
Confirm the `{MCP_SERVER_URL}` in your config matches exactly what {{kib}} displays. The correct URL ends with `/api/agent_builder/mcp`. A typo, extra slash, or doubled path segment will prevent the OAuth discovery step from completing.
177+
178+
**Authorization completed but no connection appears in {{kib}}.**
179+
180+
Confirm you have access to the {{serverless-short}} project associated with the OAuth client. If your account doesn't have project access, the authorization step fails silently.
181+
182+
**The host shows a new sign-in prompt after a period of inactivity.**
183+
184+
Connections expire after 30 days without use. Complete the authorization flow again to re-establish the connection.
185+
186+
**The authorization flow fails after you wait on the authorization page.**
187+
188+
The MCP host's local callback server times out if the **Connect and authorize** page is left open too long before you click **Authorize**. Start the flow again and click **Authorize** promptly without leaving the page open.
189+
190+
**You need to start fresh with a new connection.**
191+
192+
Consult your MCP host's documentation for how to clear cached OAuth credentials and force a new authorization. Most hosts maintain only one connection for each MCP server URL, so reconfiguring with the same URL will reuse the existing connection unless the cached credentials are cleared.
193+
194+
## Next steps
195+
196+
When access is no longer needed, [revoke the connection](revoke-oauth-client.md).
197+
198+
## Related pages
199+
200+
- [](oauth-clients.md)
201+
- [](create-oauth-client.md)
202+
- [](manage-app-connections.md)

0 commit comments

Comments
 (0)