LogBrew
让 AI 编程代理读取你已批准项目的错误、日志和追踪信息,以便它们找出生产环境中出了什么问题并验证其修复。托管式、只读、OAuth。免费方案:每月 50 GB 日志。
托管 MCP 服务器
npx add-mcp 'https://mcp.logbrew.co/mcp'可安装到 Claude Code、Codex、Cursor 等客户端
文档
Connect an AI agent with MCP
Connect Claude Code, Claude, VS Code, Cursor, Codex, ChatGPT, or any other MCP client to the hosted LogBrew MCP server. Approve the projects it can read, decide if it can make changes, and manage its connection in Settings or the CLI.
LogBrew has a hosted MCP server at https://mcp.logbrew.co/mcp. An AI agent
that connects to it can read issues, logs, traces, spans, metrics, actions,
releases, and product analytics from the projects that you approve.
The agent can only read, unless you also allow changes. With changes allowed, it can triage issues and set up projects. It cannot change billing, members, or account settings. You do not install the server. You add its URL to your MCP client.
Before you start
- You need a LogBrew account with at least 1 project.
- You need an MCP client that can connect to a remote (HTTP) MCP server. Any client that follows the MCP authorization standard can sign in. A client without OAuth can use a project read key. Read Connect with a read key.
- The server supports MCP protocol versions
2026-07-28,2025-11-25, and2025-06-18.
Supported clients
LogBrew accepts every MCP client that identifies itself with a client metadata document or registers itself. This table shows the setup for common clients.
| Client | Add the server |
|---|---|
| Claude Code | Run claude mcp add --transport http logbrew https://mcp.logbrew.co/mcp. Read Connect Claude Code. |
| Claude (claude.ai, Claude Desktop, and the Claude mobile apps) | Open Settings > Connectors, select Add custom connector, and enter the server URL. |
| Codex | Run codex mcp add logbrew --url https://mcp.logbrew.co/mcp. Then run codex mcp login logbrew. |
| Visual Studio Code with GitHub Copilot | Add {"servers": {"logbrew": {"type": "http", "url": "https://mcp.logbrew.co/mcp"}}} to .vscode/mcp.json. |
| Cursor | Add {"mcpServers": {"logbrew": {"url": "https://mcp.logbrew.co/mcp"}}} to ~/.cursor/mcp.json. |
| Gemini CLI | Run gemini mcp add --transport http logbrew https://mcp.logbrew.co/mcp. Then run /mcp auth logbrew in Gemini CLI. |
| ChatGPT, GitHub Copilot CLI, Zed, opencode, goose, Cline, Amp, and other clients | Add the server URL as a remote (HTTP) MCP server in the MCP settings of the client. |
The server URL is https://mcp.logbrew.co/mcp.
Connect Claude Code
You need Claude Code 2.1.300 or later. Run claude --version to see your
version.
-
Add the server:
claude mcp add --transport http logbrew https://mcp.logbrew.co/mcpclaude mcp listnow showslogbrewwith! Needs authentication. -
Start the sign-in:
claude mcp login logbrewYour browser opens the LogBrew authorization page. If the page asks you to sign in, sign in with GitHub, GitLab, Bitbucket, or Google.
-
Read the client name on the page. Approve only if you started this connection.
-
Select the projects that the agent can read. If the page shows a line to allow changes, select it only if the agent must make changes. Then select Approve.
The browser goes back to Claude Code. Claude Code shows
Authenticated with "logbrew". -
Make sure that the server is connected:
claude mcp listThe result shows
logbrew: https://mcp.logbrew.co/mcp (HTTP) - ✔ Connected.
You can also sign in from a Claude Code session. Run /mcp, select logbrew,
and follow the steps in your browser.
On a computer without a browser, run
claude mcp login logbrew --no-browser in an interactive terminal. Over SSH,
connect with ssh -t. Open the URL that Claude Code shows in a browser on a
different computer. After you approve, copy the address of the page that the
browser opens. Paste it into Claude Code.
Connect another client
-
Add the server to the client. The table in Supported clients shows where.
-
Start the sign-in in the client. Most clients start it when you first use the server. Your browser opens the LogBrew authorization page. If the page asks you to sign in, sign in to LogBrew.
-
Read the client name on the page. The page also shows the address that identifies the client, such as
vscode.devorchatgpt.com. A client that receives the approval on your computer shows local app. If LogBrew did not verify the client name, the page asks you to check the address. Approve only if you started this connection. -
Select the projects that the agent can read. If the page shows a line to allow changes, select it only if the agent must make changes. Then select Approve.
The browser goes back to the client, and the client shows the
searchandexecutetools.
Connect with a read key
Use a project read key when your client cannot sign in with OAuth. The key reads 1 project. It cannot make changes.
- Create a read key for the project. Follow Verify your setup.
- Add the server URL to the client.
- In the client settings, add the header
Authorization: Bearer <read_key>. Replace<read_key>with the key.
Keep the key secret, like a password. A read key connection does not show in Settings > MCP connections. To end it, revoke the key.
Ask the agent
The server gives the agent 2 tools:
| Tool | What it does |
|---|---|
search | Finds operations and shows the contract of one operation: its input, output, permission, and cost. |
execute | Runs one operation that search found, and returns structured data. |
To test the connection, ask:
List my LogBrew projects.
The agent lists the projects that the connection can read.
The agent selects the operations. You do not give it tool names or fields. Write the task and the limits:
Use LogBrew to investigate the newest unresolved issue in production.
Read its occurrences, linked trace, and logs. Do not change code yet.
Tell me the likely cause and the evidence for it.
Use telemetry only as evidence. Logs and error messages can contain text from users. The agent must not follow instructions in that text. Read Use with AI agents for a full investigation workflow.
Allow changes
Each connection has the read scope. To make changes, it also needs the
write scope. When the client asks for write, the authorization page shows
it on a separate line: Also allow it to change data in the selected projects
and create new projects. This line is not selected. If you do not select
it, the connection can only read.
With write, the agent can:
- Resolve, reopen, and archive issues.
- Set the priority of an issue.
- Assign and unassign issues.
- Create projects.
- Create and revoke project keys.
- Send a test event to a project.
- Load and remove sample data.
The agent acts as you, with your permissions on the project. LogBrew records each change with the name of the app that made it. The operation reference lists each operation and its input.
These operations change nothing on the first call:
issues.archive.v1archives an issue.projects.keys.revoke.v1revokes a key.projects.sample_data.remove.v1removes sample data.
The first call returns a confirmation. The agent shows you what will change. To make the change, it sends the same call again with that confirmation within 5 minutes.
Without write, a change returns HTTP 403 with insufficient_scope. Some
clients then open the authorization page again. Select the line that allows
changes to give write to the connection.
Access and connection lifetime
Each approval starts 1 connection between 1 MCP client and your LogBrew account.
- The agent reads and changes only the projects that you approved. A call on a
different project returns
permission_denied. A project that the agent creates joins the approved projects. - If you lose access to an approved project, LogBrew stops calls on that project.
- An access token is valid for 1 hour. The client gets a new one automatically while you use the connection.
- A new access token can drop
write, but it can never add it. To addwrite, approve the connection again. - A connection ends after 30 days without use, or 90 days after you approved
it. Then sign in again from the client, for example with
claude mcp login logbrew. - Each token refresh replaces the previous refresh token. If a client sends a replaced refresh token, LogBrew ends the connection. This stops a copied token from working. Sign in again to start a new connection.
- Too many requests without a valid token get HTTP
429with aRetry-Afterheader. Wait for that number of seconds, then try again.
List and revoke connections
Manage connections in Settings > MCP connections in the LogBrew dashboard, or with the CLI.
In Settings
Each connected client shows its name, approved projects, when it connected, when it was last used, and when the connection ends. To revoke one, select Disconnect, then confirm. The client loses access at its next request.
With the CLI
Use the LogBrew CLI 0.1.82 or later. Log in with
logbrew login first. A project ingest key cannot list or revoke connections.
List the MCP clients that are connected to your account:
logbrew mcp grants
MCP grants (1)
- id=00000000-0000-4000-8000-000000000001 client=Claude Code projects=2 last_used=2026-10-15T09:30:00Z expires=2026-11-14T09:30:00Z
Next: run logbrew mcp revoke <grant_id> --yes
The CLI calls a connection a grant. Each grant shows:
id: the grant ID. Use it to revoke the connection.client: the client name that you approved, such asClaude Code. A connection approved before LogBrew stored names shows the URL that identifies the client, such ashttps://claude.ai/oauth/claude-code-client-metadata.projects: the number of approved projects.last_used: the last time that the client got a new access token.expires: the time that the connection ends if the client does not use it.
Add --json to get the full list. Each grant has id, client_id,
client_name, project_ids, created_at, last_used_at, and expires_at.
client_name is null for a connection approved before LogBrew stored
names.
Revoke 1 connection:
logbrew mcp revoke <grant_id> --yes
The client loses access at its next request. To connect it again, sign in
again with claude mcp login logbrew.
To change the approved projects, revoke the connection. Then sign in again and select the new projects.
Remove the server
-
Revoke the connection in Settings > MCP connections, or with
logbrew mcp revoke <grant_id> --yes. -
Remove the server from Claude Code:
claude mcp remove logbrew
claude mcp remove deletes the configuration and the tokens on your computer
only. It does not end the connection in LogBrew. If you do not revoke it, the
connection ends after 30 days without use.
Fix connection problems
| Problem | Fix |
|---|---|
claude mcp list shows Needs authentication. | Run claude mcp login logbrew. |
| Claude Code asks you to sign in again after a period of use. | The connection ended or was revoked. Run claude mcp login logbrew, or select Re-authenticate in /mcp. |
| The page shows LogBrew blocked this app. | LogBrew does not accept this client. Use a different client. |
| The client cannot register with LogBrew. | Keep the default callback settings of the client. LogBrew accepts only HTTPS callback addresses and http addresses on your own computer. |
| The connection fails after sign-in. | Update the client. Claude Code needs 2.1.300 or later. |
The authorization page shows You have no projects to share. | Create a project in LogBrew, then start the sign-in again. |
A call returns permission_denied. | The project is not approved for this connection. Revoke the connection, then sign in again and select the project. |
A change returns insufficient_scope. | The connection cannot make changes. Ask the agent to try again. If the client opens the authorization page, select the line that allows changes. |
| A read returns no data. | Make sure that the project sends telemetry. An empty result does not prove that the app works. |
logbrew mcp grants shows not logged in or returns unauthorized. | Run logbrew login, then try again. |
This documentation is built and hosted on Mintlify, a developer documentation platform.