# Splunk — Pipedream Connect

> Get visibility and insights across your whole organization, powering actions that improve security, reliability and innovation velocity.

- API slug: `splunk` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Data Analytics
- Website: https://www.splunk.com/
- This page (HTML): https://pipedream.com/apps/splunk
- Tools: 6 actions · 3 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: splunk`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "splunk",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Create Event:
const result = await mcp.callTool({
  name: "splunk-create-event",
  arguments: {
    indexName: "Index Name",
    eventData: "Event Data",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "splunk-create-event",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    splunk: { authProvisionId: "apn_xxxxxxx" },
    indexName: "Index Name",
    eventData: "Event Data",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (6)

### `splunk-create-event` — Create Event (Write)

Sends a new event to a specified Splunk index. See the documentation

Full schema: https://pipedream.com/apps/splunk/actions/create-event.md

### `splunk-get-search-job-status` — Get Search Job Status (Read-only)

Retrieve the status of a previously executed Splunk search job. See the documentation

Full schema: https://pipedream.com/apps/splunk/actions/get-search-job-status.md

### `splunk-list-index-name-options` — List Index Name Options (Read-only)

Retrieves available options for the Index Name field.

Full schema: https://pipedream.com/apps/splunk/actions/list-index-name-options.md

### `splunk-list-saved-search-name-options` — List Saved Search Name Options (Read-only)

Retrieves available options for the Saved Search Name field.

Full schema: https://pipedream.com/apps/splunk/actions/list-saved-search-name-options.md

### `splunk-list-job-id-options` — List Search ID Options (Read-only)

Retrieves available options for the Search ID field.

Full schema: https://pipedream.com/apps/splunk/actions/list-job-id-options.md

### `splunk-run-search` — Run Search (Write)

Executes a Splunk search query and returns the results. See the documentation

Full schema: https://pipedream.com/apps/splunk/actions/run-search.md

## Triggers (3)

### `splunk-new-alert-fired` — New Alert Fired (Instant) (Instant)

Emit new event when a new alert is triggered in Splunk. See the documentation

Full schema: https://pipedream.com/apps/splunk/triggers/new-alert-fired.md

### `splunk-new-search-event` — New Search Event (Polling)

Emit new event when a new search event is created. See the documentation

Full schema: https://pipedream.com/apps/splunk/triggers/new-search-event.md

### `splunk-new-search-result` — New Search Result (Polling)

Emit new events when a search returns results in Splunk. See the documentation

Full schema: https://pipedream.com/apps/splunk/triggers/new-search-result.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
