---
title: "Local endpoints"
description: "What the app serves on loopback: the MCP endpoint and a health probe."
source: "https://getloggerhead.com/docs/reference/http-api/"
---

# Local endpoints

> What the app serves on loopback: the MCP endpoint and a health probe.

Loggerhead is one native Swift app. The database, the OTLP receiver, the engines, and the MCP server all run inside
it, so the app reads its own data through function calls, not through a web API.

Two endpoints stay open on `127.0.0.1` for other programs.

| Method and path | Purpose |
| --- | --- |
| `POST /mcp` | The MCP endpoint, over Streamable HTTP. Your AI coding tool talks to this. |
| `GET /api/health` | A liveness probe. It answers `{"healthy":true}`. |

## Workspace and environment

The app reads one environment at a time. `POST /mcp` takes two optional query items, `?workspace=&environment=`,
that scope every tool of that request to the pair they name. Omitted, they mean the pair the app shows. A tool
argument with the same name wins over the query item. See
[Tools reference](/docs/mcp-server/tools-reference/).

## The port

The app picks a free port on each launch and writes it to a file next to its database. The bundled
`loggerhead-mcp` bridge reads that file, so you never set a port by hand. See
[MCP server setup](/docs/mcp-server/setup/).

## Read your telemetry from a script

Use the MCP server. It is the supported way to read logs, metrics, traces, and linting findings from outside the app,
and every MCP client already speaks it. The tools and their parameters are in the
[Tools reference](/docs/mcp-server/tools-reference/).

:::note[The REST API is gone]
Earlier versions ran a separate Go engine that served `/api/logs`, `/api/collectors`, `/api/settings`, and
Server-Sent Event streams. The native Swift app replaced that engine, and those paths no longer exist. Move a script
that used them onto the MCP tools.
:::

## The OTLP receiver

Telemetry arrives on the OTLP ports, not on these endpoints. The receiver prefers 4317 for gRPC and 4318 for HTTP,
and moves along a ladder when a port is busy. The Collectors page shows the port in use. See
[Ports and the effective port](/docs/getting-started/ports-and-the-effective-port/).
