Claude AI via MCP

Connect Claude (claude.ai or Claude Code) to your BunnyLogs logspace over the Model Context Protocol. Claude can post log entries, search history, and read recent logs without leaving the conversation.

How it works

BunnyLogs exposes a Streamable HTTP MCP server at https://bunnylogs.com/mcp. Once connected, Claude gets three tools:

  • post_log — write a message to your live stream
  • search_logs — full-text search across your 30-day log history
  • get_recent_logs — fetch the most recent entries

Connecting from Claude.ai

Claude.ai uses OAuth — no API key or headers needed. BunnyLogs authenticates you directly.

Step 1 — set a default logspace

Go to Settings → MCP & API Keys and pick a default MCP logspace. This is the logspace Claude will read and write when connected via Claude.ai.

Step 2 — add the connector

Personal account: In Claude.ai, open Settings → Integrations, click Add integration, choose Custom, and enter:

https://bunnylogs.com/mcp

Leave the OAuth Client ID and Client Secret fields blank. Click Add — a BunnyLogs login dialog will appear. Approve access and you're connected.

Organization account: An org admin adds the connector once: Organization settings → Connectors → + Add → Custom, enter the URL above, and save. This makes BunnyLogs available to the whole team, but each member must then activate it individually:

  1. Go to Settings → Customize → Connectors (or visit claude.ai/customize/connectors directly).
  2. Click BunnyLogs in the list and then Connect.
  3. The BunnyLogs OAuth login dialog will appear — log in and approve.

Each user also needs a default MCP logspace set in their own BunnyLogs account (Settings → MCP & API Keys) before the tools will work.


Connecting from Claude Code

Claude Code supports custom HTTP headers, so it uses an API key instead of OAuth.

Step 1 — get your credentials
  1. API key — create one at Settings → MCP & API Keys. Copy it immediately; it is shown only once.
  2. Logspace UUID — the UUID in the URL of the log stream you want Claude to write to (e.g. bunnylogs.com/live/550e8400-…).
Step 2 — add the MCP server

Add this to ~/.claude/settings.json (global) or .claude/settings.json inside a project:

{
  "mcpServers": {
    "bunnylogs": {
      "type": "streamable-http",
      "url": "https://bunnylogs.com/mcp",
      "headers": {
        "Authorization": "Bearer <your-api-key>",
        "X-BunnyLogs-UUID": "<your-logspace-uuid>"
      }
    }
  }
}

Or via the CLI:

claude mcp add --transport http bunnylogs https://bunnylogs.com/mcp \
  --header "Authorization: Bearer <your-api-key>" \
  --header "X-BunnyLogs-UUID: <your-logspace-uuid>"

Restart Claude Code (or run /mcp to reload). The three BunnyLogs tools will appear alongside your other MCP tools.


Tool reference

post_log

Write a log entry to the live stream. The entry appears in your browser in real time and is indexed for search.

ParameterDefaultDescription
messagerequiredThe log message text.
levelINFOSeverity: DEBUG, INFO, WARNING, or ERROR.
programclaudeSource label shown in the stream (e.g. deploy-bot, claude-code).
search_logs

Full-text search over up to 30 days of log history using Elasticsearch.

ParameterDefaultDescription
queryrequiredKeyword or phrase to search for.
limit20Maximum results to return (1–100).
cursornonePagination cursor returned by a previous call; omit for the first page.
get_recent_logs

Fetch the most recent entries in reverse-chronological order.

ParameterDefaultDescription
limit50Number of entries to return (1–100).

Example prompts

Once connected, you can ask Claude things like:

  • "Post a WARNING to my log: migration started on prod db."
  • "Search my logs for 'payment failed' from the last week."
  • "What are the last 20 log entries?"
  • "Log every decision you make while working on this task."
  • "Search for any ERROR-level entries mentioning 'timeout'."
Tips
  • Use the program parameter to distinguish between multiple Claude sessions or other log sources posting to the same stream.
  • The logspace UUID is the access token for the live stream — anyone with it can read in a browser without logging in. Keep it private if the content is sensitive.
  • Claude Code API keys can be revoked at any time from Settings → MCP & API Keys without affecting the logspace itself.
  • To switch which logspace Claude.ai writes to, update the default in Settings → MCP & API Keys.