- Creating and managing datasets
- Getting guidance on setting up and running experiments
- Setting up prompt templates
- Investigating signals and applying recommended code changes
- Integrating Splunk Agent Observability with your code
Configure your IDE
Select the instructions for your deployment.- On-premises
- SaaS
Before you begin, ensure you have the following:The Splunk Agent Observability MCP server works with both Cursor and VS Code. Follow the steps below for your IDE:
2
API key
Generate your Splunk Agent Observability API key from the API keys page in the UI.
- VS Code
- Cursor
1
Install GitHub Copilot
Install the GitHub Copilot extension if you haven’t already
2
Open MCP settings
Open the Command Palette (
Ctrl + Shift + P on Windows/Linux, or Cmd + Shift + P on Mac) and search for “MCP: Open User Configuration”3
Add the Splunk Agent Observability MCP server configuration
Copy and paste the configuration below. Replace If you’re using a self-hosted Splunk Agent Observability deployment, replace the
YOUR-API-KEY with your actual Splunk Agent Observability API key and <your-splunk-ao-api-url> with your deployment’s API URL.VSCode MCP Configuration
<your-splunk-ao-api-url>/mcp/http/mcp url with your deployment URL. The format of this URL is based on your URL, replacing console with api and appending /mcp/http/mcp.4
Reload VS Code
Reload VS Code by opening the Command Palette and running “Developer: Reload Window” for the changes to take effect
Verify your setup
Once configured, you can verify your MCP setup by asking your AI assistant in your IDE:Tools
The Splunk Agent Observability MCP server provides powerful tools that you can access through natural conversation with your AI assistant. Simply ask questions or make requests, and the AI will use these tools to help you.Create Datasets
Create Datasets
Generate synthetic datasets or upload your own data to test and evaluate your AI applications. The tool supports creating datasets with various types of queries including general queries, prompt injections, off-topic content, and toxic content scenarios.What you can ask:
Check Dataset Status
Check Dataset Status
Track the progress of your dataset generation and preview the generated content. You’ll see the first 10 rows of data along with generation status and progress updates.What you can ask:
Create Prompt Templates
Create Prompt Templates
Build reusable prompt templates that you can use across all your projects. Set up model configurations, temperature settings, and other parameters for consistent prompt behavior.What you can ask:
Set Up Experiments
Set Up Experiments
Get complete guidance on setting up and running Splunk Agent Observability experiments, including dataset preparation, evaluators configuration, and integration with your existing code. Available for Python and other supported languages.What you can ask:
Remediate Signals
Remediate Signals
Investigate a signal’s recommended code change and supporting evidence from your IDE. Start with the brief generated by Fix in your codebase on the signal’s Remediate tab.Your coding agent can use the following tools:
get_code_remediation: Read the signal’s diagnosis and recommended change.get_signal_evidence: Retrieve affected occurrences and their evidence references.get_signal_evidence_context: Read nearby spans for an affected event.get_signal_evidence_span: Read a referenced span’s input and output.
Integrate with OpenAI
Integrate with OpenAI
Get step-by-step integration guides for adding Splunk Agent Observability to your OpenAI applications. Automatically log prompts, responses, model parameters, and token usage with minimal code changes.What you can ask:
Integrate with LangChain
Integrate with LangChain
Get complete integration instructions for adding Splunk Agent Observability to your LangChain applications. Capture full traces of your chains, agents, and tools with automatic logging.What you can ask:
Search Documentation
Search Documentation
Find relevant information, code examples, API references, and implementation guides across all Splunk Agent Observability documentation. Get direct links to the pages you need.What you can ask:
Example use cases
Create a synthetic dataset
Ask your AI assistant:Get integration help
Ask your AI assistant:Remediate a signal in your codebase
- Open a signal in your Agent Stream and select the Remediate tab.
- For a recommendation that supports code changes, select Fix in your codebase.
- Select Open in Codex, Open in Cursor, or Copy prompt to provide the brief to your coding agent.
- Connect your coding agent to the MCP server for the deployment that hosts the signal.
Troubleshooting
Error connecting to Splunk Agent Observability MCP Server
Error connecting to Splunk Agent Observability MCP Server
- For on-premises deployments, check that the MCP server URL is set to
<your-splunk-ao-api-url>/mcp/http/mcp. - For SaaS, check that the MCP Gateway URL uses the region for your Splunk Observability Cloud realm and ends with
/system/mcp-gateway/v1/. - Ensure the
Acceptheader is set toapplication/json, text/event-stream - Restart your IDE MCP connection after making configuration changes
On-premises API key errors
On-premises API key errors
- Confirm your API key is properly set in the configuration
- Check that your API key has not expired
- Generate a new API key from the API keys page in the UI
SaaS authentication errors
SaaS authentication errors
- Confirm that
X-SF-REALMmatches your Splunk Observability Cloud realm. - Confirm that
X-SF-TOKENcontains a valid user API access token for that realm. - If the token has expired, retrieve a new token and update your configuration.
Next steps
Log your first trace
Learn how to log your first trace with Splunk Agent Observability
Run your first experiment
Set up and run experiments to evaluate your AI applications
Explore integrations
Learn about Splunk Agent Observability integrations with third-party frameworks