MCP server
The Scout Trails MCP server lets an AI assistant such as Claude Code, Codex CLI or Cursor query your organization’s agent telemetry directly. Once it is connected, you can ask questions in plain language, such as “which sessions yesterday hit errors?” or “what did my agents spend on models this week?”, and the assistant calls Scout Trails tools to answer them. The server is read-only and exposes the same data as the query API: sessions, tool calls, model cost, risk flags and external domains.
Endpoint
https://mcp.scoutmonitoring.io/mcp
| Property | Value |
|---|---|
| Transport | Streamable HTTP (MCP’s remote transport). Requests are JSON-RPC POSTs to /mcp. |
| Sessions | Stateless. The server issues no session id, and each request stands alone. |
| Authentication | Authorization: Bearer <api-key> on every request. OAuth is not used. |
| Capabilities | Tools only. The server offers no resources or prompts. |
| Request size | At most 1 MiB per request. |
Authentication
The MCP server accepts the same organization API keys as the query API. Create one under Manage > API keys in the dashboard; see API keys. An actor’s ingest key does not work here.
The key gives the assistant read access to all of your organization’s telemetry, the same as an API key used with the API. Anyone who can use the assistant’s configuration can read that data, so keep the key in an environment variable rather than in a file you commit.
A request without a usable key is rejected with HTTP 401 and a JSON-RPC error body:
{"jsonrpc":"2.0","id":null,"error":{"code":-32600,"message":"unknown bearer key"}}
message | Cause |
|---|---|
missing authorization header | No Authorization header was sent. |
authorization header must use Bearer scheme | The header does not start with Bearer (case-sensitive, one space). |
authorization Bearer value is empty | Nothing follows Bearer . |
unknown bearer key | The key does not exist or has been revoked. Ingest keys also get this message. |
keystore unavailable | Returned with HTTP 503: the key could not be checked at that moment. Retry. |
Most clients show these as a failed connection or an authentication error for the server.
What the assistant can do
The server offers twelve tools. Every tool reads only your organization’s data.
| Tool | Answers |
|---|---|
list_sessions, get_session | Which sessions ran, and everything that happened in one |
list_tool_calls, get_tool_call | Individual tool calls, filtered by session, actor, tool, category or outcome, with full arguments |
activity | Tool calls, model calls and cost over time |
top_tools | The most-used tools, how often they ran and succeeded |
outlier_sessions | Sessions with unusually many tool calls or unusually high cost |
cost_summary | Model cost and tokens by model, agent or session |
risk_feed | Risk flags such as detected credentials or destructive commands |
external_domains | External hosts referenced in your agents’ tool calls |
ping, whoami | Connection checks |
See Tools for every tool’s inputs and output.
MCP server or API
Both read the same data with the same key. The MCP server suits questions asked through an assistant; the API suits scripts and dashboards. They differ in a few places:
- MCP tools take free-form time windows such as
6hor14d, up to 90 days, and finer buckets down to one minute. The API’s insight endpoints take7d,30dor90d. - MCP results include model calls inside
get_sessionand per-severity risk counts, which the API does not. - The API offers filter values (facets), the per-session
domainfilter and page sizes up to 500. MCP list tools return up to 200 rows per call.