Skip to main content

Cursor Integration

Cursor is an AI-first code editor. By integrating Oodle with Cursor, you can query your observability data directly from the AI assistant while coding.

Prerequisites

  • Cursor installed on your machine
  • An active Oodle instance
  • Oodle API key with appropriate permissions

Configuration

Step 1: Get Your API Key

  1. Log in to your Oodle instance
  2. Navigate to SettingsIntegrations
  3. Find the Model Context Protocol (MCP) integration card
  4. Copy your API key from the configuration

Step 2: Configure Cursor

  1. Open or create the MCP configuration file at ~/.cursor/mcp.json

  2. Add the Oodle MCP server configuration:

{
"mcpServers": {
"oodle-ai": {
"url": "https://api.oodle.ai/v1/api/instance/YOUR_INSTANCE/mcp",
"headers": {
"X-API-KEY": "YOUR_API_KEY"
}
}
}
}

Replace:

  • YOUR_INSTANCE with your Oodle instance ID
  • YOUR_API_KEY with your Oodle API key
tip

You can copy the exact configuration from the MCP integration card in your Oodle instance settings. It includes your instance ID and API key pre-filled.

Step 3: Restart Cursor

After saving the configuration file, restart Cursor for the changes to take effect.

Usage

Once configured, you can query your observability data directly in Cursor's AI assistant. Here are some example queries:

Query Logs

Show me error logs from the last hour
What are the most common error messages in the auth-service?
Find all logs containing "timeout" from yesterday

Query Metrics

What's the current CPU usage across all services?
Show me the request rate for the API service over the last 24 hours
Is there any metric that shows memory spikes?

Query Traces

Show me slow traces from the checkout service
Find traces that took longer than 5 seconds
Get the trace with ID abc123xyz

Check Alerts

Are there any active alerts right now?
Show me alerts that fired in the last 6 hours
What monitors are configured for the database service?

Query Dashboards

Show me the dashboard for the API service
What's the current value of the "Request Rate" panel?
Find all dashboards related to Kubernetes

Available Tools

The Oodle MCP server provides comprehensive observability tools across five categories:

Logs

Query and filter logs with flexible time ranges and field-based filtering. Discover available fields and run aggregations to analyze log patterns.

Metrics

Execute PromQL queries to access your metrics data. Search for metrics, explore labels, and validate queries.

Traces

Search distributed traces by service, operation, or custom tags. Retrieve specific trace details and explore available trace attributes.

Alerts

Access active alerts, view monitor configurations, and check historical trigger data to understand your alerting landscape.

Grafana

Interact with Grafana dashboards programmatically. Search, retrieve, update dashboards, and query panel data directly.

Troubleshooting

Tools not showing up in Cursor

  1. Verify the configuration file path is correct: ~/.cursor/mcp.json
  2. Check that the JSON is valid (no trailing commas, proper quotes)
  3. Ensure Cursor was fully restarted after adding the configuration
  4. Check Cursor's logs for any MCP-related errors

Authentication errors

  1. Verify your API key is correct
  2. Check that your instance ID matches your Oodle instance
  3. Ensure your API key has not expired
  4. Try regenerating your API key from the Oodle UI

Tool execution errors

  1. Verify your Oodle instance is accessible
  2. Check that you have appropriate permissions for the requested data
  3. Ensure your query parameters are valid (e.g., valid time ranges)

Connection refused

  1. Check your internet connection
  2. Verify the Oodle API endpoint URL is correct
  3. Ensure no firewall or proxy is blocking the connection

Best Practices

  1. Be specific: Provide clear context in your queries (time ranges, service names, etc.)
  2. Start broad: Begin with general queries and narrow down as needed
  3. Use natural language: The AI assistant understands context, no need for exact syntax
  4. Combine tools: Ask questions that might require multiple tools (e.g., "Show me logs and metrics for errors")
  5. Iterate: If results aren't what you expected, refine your query with more context

Security

  • API keys are stored locally in your ~/.cursor/mcp.json file
  • All communication is over HTTPS
  • API keys can be rotated from the Oodle UI at any time
  • Each API key is scoped to a specific Oodle instance

Support

If you need assistance or have any questions, please reach out to us through:

  • The help chat widget in the bottom-right corner of this page
  • Email at support@oodle.ai