Rekamedika API
Developer documentation for the Rekamedika SIMRS API and MCP server.
Welcome to the Rekamedika developer documentation. Everything here is generated from the running source code — the tRPC routers, the SATUSEHAT proxy, the authentication endpoints, and the MCP tool registry — so what you read is what the API actually serves.
Services
| Host | What it serves |
|---|---|
api.rekamedika.com | tRPC API (/trpc/*), SATUSEHAT proxy (/satusehat/*), authentication (/api/auth/*), MCP endpoint (/mcp) |
mcp.rekamedika.com | Remote MCP server for AI agents (Streamable HTTP + OAuth) |
Start here
Authentication
Passwordless sign-in for people, OAuth 2.0 / OIDC for integrations and agents.
Calling the tRPC API
The HTTP wire format for all 40+ domain routers, with the response envelope.
Multi-tenancy & access control
Tenant isolation, simrs:read / simrs:write scopes, and RBAC.
MCP server
Connect an AI agent: OAuth flow, tool registry, per-tenant scoping.
API Reference
Every endpoint with an interactive playground, generated from the running source.
Multi-tenant model
Every request is scoped to your tenant. Identity comes from a verified
credential only — a better-auth session cookie (browsers) or an OAuth Bearer
token (agents / integrations). The tenant is read from the authenticated
user's row on the server. OAuth Bearer callers are always pinned to their
user's tenant; the single exception is a superadmin session, which may
select a tenant explicitly via the x-tenant-code header (platform
operations).
Generated docs, zero drift
The API Reference pages, the OpenAPI documents behind them, and the MCP tool
list are regenerated from source with bun run gen:api — regeneration is
idempotent, and an endpoint added to the code shows up here after the next
run.
Is this page helpful?