Skip to main content
Glama
rezo8

Datadog Logs MCP Server

by rezo8

Datadog Logs MCP Server

An MCP (Model Context Protocol) server for searching Datadog logs via HTTP.

Features

  • Search Datadog logs with customizable queries

  • Specify time ranges for log searches

  • Control result limits

  • Runs as an HTTP server on port 5000

Related MCP server: Datadog MCP Server

Prerequisites

  • Docker and Docker Compose

  • Datadog API Key

  • Datadog Application Key

Setup

  1. Copy the example environment file and add your Datadog credentials:

cp .env.example .env
  1. Edit .env and add your actual Datadog keys:

DD_API_KEY=your_actual_api_key
DD_APPLICATION_KEY=your_actual_application_key
PORT=4000

Running with Docker Compose

Start the server:

docker-compose up

The server will be available at http://localhost:5000

To run in detached mode:

docker-compose up -d

To stop the server:

docker-compose down

API Endpoints

SSE Connection

  • GET /sse - Establish SSE connection for MCP communication

Message Endpoint

  • POST /messages - Send MCP protocol messages

MCP Tool: search_logs

Search Datadog logs with the following parameters:

  • query (required): Log search query (e.g., "env:prd AND service:pms-connectors")

  • from (required): Start time (e.g., "now-10m", "2024-01-01T00:00:00Z")

  • to (required): End time (e.g., "now", "2024-01-01T01:00:00Z")

  • limit (optional): Maximum number of logs to return (default: 10)

Example Usage

The server will search Datadog logs using the API endpoint:

POST https://api.datadoghq.com/api/v2/logs/events/search

With the query parameters provided through the MCP tool invocation.

Development

To build locally without Docker:

npm install
npm run build
npm start

Environment Variables

  • DD_API_KEY: Your Datadog API key (required)

  • DD_APPLICATION_KEY: Your Datadog application key (required)

  • PORT: Server port (default: 5000)

Available Tools

3 tools
search_clickhouseC

Query Clickhouse database (currently unimplemented)

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSQL query to execute
databaseNoDatabase name (optional)
formatNoOutput format (e.g., 'JSON', 'TabSeparated')JSON

TDQS

C2.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only mentions that the tool is 'currently unimplemented', which is confusing but doesn't describe actual behavior like error handling, performance characteristics, or what happens when queries are executed. No useful behavioral context is provided.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

While brief, the description is poorly structured and confusing. The 'currently unimplemented' note undermines the tool's purpose without explanation, making it inefficient. It fails to front-load useful information about what the tool actually does.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a database query tool with 3 parameters and no annotations or output schema, the description is incomplete. It doesn't explain what the tool returns, how results are formatted, or any limitations. The 'unimplemented' note creates ambiguity rather than providing necessary context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds no additional meaning about parameters beyond what's in the schema, maintaining the baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose as 'Query Clickhouse database', which is clear but vague. It doesn't specify what kind of queries are supported or what resources are accessed. The 'currently unimplemented' note adds confusion rather than clarifying the actual functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus the sibling tools (search_cloudbeds_pms, search_logs). The description doesn't mention any prerequisites, alternatives, or specific contexts where this tool would be appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_cloudbeds_pmsC

Search Cloudbeds PMS API for reservations with rate details

ParametersJSON Schema
NameRequiredDescriptionDefault
hotelIdYesHotel ID to query (must be configured in HOTEL_REFRESH_TOKENS map)
queryParamsNoQuery parameters for the API request (e.g., reservationCheckOutFrom, reservationCheckOutTo, resultsFrom, resultsTo)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Search' implies a read operation, the description doesn't mention authentication requirements, rate limits, pagination behavior, error handling, or what 'rate details' specifically includes. For a search tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core purpose without unnecessary words. It's appropriately sized for a search tool and front-loads the essential information - every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of searching a PMS API with rate details, no annotations, no output schema, and nested query parameters, the description is insufficient. It doesn't explain what 'rate details' includes, how results are structured, whether there are limitations on date ranges or result sizes, or how to interpret the search results. The description should provide more context for effective tool use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain the format of hotelId values, provide examples of queryParams, or clarify the relationship between parameters. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Search') and target resource ('Cloudbeds PMS API for reservations with rate details'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'search_clickhouse' or 'search_logs' - all three appear to be search operations but for different data sources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus the sibling tools 'search_clickhouse' or 'search_logs'. There's no mention of use cases, prerequisites, or alternatives - it simply states what the tool does without context about when it's appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_logsC

Search Datadog logs with a query and time range

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesLog search query (e.g., 'env:prd AND service:pms-connectors')
fromYesStart time for log search (e.g., 'now-10m', '2024-01-01T00:00:00Z')
toYesEnd time for log search (e.g., 'now', '2024-01-01T01:00:00Z')
limitNoMaximum number of logs to return (default: 10)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool searches logs but lacks details on permissions, rate limits, pagination, or response format. For a search tool with no annotations, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete. It covers the basic action but lacks critical context like behavioral traits, return values, or usage guidelines. For a tool with 4 parameters and no structured support, this is inadequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with all parameters well-documented in the input schema. The description adds minimal value beyond the schema by mentioning 'query and time range', which aligns with the parameters but doesn't provide additional semantics. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Search') and resource ('Datadog logs'), specifying the scope with 'with a query and time range'. It distinguishes from sibling tools like 'search_clickhouse' and 'search_cloudbeds_pms' by explicitly mentioning Datadog, though it doesn't explicitly contrast them. This is clear but lacks explicit sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like the sibling tools. It mentions the tool's purpose but offers no context, exclusions, or prerequisites for usage, leaving the agent without direction on tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose targeting different data sources: Clickhouse database queries, Cloudbeds PMS API for reservations, and Datadog logs search. There is no overlap in functionality or ambiguity about which tool to use for each specific task.

Naming Consistency5/5

All three tools follow a consistent verb_noun pattern with 'search_' prefix followed by the target resource (clickhouse, cloudbeds_pms, logs). The naming is perfectly uniform and predictable across the entire tool set.

Tool Count3/5

With only 3 tools, the server feels somewhat thin for a 'Datadog Logs MCP Server' that also includes non-Datadog tools. While the tools are well-defined, the scope appears broader than just logs, and the count may be insufficient for comprehensive coverage of the implied domains.

Completeness2/5

For a server named 'Datadog Logs', having only one Datadog-specific tool (search_logs) with two unrelated tools creates significant gaps. The Clickhouse tool is unimplemented, and the Cloudbeds tool seems out of scope, leaving the core Datadog functionality incomplete and fragmented.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables querying log data stored in SQLite databases through the Model Context Protocol, allowing natural language interactions with log analysis.
  • A
    license
    C
    quality
    D
    maintenance
    Enables interaction with Datadog's monitoring platform to search logs, search trace spans, and perform trace span aggregation for analysis.
    3
    1,106
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables integration with Datadog APIs to monitor and retrieve information about monitors, metrics, dashboards, logs, events, and incidents through the Model Context Protocol.
    3,024
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables querying and formatting Loki logs from Grafana via the Model Context Protocol. It supports LogQL queries, label retrieval, and provides results in text, JSON, or markdown formats.
    29
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rezo8/columbo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server