Skip to main content
The Model Context Protocol (MCP) is a standardized framework that enables AI models to interact with external data sources and tools. It allows for real-time access to your Keywords AI logs, traces, prompts, and customer data directly from your coding environment.

Getting started

Keywords AI provides an MCP server that gives your AI tools direct access to your observability data. The server supports both HTTP streamable (for hosted deployments) and stdio (for local use).

Installation


Authentication

Get your Keywords AI API key from platform.keywordsai.co.

Enterprise configuration

For enterprise users with a custom API endpoint (e.g., endpoint.keywordsai.co), you can override the default API base URL.
Add the keywords-api-base-url header:
Supported endpoints:

Available tools

Once connected, your AI tools have access to the following Keywords AI features.

Logs

Example queries:
  • “Show me the most expensive requests from the last hour”
  • “Find all failed requests for customer user_123”
  • “List logs where latency > 5 seconds”

Traces

Example queries:
  • “Show me traces with errors in production”
  • “Get the span tree for trace xyz123”
  • “Find traces that cost more than $0.10”

Customers

Example queries:
  • “Who are my top 10 customers by cost?”
  • “Show customer budget usage for user_abc”
  • “List customers sorted by number of requests”

Prompts

Example queries:
  • “Show me all my prompts”
  • “Get the latest version of my customer-support prompt”
  • “What are the different versions of prompt xyz?”

Troubleshooting

  1. Verify your config file path is correct
  2. Check JSON syntax (use a JSON validator)
  3. Restart your AI tool completely (not just reload)
  4. For stdio mode: ensure npm run build completed successfully
  1. Verify your API key is correct
  2. For HTTP mode: ensure header is Authorization: Bearer YOUR_KEY (not just the key)
  3. For stdio mode: check the KEYWORDS_API_KEY env var is set correctly
  1. Check your internet connection
  2. For enterprise: verify KEYWORDS_API_BASE_URL is correct
  3. For private HTTP: ensure Vercel deployment is active

Source code

The Keywords AI MCP server is open source:

GitHub Repository

View source code, report issues, and contribute