The APIs
Every pcx host, the cloud or your own daemon, answers the same three APIs with the same key. Pick the one your client speaks.
| API | For | Where |
|---|---|---|
| MCP | agents and editors | <url>/mcp, streamable HTTP |
| gRPC | typed clients, the app, modules | the daemon’s gRPC port, or gRPC-Web on <url> |
| REST | scripts, hooks, simple clients | <url>/api/... |
<url> is https://api.pcx.is for the cloud, http://127.0.0.1:3737 for a local daemon. All three take Authorization: Bearer <key>: a cloud API key, or the daemon’s auth_token.
The tools of the memory and of every module the host runs, in one list. Agents call them as tools; skills are offered as MCP prompts. Every tool and its arguments: the tools reference.
curl -X POST https://api.pcx.is/mcp \ -H "Authorization: Bearer $PCX_KEY" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"my-script","version":"1"}}}'claude mcp add --transport http post-cortex https://api.pcx.is/mcp \ --header "Authorization: Bearer $PCX_KEY"Send X-PCX-Author: <name> to sign what the connection writes.
The typed protocol, in protobuf:
| Service | What it serves |
|---|---|
pcx.v1 |
the memory: sessions, workspaces, records, search, cards, export and import |
pcx.views.v1 |
the graph views: entity, impact, lineage, topics, radar, file |
pcx.agent.v1 |
the agent’s turns, streamed |
pcx.module.v1 |
the module protocol, and a generic Invoke that reaches any module’s tool |
A daemon serves gRPC on its grpc_port. Browsers reach the same services as gRPC-Web, when the daemon lists their origin in browser_origins.
A plain HTTP surface for scripts and hooks. Every route: the REST reference.
curl -X POST https://api.pcx.is/api/search \ -H "Authorization: Bearer $PCX_KEY" -H "Content-Type: application/json" \ -d '{"query": "why did we pick Stripe Payment Intents?", "scope": "workspace", "id": "<workspace id>"}'