Developers & agents

Build on Meso

Meso is a periodized strength-training program that designs and rebuilds block-periodized programs from a user's goals, equipment, injury history, and recovery. This page is the entry point for developers and AI agents: the API description, the MCP server, authentication, and a sandbox.

API status: in development — not yet publicly available

The Meso web app is available now. This HTTP API and its OAuth server are still being built; the machine-readable descriptions below are published now and are the authoritative source for the surface. Public read-only operations (pricing, methodology) need no authentication; member-scoped operations use an OAuth 2.1 bearer token.

Machine-readable descriptions

OpenAPI 3.1

Every endpoint, typed parameters, response and error schemas, and OAuth scopes.

/openapi.json

MCP server (live)

Streamable-HTTP MCP at /mcp (docs: /docs/mcp). Card & tools an agent can call natively in Claude or ChatGPT. Listed on Smithery.

/.well-known/mcp/server-card.json

A2A agent card

Agent-to-agent capability card for the homepage's public tools.

/.well-known/agent-card.json

Agent skills index

Capability index (Agent Skills v0.2.0) with a when-to-use guide.

/.well-known/agent-skills/index.json

Resource discovery (ARD)

Agentic Resource Discovery catalog of every agent-facing resource.

/.well-known/ard.json

API catalog (RFC 9727)

Linkset pointing at the OpenAPI spec, docs, and auth metadata.

/.well-known/api-catalog

Authentication

Meso uses OAuth 2.1 (authorization code + PKCE) with dynamic client registration, and supports the emerging agent-auth discovery flow. Start at the auth walkthrough and follow the links to the authorization-server and protected-resource metadata:

Scopes: program:read, program:write, logs:write, profile:read. On a missing or invalid token, protected endpoints return 401 with WWW-Authenticate: Bearer resource_metadata="…/.well-known/oauth-protected-resource".

Quickstart

Read pricing — a public endpoint, no auth:

curl https://api.meso.fitness/v1/pricing

Read the authenticated member's current program:

curl https://api.meso.fitness/v1/program \
  -H "Authorization: Bearer $MESO_TOKEN"

Log a set:

curl -X POST https://api.meso.fitness/v1/sets \
  -H "Authorization: Bearer $MESO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"exerciseId":"ex_squat","weight":100,"reps":5,"rpe":8}'

Sandbox & self-serve access

A sandbox host — https://sandbox.api.meso.fitness — mirrors the API against seeded test data so agents can exercise every operation without touching a real member's program. There is no "contact sales" gate: three free program generations (no time limit) and self-serve OAuth client registration via the registration_endpoint in the authorization-server metadata mean an agent can onboard end to end on its own.

Errors

All errors are JSON with a stable machine-readable error.code plus a message and a resolution hint:

{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid bearer token.",
    "hint": "Obtain a token via the OAuth flow described at /auth.md.",
    "docs": "https://meso.fitness/auth.md"
  }
}

Endpoints

OperationMethod & pathAuth
getPricingGET /v1/pricingnone
getMethodologyGET /v1/methodologynone
getProgramGET /v1/programprogram:read
regenerateProgramPOST /v1/program/regenerate → 202 + jobprogram:write
getJobGET /v1/jobs/{jobId}program:read
swapExercisePOST /v1/exercises/swapprogram:write
setEquipmentModePUT /v1/equipment-modeprogram:write
listSetsGET /v1/sets (cursor paginated)program:read
logSetPOST /v1/setslogs:write
batchLogSetsPOST /v1/sets/batchlogs:write

Conventions for agents

Versioning & deprecation

The API is versioned in the URL path (/v1/…); breaking changes ship under a new version (/v2). When an operation or version is deprecated, responses carry Deprecation: true and a Sunset: <date> header (RFC 8594) with the earliest removal date, announced here at least 6 months in advance. Non-breaking additions can happen within a version without notice.

Scoped context for agents

Fetch just the slice you need instead of the whole manual: