Purchase trouble? store.hemrock.com

API, MCP, and Webhooks

Programmatic access to your reporting data: one endpoint reached as MCP or REST, two ways to authenticate, plus inbound webhooks and a prebuilt Affinity integration.

The platform exposes one programmatic surface over your fund's data, reachable two ways with two kinds of credential. An MCP connection is what Claude and other AI clients use. The same key also drives plain REST calls for your own scripts. Both hit the same tool registry, scoped to what the credential can reach, so nothing you can do in one is out of reach in the other.

Two ways to authenticate

Both credentials are managed in Settings → Agent access (MCP + REST API keys), and both arrive as a Bearer token on the request.

A fund API key (prefixed lk_, for "ledger key") is a static secret you generate for your own scripts, a CLI, or any headless client. Only a SHA-256 hash of the key is stored, so it is shown once at creation and never again. Treat it like a password: it carries the access of the person who made it.

An OAuth access token (prefixed mcp_at_) is what the claude.ai connector obtains on your behalf. The connector runs the standard flow (authorize, consent, token), with dynamic client registration and a revoke endpoint, and the server publishes discovery metadata at /.well-known/oauth-protected-resource and /.well-known/oauth-authorization-server. You never copy a token by hand; you approve the connector once and it manages the rest.

Whichever credential you present, it resolves to the same fund-scoped identity, so fund isolation and write authorization are identical either way.

The MCP endpoint

The canonical address is POST /api/mcp. The original path, POST /api/accounting/mcp, still works and is not deprecated, but everything new points at /api/mcp.

It is a Model Context Protocol server over Streamable HTTP in stateless JSON mode, speaking protocol version 2024-11-05. It implements initialize, tools/list, and tools/call. The tool registry spans the ledger plus the whole portfolio domain: companies, investments, LP positions, and fund performance, alongside deal and diligence tools. tools/list is filtered to what the calling credential's owner may actually reach, so an agent is never shown a tool it would be refused, and the tool list never doubles as a map of the fund's contents for someone who can't read them.

To connect from Claude, add it as a custom connector pointed at /api/mcp. A request with no valid credential returns 401 with a WWW-Authenticate header naming the protected-resource metadata, which is how an OAuth client discovers where to authenticate from a bare rejection.

The REST API

For clients that don't speak MCP, the same lk_ fund API key authenticates REST calls to the reporting API. It's the path for a cron job that posts a metric, a script that pulls a capital account, or any glue code you'd rather write against plain HTTP. Access is scoped to what the key can reach, the same registry the MCP endpoint exposes.

Webhooks

Inbound webhooks are how founder updates and mail reach the platform today. You point your email provider (Postmark or Mailgun) at the inbound endpoint, and a per-fund webhook token verifies that the traffic is yours before anything is processed. Setup lives in the deployment guide and in Settings.

Outbound event webhooks are in progress. The plan is to let you subscribe to events (an update parsed, a metric changed, a deal advanced) and push them into your own systems the moment they happen, for the automations that a scheduled REST pull doesn't cover.

Prebuilt integration: Affinity

Affinity is a prebuilt integration rather than a raw API surface. It pulls deal and relationship data from Affinity into your portfolio and diligence views, so the CRM your firm already lives in feeds the platform. It is one-way for now, Affinity into the platform, and you connect it from Settings.