Documentation forLoggly

Configure an AI client to use the Loggly MCP server

After the Loggly Model Context Protocol (MCP) server is running, configure your AI client to connect to it. See Set up the MCP server using Docker for setup instructions.

Every AI client needs the same Loggly settings: the MCP server name and the MCP server URL. Menus, commands, and configuration file locations vary between clients and client versions, so review the documentation for your AI client if the steps do not match what you see.

Replace http://localhost:8000/mcp with the URL of your MCP server if you are connecting to a remote deployment.

Claude Code

  1. Create a new folder for connecting Claude Code to the Loggly MCP server.

  2. Configure your MCP server using one of the following methods. If the first method does not work, try the second.

    • Method 1: Run the following command:

      claude mcp add --transport http loggly-mcp-server http://localhost:8000/mcp --scope project
    • Method 2: Create .mcp.json in your project folder with the following content:

      {
        "mcpServers": {
          "loggly-mcp-server": {
            "type": "http",
            "url": "http://localhost:8000/mcp"
          }
        }
      }
  3. Start Claude Code and approve the connection request for the new MCP server.

  4. Open the MCP servers list to verify that the Loggly MCP server is shown as connected. This is typically done by entering the /mcp command.

    For detailed instructions and troubleshooting steps, see Connect to MCP servers in the Claude Code documentation.

To get started, see Search Loggly logs with your AI client.

GitHub Copilot in Visual Studio Code

Before you begin, make sure you have a version of Visual Studio Code that supports MCP servers, the GitHub Copilot extension installed and signed in, and MCP features enabled, if your version of Visual Studio Code requires it.

  1. Create a new folder for connecting GitHub Copilot in Visual Studio Code to the Loggly MCP server, and then open the folder in Visual Studio Code.

  2. In the folder, create .vscode/mcp.json with the following content:

    {
      "servers": {
        "loggly-mcp-server": {
          "type": "http",
          "url": "http://localhost:8000/mcp"
        }
      }
    }
  3. Reload Visual Studio Code to apply the new configuration.

  4. Start the Loggly MCP server. This is typically done from the MCP servers list in the Visual Studio Code command palette.

    For detailed instructions and troubleshooting steps, see Add MCP servers in VS Code in the Visual Studio Code documentation.

  5. Open Copilot Chat.

To get started, see Search Loggly logs with your AI client.

Cursor

  1. Create a new folder for connecting Cursor to the Loggly MCP server.

  2. In the folder, create .cursor/mcp.json with the following content:

    {
      "mcpServers": {
        "loggly-mcp-server": {
          "type": "http",
          "url": "http://localhost:8000/mcp"
        }
      }
    }
  3. Run the following commands to add and enable the MCP server:

    cursor agent mcp enable loggly-mcp-server
    cursor agent mcp list
    cursor agent mcp list-tools loggly-mcp-server

    The last command lists the tools available for loggly-mcp-server.

  4. Open Cursor and start a chat.

  5. Open the MCP servers list to verify that the Loggly MCP server is shown as connected. This is typically done by entering the /mcp command.

    For detailed instructions and troubleshooting steps, see Model Context Protocol (MCP) in the Cursor documentation.

To get started, see Search Loggly logs with your AI client.

Search Loggly logs with your AI client

After you connect your AI client, use natural-language prompts to query and analyze your Loggly logs. Start with simple prompts to verify the connection, and then use more specific queries to investigate your logs.

Basic search examples

  • Show me today's logs.

  • Show me recent errors.

  • Show me the 10 latest warnings.

  • What fields are available?

Service and error investigation examples

  • Show me errors from the auth service in the last 3 hours.

  • Are there any database connection errors in the last week?

  • What are the Syslog errors from web-01.example.com?

  • What are the errors related to the com.example.PaymentService class?

Performance analysis examples

  • Which requests took more than 2 seconds in the last week?

  • Show me all logs from API Gateway for today.