> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up Splunk in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/splunk
Last updated: 2026-11-24

Share Splunk with your team in Claude, ChatGPT and Cursor through Metorial: splunk auth token or username & password sign-in, 24 tools (12 read-only).

---

To give your team Splunk in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Splunk integration in a Metorial portal, and each person connects with a splunk auth token. Agents can search, monitor, and analyze machine-generated data such as logs, metrics, and events. The integration has 24 tools, 12 read-only, 9 write and 3 destructive, plus 1 trigger.

**What you will learn**

- How an admin shares Splunk in a portal and how each person connects
- What Splunk asks for when you connect, and where to find it
- How to keep the 12 read-only tools and reject the other 12

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- A splunk auth token from Splunk for each person, or one for a shared connection
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/cli), signed in to your portal

## Sign-in methods

| Method | Type | What a person provides |
| --- | --- | --- |
| **Splunk Auth Token** (default) | API token | `token` and `hecToken` |
| **Username & Password** | Custom credentials | `host`, `managementPort`, `scheme`, `username`, `password` and `hecToken` |

The portal and `metorial setup` use **Splunk Auth Token** unless someone picks another method.

### Splunk Auth Token

To connect, a person enters these values:

- `token`: Splunk authentication token (JWT) or session key
- `hecToken` (optional): HTTP Event Collector token for data ingestion (optional)

### Username & Password

To connect, a person enters these values:

- `host`: Splunk instance hostname or IP address
- `managementPort` (optional): Management REST API port
- `scheme` (optional): Connection scheme One of "https", "http".
- `username`: Splunk username
- `password`: Splunk password
- `hecToken` (optional): HTTP Event Collector token for data ingestion (optional)

### Setup settings

Whichever method you pick, setup also asks for:

- `host`: Splunk instance hostname or IP address (e.g. "splunk.example.com")
- `managementPort` (optional): Management REST API port (default: 8089)
- `hecPort` (optional): HTTP Event Collector port (default: 8088)
- `scheme` (optional): Connection scheme. HTTPS is strongly recommended and required for Splunk Cloud. One of "https", "http".

## Admin: share Splunk in a portal

### In the dashboard

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **Share a new integration**

   Select **Share a Resource**, then **New Integration**, and choose Splunk. Under **Auth Method**, keep **Splunk Auth Token** or pick another. For how members connect, choose **Each person connects** so everyone enters their own splunk auth token, or **Shared connection** to enter one splunk auth token for everyone.

3. **Limit the tools**

   Under **Tool Filters**, set the write and destructive groups to **Reject** if agents should only read from Splunk.

4. **Choose who gets it**

   Add the access groups that should see Splunk. When a person asks for access from the portal, the request appears under **Access Requests**.

### With the CLI

The CLI cannot create the per-user Splunk integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search splunk
```

## Employee: connect Splunk

### In the portal

1. **Open Splunk in the catalog**

   Sign in to your portal and open Splunk. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. In the setup window, enter your splunk auth token (token).

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search splunk
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. `metorial setup` uses **Splunk Auth Token**. To connect with **Username & Password** instead, find its ID with `metorial catalog get <catalog-item-id>` and add `--auth-method <auth-method-id>`.

### Add it to your AI client

`metorial install` adds your Splunk connection to a local MCP client such as Claude Code, Cursor or Codex. `metorial list` prints the integration ID and `metorial client list` the client identifiers.

```bash
metorial list splunk
metorial client list
metorial install <client-identifier> <integration-id>
```

For a client that takes a server URL, such as ChatGPT, `metorial install custom <integration-id>` creates an installation token and shows the endpoint details.

## Make it read-only

Open the integration's **Tool Filters** and set the write and destructive groups to **Reject**. Agents keep the 12 read-only tools, such as `get_index` and `list_apps`, and lose the 9 write tools, such as `create_index` or `send_hec_event`, and the 3 destructive tools, such as `delete_saved_search` or `delete_kvstore_records`.

Employees see the result on the integration's page in the portal under **Tool access**. For the full walkthrough, see [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list splunk
metorial tools <integration-id>
metorial call <integration-id> get_current_user -d '{}'
```

`metorial tools` lists the 24 tools, minus any you rejected. `get_current_user` takes no input. It gets information about the currently authenticated Splunk user, including username, roles, and capabilities.

To see every input a tool takes, run `metorial schema <integration-id> <tool-key>`.

## Tools

### Read-only tools (12)

- `get_index`: Get detailed information about a specific Splunk index including size, event count, time range, retention policy, and storage paths. Needs `indexName`.
- `list_users`: List Splunk users on the instance.
- `get_search_results`: Retrieve the status and results of a previously created search job. Needs `searchId`.
- `list_indexes`: List data indexes on the Splunk instance.
- `get_server_info`: Retrieve Splunk server information including server name, version, build number, OS, CPU architecture, and license state.
- `list_kvstore_collections`: List all KV Store collections within a given Splunk app. Needs `app`.
- `run_search`: Execute an SPL (Search Processing Language) query against Splunk. Needs `searchQuery`.
- `list_saved_searches`: List saved searches configured on the Splunk instance.
- `query_kvstore_records`: Query records from a KV Store collection. Needs `app` and `collectionName`.
- `list_fired_alerts`: List recently fired alerts on the Splunk instance.
- `get_current_user`: Get information about the currently authenticated Splunk user, including username, roles, and capabilities.
- `list_apps`: List installed local Splunk apps.

### Write tools (9)

- `create_saved_search`: Create a new saved search in Splunk. Needs `name` and `searchQuery`.
- `dispatch_saved_search`: Execute (dispatch) an existing saved search. Needs `name`.
- `upsert_kvstore_record`: Insert a new record or update an existing record in a KV Store collection. Needs `app`, `collectionName` and `record`.
- `create_kvstore_collection`: Create a new KV Store collection in a Splunk app. Needs `app` and `collectionName`.
- `create_index`: Create a new data index on the Splunk instance. Needs `name`.
- `send_hec_raw_event`: Send raw text data to Splunk via the HTTP Event Collector (HEC) raw endpoint. Needs `rawData` and `channel`.
- `send_hec_event`: Send one or more events to Splunk via the HTTP Event Collector (HEC). Needs `events`.
- `update_saved_search`: Update an existing saved search in Splunk. Needs `name`.
- `control_search_job`: Control a running or retained Splunk search job. Needs `searchId` and `action`.

### Destructive tools (3)

- `delete_kvstore_records`: Delete one or more records from a KV Store collection. Needs `app` and `collectionName`.
- `delete_saved_search`: Delete a saved search from the Splunk instance by name. Needs `name`.
- `delete_kvstore_collection`: Delete an entire KV Store collection and all its records from a Splunk app. Needs `app` and `collectionName`.

## Triggers

Splunk has 1 trigger, which fire on events in Splunk:

- `alert_fired`: Triggers when a Splunk alert fires and sends a webhook notification.

## Next steps

- [Claude Code](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use Splunk there
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Splunk on metorial.com](https://metorial.com/integrations/splunk): the integration overview