Loggly MCP server
The Loggly Model Context Protocol (MCP) server provides access to Loggly logs through AI-assisted developer tools using natural-language prompts. Instead of writing Loggly queries or working directly in the Loggly interface, ask your AI assistant questions about your logs. The MCP server sends the request to Loggly, retrieves the relevant log data, and returns structured results that the AI assistant can interpret and analyze.
The MCP server can be hosted locally in your own environment. After you configure and connect the MCP server to an AI client, use natural-language prompts to perform tasks such as:
-
Show the last 20 errors from the payments service.
-
Find errors that occurred during the past hour.
-
Show all log events for a specific request ID.
-
Identify the most common values for a log field.
-
Search logs for a specific term, such as timeout.
-
Calculate statistics for a numeric log field.
The MCP server provides read-only access to Loggly. It does not modify or delete log data.
Prerequisites
Before you set up the Loggly MCP server, make sure you have:
-
A Loggly account and a valid Loggly API token with Read access.
-
Your Loggly product domain or subdomain.
-
Docker, installed and running. For installation instructions and system requirements, see Get Docker.
-
An MCP-compatible AI client, such as Claude Code, GitHub Copilot, or Cursor. Review the documentation for your AI client to confirm that it supports remote (HTTP) MCP servers and to find any version or plan requirements.
Set up the MCP server
Run the MCP server locally using Docker for an isolated, containerized deployment. See Set up the MCP server using Docker for more information on configuring MCP.
Configure your MCP client
When the server runs locally, the MCP endpoint is http://localhost:8000/mcp.
Your client's MCP configuration must point to this URL, or to the URL of your remote deployment. The name and location of the configuration file, and the commands used to add and start a server, vary between AI clients.
See Configure an AI client to use the Loggly MCP server for the Loggly settings required by commonly used clients, and review the documentation for your AI client for client-specific instructions.
Verify the connection
After you configure the client and start the MCP server, send an MCP request to confirm that the connection works. For example:
-
Show me the last 10 log events from my Loggly account.
-
Are there any errors in the logs from the past hour?
-
Search my logs for the term timeout.
A successful response confirms that:
-
The MCP client can reach the server.
-
The MCP server can authenticate with Loggly.
-
The request was sent to Loggly.
-
Loggly returned results.
-
The MCP server returned the results to the AI client.
If the connection fails, verify the following:
-
The MCP server is running and reachable at
http://localhost:8000/mcp. -
SERVER_TOKENcontains a valid Loggly API token with Read access. -
PRODUCT_DOMAINcontains the correct Loggly product domain. -
Your MCP client configuration points to the correct server URL.
-
You started a new terminal or application after setting the environment variables.
If the Loggly MCP server is running and reachable but your AI client does not list it, review the MCP troubleshooting information in the documentation for your AI client.
Safety guardrails
The MCP server applies limits at the server level to prevent excessive queries, unpredictable token usage, and unnecessary load.
| Constraint | Limit |
|---|---|
Maximum events per search_logs request |
200 |
| Maximum query time range | 7 days |
| Maximum error groups | 25 |
Maximum get_field_values result |
50 |
| Pagination cursor lifetime | 10 minutes |
| Request timeout | 30 seconds |
When a request exceeds a limit, the server returns a structured error and, where appropriate, suggests how to narrow the request.