# Logsblox API

Logsblox stores application logs on decentralized infrastructure. Once written, logs cannot be altered. They are kept for your plan's retention window, then references are removed.

## Hosts

| Host | Role |
| --- | --- |
| `https://logsblox.com` | Product site and machine-readable discovery |
| `https://app.logsblox.com` | Sign-in, signup, and the logged-in app |
| `https://ingest.logsblox.com` | OTLP log ingest |
| `https://mcp.logsblox.com` | Model Context Protocol server |

## Authentication

### Ingest API keys

Send logs with an API key from the project settings page.

```http
POST https://ingest.logsblox.com/
x-api-key: lbx_...
Content-Type: application/x-protobuf
```

JSON OTLP (`application/json`) is also accepted. Gzip request bodies with `Content-Encoding: gzip`.

### MCP and OAuth

The MCP server authenticates with OAuth 2.1 against the Logsblox authorization server.

- Protected resource metadata: `https://mcp.logsblox.com/.well-known/oauth-protected-resource`
- Authorization server: `https://qafegbrrdbqyvqoqrkiu.supabase.co/auth/v1`
- Dynamic client registration: `https://qafegbrrdbqyvqoqrkiu.supabase.co/auth/v1/oauth/clients/register`
- Human signup and sign-in: `https://app.logsblox.com/auth`

See `/auth.md` for agent registration.

## Ingest

The ingest endpoint accepts [OTLP/HTTP logs](https://opentelemetry.io/docs/specs/otlp/). OpenAPI: [`/openapi/ingest.json`](/openapi/ingest.json).

A successful ingest returns `202 Accepted`.

## MCP tools

Connect to `https://mcp.logsblox.com` after completing OAuth. Tools:

- `list_projects` — projects the caller can access
- `project_info` — project metadata and stored blob count
- `search_logs` — decrypted logs in a date range
- `list_recent_errors` — error-level logs from the last N hours

## Discovery

- API catalog: `/.well-known/api-catalog`
- ARD catalog: `/.well-known/ai-catalog.json`
- MCP server card: `/.well-known/mcp/server-card.json`
- Agent skills: `/.well-known/agent-skills/index.json`
