# onlylogs.io > onlylogs.io is a log management service for developers. It collects, displays, and searches application logs in real time via a simple HTTP log drain, and lets AI agents search those logs through an MCP server. Each project exposes a unique `ONLYLOGS_DRAIN_URL` that accepts newline-delimited plain-text logs over HTTPS POST. ## Overview - [Homepage](/index.md): Product overview, feature list, and contact details for requesting access. - [Integration instructions](/instructions.md): End-to-end guide for streaming logs. Starts with a two-minute `curl` test and a table of which method fits which platform, then covers native drains (Heroku, Clever Cloud), Vector recipes (Dokku, Kamal, Fly.io, Kubernetes, Docker Compose, Coolify, Dokploy, a plain VPS with systemd), the Ruby `onlylogs` gem, direct HTTP from Node.js, Python and other languages, the recommended log format, organising projects, importing existing logs, capacity, troubleshooting, how to connect an MCP client, and how an agent sets up a project on its own. - [Roles and permissions](/roles.md): Who can do what in a team (owner, admins, members, guests), and how ownership and paying the bills work. - [Terms of use](/terms.md): The price per GB, how bills work, how to stop, and what Renuo AG can and cannot promise. - [Privacy policy](/privacy.md): What data onlylogs.io stores, where (Switzerland), which other services are involved, and how long it is kept. - [Imprint](/imprint.md): Who runs onlylogs.io (Renuo AG) and how to reach them. ## Key concepts - A **log drain** is an HTTPS endpoint that receives newline-delimited plain-text log lines via POST. - Each onlylogs.io project has a unique `ONLYLOGS_DRAIN_URL` used as the drain destination. The URL is the secret: no headers or tokens are required. - The backend accepts any plain-text lines, but a recommended format is `[ISO8601_TIMESTAMP] [SEVERITY_LETTER] MESSAGE`. UTC ISO 8601 timestamps let the MCP tools bisect large files quickly. - Log shipping works with anything that can POST: Heroku and Clever Cloud drains, Dokku's Vector plugin, a Vector accessory, sidecar, DaemonSet or container on Kamal, Fly.io, Kubernetes, Docker Compose or a VPS, the Ruby [onlylogs](https://github.com/renuo/onlylogs) gem (`HttpLogger` or `SocketLogger`), or a small buffered HTTP client in any language. - Platforms without an arbitrary HTTPS drain (deploio, Railway, Render, Scalingo, DigitalOcean App Platform) ship either from inside the process with the gem or through a Vector sidecar. - Use one project per environment; team access is granted per project. - Logs are hosted and owned in Switzerland, on Swiss servers operated by a Swiss company. - Retention: up to 365 days of logs per project. ## Drain endpoint - `POST ` with a plain-text body. Lines are stored verbatim; a trailing newline is appended when missing. Nothing is parsed or reformatted. - One request can carry one line or thousands, separated by newlines. Existing log files can be imported the same way. - `Content-Encoding: gzip` is accepted. - Responses: `200` stored, `403` the project is paused, `404` unknown drain code. - Each project holds one live file, `drain.log`, rotated at 10 GB into `drain.log.1`, `drain.log.2`, `drain.log.3` (older rotations are discarded). Rotation is checked once a day. Files can be downloaded or deleted from the project page. - Delivery from the gem is at-least-once: a batch whose response was lost is sent again. ## MCP server - Endpoint: `https://onlylogs.io/mcp` (Streamable HTTP, POST only). - Connect from Claude Code: `claude mcp add --transport http onlylogs https://onlylogs.io/mcp`. - Reading tools: `list_projects` (projects, status, files and the period each covers), `sample_logs` (raw lines at evenly spaced points across a project's files, to learn their format before writing a query), `search_logs` (lines matching a text or a regular expression inside a byte window of one file, with optional context lines or captures). - Setup tools: `create_project` creates a project in the user's Personal team or another team they own or are an admin of (name, optional team and retention of 30, 60, 90, 180 or 365 days) and returns its drain URL, syslog endpoint and status; `drain_status` returns the same for an existing project, with `lines_received` and `ready`, true once 200 lines arrived, which is enough for `sample_logs` and the rule tools; a guest gets the status but neither the drain URL nor the syslog endpoint. An agent creates the project, ships the logs with one of the methods of the integration instructions, then calls `drain_status` about once a minute until `ready`. - Measurement rules: `preview_rule` tests a regular expression whose groups are named as dimensions and one measure with a unit, over a stretch of a file; a second pattern and a key group join the two lines of a Rails request. `create_rule` saves it for a project, `list_rules` and `delete_rule` manage them, `query_measurements` reads the hourly totals back (count, sum, mean, min, max, p50, p95 per group, over a named period or a `from`/`to` range). Rules run on ripgrep (Rust regex syntax, the engine behind `search_logs`), measure the lines logged after they were created (`backfill_rule` adds the past days, up to the project's retention, as a background job with progress in `list_rules`), keep at most 200 combinations of dimension values per hour (the rest in an `other` row), and follow the project's retention. A scan is the one-off counterpart of a rule: `start_scan` runs a pattern once over up to 30 past days in a background job without saving a rule, and `get_scan` returns its progress and, when done, the totals, each combination of dimensions and each day; the result is kept for 7 days. Guests read rules and scans but cannot create, delete or start them. - Rate limits per client: 120 requests and 60 tool calls per minute, 900 tool calls per hour. ## Contact - Sign up: https://onlylogs.io/sign_up/new (you are signed in right away; confirm your email address within 7 days to keep signing in at https://onlylogs.io/session/new) - Questions: onlylogs@renuo.ch