Skip to main content

 

Splunk Lantern

Connecting Google Antigravity to the Splunk MCP server for governed AI agent access

AI agents are only as useful as the context they can reach. If your organization uses the Splunk Cloud Platform for log analytics or SIEM use cases, much of that context already lives in the Splunk platform. The Splunk MCP Server exposes that data to agents through the Model Context Protocol (MCP), and Google Antigravity includes a built-in Splunk MCP connector, so you can give Antigravity agents governed access to query data in the Splunk platform.

As of Splunk MCP Server 2.0, the server exposes SPL search and data discovery, alert investigation, saved searches, Splunk Observability Cloud Application Performance Monitoring (APM), metrics, and trace capabilities, and a number of other tools. Administrators keep control over which tools are exposed, along with authentication, role-based access control (RBAC), guardrails, and workload management.

This article shows you how to create a Splunk OAuth client, configure the Splunk MCP Server in Antigravity, and complete the OAuth handshake. It finishes with example prompts that show what the agent can do after it's connected.

Prerequisites

  • Splunk Cloud Platform version 10.6 or later. OAuth 2.1 support for the Splunk MCP Server is available starting with this version, and the MCP feature is enabled by default.
  • An administrator account in the Splunk platform to create an OAuth client.
  • A user account in the Splunk platform with permissions to the indexes and tools you want the agent to use. The agent acts with the permissions of the user who authenticates.
  • Google Antigravity installed.

How to use Splunk software for this use case

Setup has three parts, followed by a quick validation check:

  1. Create a Splunk OAuth client
  2. Configure the Splunk MCP Server in Antigravity
  3. Authenticate Antigravity to the Splunk platform

Create a Splunk OAuth client

  1. Log in to Splunk Web as an administrator.
  2. Select Settings > Authentication methods.
  3. Under OAuth Configurations, click Splunk OAuth Clients.

    splunk-authentication-methods.png

  4. Click Create Client.
  5. In Client Name, enter a descriptive name, such as antigravity.
  6. In Redirect URIs, enter https://antigravity.google/oauth-callback.
  7. Click Save.

    splunk-new-oauth-client.png

  8. On the Review New Splunk OAuth Client page, copy the Client ID and Client secret and store them securely. You'll need them in the next section.

    splunk-review-oauth-client.png

The client secret is only shown once. You can't view or copy it again after leaving this page. The secret also has an expiration date, shown next to the field. Plan to rotate it before it expires, or the Antigravity connection stops working.

Configure the Splunk MCP Server in Antigravity

  1. In Antigravity, select Settings > Customizations.
  2. In Installed MCP Servers, click Add MCP.
  3. Search for Splunk and click Add. Return to the Customizations page, where the splunk server now appears under Installed MCP Servers, with an Authentication failed: No bearer token provided error expected at this stage because you haven't configured credentials yet.
  4. Click Open MCP Config. The mcp_config.json file opens in an editor and contains a stub entry for the Splunk MCP Server. See Antigravity's MCP documentation for the full configuration reference; this file lives at ~/.gemini/config/mcp_config.json.

    antigravity-installed-mcp-servers.png

  5. Add an oauth section to the splunk entry and set the following values:

    • clientId: The client ID from the Splunk OAuth client.
    • clientSecret: The client secret from the Splunk OAuth client.
    • serverUrl: The MCP endpoint for your Splunk platform deployment, in the format https://<SPLUNK_HOST>/en-US/splunkd/__raw/services/mcp.

    The Splunk MCP Server doesn't support dynamic client registration, so you supply the client ID and secret manually rather than letting Antigravity register automatically. Antigravity restricts the OAuth scopes automatically during the token exchange, so there's no separate scopes field to set in this configuration.

    {
      "mcpServers": {
        "splunk": {
          "oauth": {
            "clientId": "<CLIENT_ID>",
            "clientSecret": "<CLIENT_SECRET>"
          },
          "serverUrl": "https://<SPLUNK_HOST>.splunkcloud.com/en-US/splunkd/__raw/services/mcp"
        }
      }
    }

    antigravity-mcp-config-json.png

  6. Save the file.

The mcp_config.json file contains your client secret in plain text. Don't commit it to source control or share it.

Authenticate Antigravity to the Splunk platform

  1. Select Settings > Customizations.
  2. Click Refresh. An Authenticate button appears next to the splunk server.
  3. Click Authenticate.

    antigravity-authenticate-button.png

  4. A browser window opens to the Splunk platform login page. Log in with the Splunk platform account the agent should act as.

    splunk-login.png

  5. After you authenticate, the OAuth handshake completes and Antigravity displays an authorization code. Click Copy to Clipboard.

    antigravity-oauth-code.png

  6. Select Settings > Customizations in Antigravity.
  7. Paste the code into the field below the splunk server.

    antigravity-paste-oauth-code.png

  8. Click Submit.

Validate the connection

The splunk server now shows a green status indicator, a Sign out button, and the number of tools enabled. Expand the tool list to review which Splunk MCP tools the agent can use.

antigravity-splunk-authenticated.png

To confirm that the agent can reach your data, open the Antigravity agent panel and ask a simple question, such as What indexes do I have access to in Splunk?

Antigravity stores the resulting tokens locally and refreshes them automatically, so you shouldn't need to repeat this flow unless the client secret is rotated or the token is revoked.

Next steps

Now that the agent is connected, try prompts at increasing levels of complexity.

Querying your data: Start with a direct question, such as "Show me authentication failures from external IPs in the last hour." The agent discovers the relevant data, writes the SPL, runs the search, and interprets the results.

Investigating an issue: Ask the agent to explain what's happening in your environment, such as "Why are customers experiencing elevated checkout errors?" The agent can use the Splunk MCP Server to find the relevant data, search logs and traces, examine related infrastructure and application information, correlate time windows, and form a hypothesis.

Using data in a larger workflow: MCP is most useful when an agent can combine data from several systems in a multi-step workflow. You can describe these workflows in an agent skill so they're loaded into the Antigravity agent's context.

For example, suppose the agent has these MCP servers enabled:

  • Splunk MCP Server
  • GitHub
  • Jira or ServiceNow
  • Slack
  • Confluence
  • Google Cloud
  • An internal deployment system

With a workflow skill and these servers, the agent can reason across all of these systems with a prompt such as "Checkout latency increased after yesterday's deployment. Determine whether the deployment is likely related, identify the owning team, check whether this has happened before, summarize the evidence, and prepare an incident ticket."

The agent acts with the permissions of the authenticated user in the Splunk platform. Use a role scoped to the indexes and tools the agent actually needs and use the Splunk MCP Server administrative controls to limit which tools are exposed.

Additional resources

These resources might help you understand and implement this guidance: