Developer platform
Build one app. It works on every pod.
Each person signs in to your app with their own pod and picks the spaces it sees. Their data stays in their pod. You read and write it with @synap-core/sdk.
Sign people in with their own pod.
Your app is a client of each person's pod. They type their pod's address, see what you ask for and why, and choose the spaces. They can take it back any time.
- Install the SDK.
npm install @synap-core/sdk - Say what you need. Each request names a permission and the reason the pod’s consent screen shows.
- Mount four routes. Your client metadata, connect, callback and disconnect. They are Web-standard handlers: Next.js, Hono, Remix, edge runtimes.
- Add a connect form. It posts the person’s pod address to your connect route.
// lib/synap.ts (server only)
import { createPodAppAuth } from "@synap-core/sdk/connect";
export const synap = createPodAppAuth({
appUrl: "https://notes.example.com",
clientName: "Notes",
requests: [
{ permission: "entity.note.read", reason: "Show your notes" },
{ permission: "entity.note.create", reason: "Save new notes to your pod" },
],
secret: process.env.SYNAP_APP_SESSION_SECRET!, // 32+ characters
});
// app/.well-known/synap-client.json/route.ts
export const GET = synap.handlers.clientMetadata;
// app/api/synap/connect/route.ts (a form posts "pod": their address)
export const POST = synap.handlers.connect;
// app/api/synap/callback/route.ts
export const GET = synap.handlers.callback;
// app/api/synap/disconnect/route.ts
export const POST = synap.handlers.disconnect;Read and write their pod.
Once connected, synap.client(connection) works on the spaces the person granted, and nothing else.
- Writes can wait for review. Your app acts as an agent, so a write may come back as
proposed. That is success: show the review link and never retry. - Calls are budgeted. By default a pod allows 3,000 reads and 500 writes per 15 minutes; its owner can change both. Over the budget, a call answers
rate_limitedwith the wait in seconds. - The token stays on your server. It is sealed in an HttpOnly cookie; the browser never sees it.
- Use the person’s tools.
pod.actions.requestasks their pod to run one of their tools. Anything that leaves the pod (a post, a message, an invitation) waits for their yes. - Develop without a pod. On localhost, sign in to the mock pod from
@synap-core/sdk/testing. Real pods accept apps on https only: use a tunnel.
// a server component or route handler
const connection = await synap.readConnection(
(await headers()).get("cookie"),
);
if (!connection) redirect("/connect");
const pod = synap.client(connection);
const [space] = pod.spaces(); // the spaces the person picked
const notes = await pod.listEntities({
workspaceId: space.workspaceId,
profileSlug: "note",
});
const res = await pod.post("/entities", {
profileSlug: "note",
workspaceId: space.workspaceId,
title: "Hello from Notes",
});
if (res.ok && res.status === "proposed") {
// Waiting for the person's review: show res.reviewUrl.
}
if (!res.ok) res.error.code; // expired, forbidden, rate_limited, …One package, four entries.
Import only what your code needs from @synap-core/sdk.
@synap-core/sdk/connect
Sign a person in with their own pod, then read and write it from your server. OAuth 2.1 with PKCE; the token stays sealed in an HttpOnly cookie.
@synap-core/sdk
createSynapClient: the pod's tRPC API, typed end to end, for a signed-in session (a browser cookie or a session token). Also status and lifecycle: where a thing stands, and how to move it.
@synap-core/sdk/public
createPublicClient: shares, forms, published sites and charts. It sends no credentials, so it is safe in a public site.
@synap-core/sdk/testing
A mock pod for tests and local work: sign-in, consent, Hub reads and writes, public doors. No network.
Scripts and servers: API keys.
A script, a CLI or a server working on your own pod uses an API key with @synap-core/hub-rest-client, against the pod's /api/hub/* routes.
- Create an API key on your pod and choose its scopes.
- Install the client. TypeScript, no runtime dependencies.
npm install @synap-core/hub-rest-client - Call the Hub. Search, create, update. Keys are not accepted by createSynapClient.
import { HubRestClient } from "@synap-core/hub-rest-client";
const hub = new HubRestClient({
podUrl: "https://your-pod.synap.live",
apiKey: process.env.SYNAP_HUB_API_KEY!, // synap_hub_… or synap_user_…
workspaceId: "ws_…",
});
const notes = await hub.searchEntities("apollo proposal", {
profileSlug: "note",
limit: 20,
});
await hub.createEntity({ profileSlug: "task", title: "Write the brief" });Granular scopes.
An API key holds only the scopes you choose. Read does not imply write. The scopes a key can carry:
- read:entities
- write:entities
- hub-protocol.read
- hub-protocol.write
- mcp.read
- mcp.write
- skills.invoke
- chat.stream
- realtime:observe
Connect the agent you already use.
The Synap CLI writes the MCP config for your client and signs it in to your pod. Web clients like claude.ai and ChatGPT use the Synap Cloud connector instead.
Set up in one line: it signs you in, finds or starts your pod and connects the agents on this computer.
npx @synap-core/cli initConnect another agent later:
synap connect claude-codeOr paste the Cloud connector URL into a web client:
https://mcp.synap.liveIn the docs: MCP · CLI reference · MCP tools
More to build on.
Cells
UI code that renders your records in the Synap apps: a card for one kind, a chart, a board. A cell runs in a sandboxed frame and reads and writes your pod through the app. Publish one to the Marketplace with synap market publish.
Packages
Workspace, capability and Card packages install into any Pod. A workspace package carries its entity profiles, views and automations. Publish yours to the Marketplace.