Musterwise
Tanyakan siapa yang berada di lokasi, periksa daftar hadir dan induksi, serta daftarkan pengunjung di lokasi Anda. Endpoint MCP jarak jauh: https://musterwise.com/mcp
Server MCP Terhosting
npx add-mcp 'https://musterwise.com/mcp'Terpasang ke Claude Code, Codex, Cursor, dan lainnya
Dokumentasi
REST API, webhooks and an MCP server
Read who is on site, add people, invite visitors, check people in and out, run roll calls and download reports from your own systems. Have events pushed to you as signed webhooks, or connect an AI assistant through the MCP server.
The REST API is included in Starter and above. Webhooks and the MCP server are included in Business and above. Every account starts on the Free plan.
Get an API key
- Sign up free and add your first site.
- Upgrade the organisation: Starter for the REST API, Business for webhooks and the MCP server. The organisation owner does this in Settings → Billing.
- An owner or admin opens Settings → Developers, names the key, ticks the scopes it needs and selects Create key.
- Copy the key straight away: it is shown only once, and only a hash of it is stored. You can revoke a key in the same place at any time; anything using it stops working at once.
On the Free plan, Settings → Developers shows an upgrade notice instead, and the API refuses to create keys with 402.
Base URL and authentication
Every REST endpoint is under /v1 on the same domain as the app. Send the API key as a Bearer token in the Authorization header. A key acts for one organisation, with only the scopes ticked when it was created.
| Item | Value |
|---|---|
| Base URL | https://musterwise.com/v1 |
| Header | Authorization: Bearer sr_live_… |
Keys start with sr_live_ followed by 32 random bytes in base64url. Settings → Developers shows the first characters of each key and when it was last used, so you can tell keys apart.
The REST API is a plan feature: if the organisation moves to a plan without it, its keys get 402 until it upgrades again.
curl https://musterwise.com/v1/sites \
-H "Authorization: Bearer sr_live_…"
Errors
Errors are problem details (RFC 9457, content type application/problem+json) with type, title, status and detail.
| Status | Meaning |
|---|---|
400 | The request did not match the expected schema; errors lists each field that failed. |
401 | No API key was sent, or the key is not valid or was revoked. |
402 | The organisation's plan does not include this feature. The body has code plan_feature, the feature, and unlockedBy: the lowest plan that includes it. |
403 | The key does not have the scope this request needs. |
404 | The resource does not exist in this organisation. |
429 | Too many requests in a short time. Wait and try again. |
Scopes
Tick only the scopes an integration needs. A key never gets member, billing or settings powers, and cannot create or delete sites.
| Scope | Allows |
|---|---|
people:read | Read sites, people, who is on site, visits, roll calls and building status. The MCP server needs it. |
people:write | Add and update people, and invite visitors. |
presence:write | Check people in and out. |
safety:write | Set the building status, and start, run and end roll calls. |
reports:read | Download attendance, visitor and roll call reports as CSV. |
Endpoint reference
The main resources for an integration. Paths start with the base URL; ids are UUIDs. Requests and responses are JSON, except the CSV downloads. A key with the scopes shown can call these endpoints; plan limits and the usual checks apply as in the app.
Sites
| Method | Path | Scope | What it does |
|---|---|---|---|
GET | /v1/sites | people:read | List the organisation's sites. |
GET | /v1/sites/:id | people:read | One site. |
People
| Method | Path | Scope | What it does |
|---|---|---|---|
GET | /v1/people | people:read | List people. Filter with q, kind, siteId, companyId and status; page with limit (up to 500) and offset. |
GET | /v1/people/:id | people:read | One person. |
POST | /v1/people | people:write | Add a person: kind (employee, contractor, visitor, client or member) and firstName, plus optional lastName, email, phone, siteIds and externalIds. |
PATCH | /v1/people/:id | people:write | Update a person's details. A key cannot suspend or archive people. |
Visitors
| Method | Path | Scope | What it does |
|---|---|---|---|
GET | /v1/visits | people:read | List visits. Filter with siteId, date (site-local YYYY-MM-DD), from, to and status; limit up to 500. |
GET | /v1/visits/:id | people:read | One visit. |
GET | /v1/visits/hosts?siteId= | people:read | People who can host a visitor at a site. |
POST | /v1/visits | people:write people:read | Invite a visitor: siteId, the visitor (or a personId), the host as hostUserId (required with an API key; take it from the hosts endpoint) and a time window (local date, from and to, or windowFrom and windowTo). Set sendEmail to false to skip the emailed pass. |
POST | /v1/visits/:id/cancel | people:write people:read | Cancel a visit that is still expected. |
Check-in and who is on site
| Method | Path | Scope | What it does |
|---|---|---|---|
GET | /v1/sites/:siteId/onsite | people:read | Who is on site at a site right now. |
POST | /v1/presence/check-in | presence:write | Check a person in at a site (personId, siteId). Send an idempotencyKey so a retried request is not counted twice. |
POST | /v1/presence/check-out | presence:write | Check a person out of a site (personId, siteId). |
Building status and roll call
| Method | Path | Scope | What it does |
|---|---|---|---|
PUT | /v1/sites/:siteId/status/operational | safety:write | Set the building status: level green, amber, red or black, with a reason in message (at least 3 characters). |
GET | /v1/sites/:siteId/rollcalls | people:read | Roll calls at a site. |
POST | /v1/sites/:siteId/rollcalls | safety:write | Start a roll call: type evacuation (the default), invacuation, lockdown or drill. |
GET | /v1/rollcalls/:id | people:read | One roll call with its counts. |
POST | /v1/rollcalls/:id/marks | safety:write | Mark people accounted for or not, up to 500 marks per request. |
POST | /v1/rollcalls/:id/end | safety:write | End a roll call, with optional notes. |
GET | /v1/rollcalls/:id/report.csv | people:read | The roll call report as CSV. |
Reports
| Method | Path | Scope | What it does |
|---|---|---|---|
GET | /v1/reports/:kind.csv | reports:read | The attendance, visitors or rollcall report as CSV for the last day or week (frequency daily or weekly), optionally for one siteId. |
Webhooks
Webhooks are included in Business and above. Add an endpoint in Settings → Developers: an https URL and the events you want. The signing secret, which starts with whsec_, is shown once; you can rotate it later. Endpoints must be public: local and private network addresses are refused. A new endpoint receives events from the moment it is added, not the organisation's history.
Events
| Event | Sent when |
|---|---|
person.created | A person is added. |
invitation.created | A visitor is invited. |
presence.checked_in | Someone checks in, including a check-in with an override. |
presence.checked_out | Someone checks out. |
presence.auto_checked_out | Someone is checked out automatically. |
site_status.changed | A site's building status changes. |
rollcall.started | A roll call starts. |
rollcall.person_accounted | A person is marked accounted for in a roll call. |
rollcall.ended | A roll call ends. |
Send test, next to each endpoint in the settings, delivers an event of type webhook.test.
The request
Each delivery is an HTTP POST with a JSON body: type (the event), timestamp (ISO 8601) and data (the record id, entityType, action and the recorded fields). IP addresses and browser details are never included.
| Header | Value |
|---|---|
content-type | application/json |
user-agent | Musterwise-Webhooks/1 |
webhook-id | The message id. It stays the same when a delivery is retried, so use it to ignore duplicates. |
webhook-timestamp | When this attempt was sent, in Unix seconds. |
webhook-signature | v1, followed by the base64 HMAC-SHA256 signature. |
Verify the signature
Join webhook-id, a full stop, webhook-timestamp, a full stop and the raw request body. Compute HMAC-SHA256 of that string with your secret as the key: the part after whsec_, base64-decoded. Base64-encode the result, put v1, in front and compare it with webhook-signature in constant time. Reject timestamps more than five minutes from now. The format follows the Standard Webhooks spec.
import { createHmac, timingSafeEqual } from 'node:crypto';
// secret: the whsec_… value shown when you added the endpoint.
// rawBody: the request body exactly as received, before JSON parsing.
function verifyWebhook(secret, headers, rawBody) {
const id = headers['webhook-id'];
const timestamp = headers['webhook-timestamp'];
const seconds = Number(timestamp);
if (!Number.isFinite(seconds) || Math.abs(Date.now() / 1000 - seconds) > 300) return false;
const key = Buffer.from(secret.replace(/^whsec_/, ''), 'base64');
const mac = createHmac('sha256', key).update(id + '.' + timestamp + '.' + rawBody).digest('base64');
const expected = Buffer.from('v1,' + mac);
return String(headers['webhook-signature']).split(' ').some((sig) => {
const given = Buffer.from(sig);
return given.length === expected.length && timingSafeEqual(given, expected);
});
}
Delivery and retries
A background job sends new events every 15 seconds. A delivery succeeds when your endpoint answers with a 2xx status within 10 seconds; redirects are not followed. Otherwise it is retried after 30 seconds, 2 minutes, 10 minutes, 30 minutes, 1 hour, 3 hours, 6 hours and 12 hours (about 23 hours in all), and then marked failed.
Settings → Developers shows the last 50 deliveries for each endpoint, with the status code or error of the last attempt, and you can retry a delivery from there. You can also pause an endpoint.
MCP server
A remote Model Context Protocol server, so AI assistants and agents can look up your sites and invite visitors. It is included in Business and above and uses the same API keys as the REST API.
| Item | Value |
|---|---|
| Endpoint | https://musterwise.com/mcp |
| Transport | Streamable HTTP: JSON-RPC 2.0 over POST, with JSON responses. Stateless; there is no server-sent stream, so GET and DELETE return 405. |
| Protocol versions | 2025-11-25, 2025-06-18, 2025-03-26 |
| Authentication | Authorization: Bearer sr_live_… with a key that has people:read. invite_visitor also needs people:write. Requests without an API key get 401; on a plan without the MCP server, 402. |
| Limits | 120 requests a minute. One JSON-RPC message per request: batches are refused. |
| Audit | Read tools and ask are recorded in the organisation's audit log as mcp.tool_called. invite_visitor goes through the normal visits endpoint, so it is checked and audited like any new visit. |
| Registry entry | /.well-known/mcp.json describes the server for MCP registries, under the name com.musterwise/attendance |
Tools
| Tool | Type | What it does |
|---|---|---|
list_sites | Read-only | Lists the sites you can see, with their ids and time zones. |
get_onsite_now | Read-only | People on site right now: name, kind, company, site and when they checked in. |
search_presence | Read-only | People who were on site at any moment between from and to, at most 31 days apart. |
get_attendance_summary | Read-only | Check-ins per site-local hour over the last N days, busiest first. |
list_expiring_inductions | Read-only | Inductions that expire within N days, and ones that expired in the last 30 days. |
list_expected_visitors | Read-only | Visitors expected on a site-local day (today by default), with host and time window. |
get_site_status | Read-only | The building status of each site and its reason. |
get_rollcall_status | Read-only | Active roll calls, with how many people are accounted for and how many are missing. |
ask | Read-only | Answers a plain-English question about people on site, visitors, inductions and safety status, using built-in question patterns rather than an AI model. |
list_hosts | Read-only | People who can host a visitor at a site; use their userId for invite_visitor. |
invite_visitor | Writes | Registers a visitor for a site-local date and time window and, by default, emails them a pass with a QR code. |
Connect a client
Add the server to any MCP client that supports remote servers with a custom header:
{
"mcpServers": {
"musterwise": {
"type": "http",
"url": "https://musterwise.com/mcp",
"headers": { "Authorization": "Bearer sr_live_…" }
}
}
}
Or list the tools with curl:
curl https://musterwise.com/mcp \
-H "Authorization: Bearer sr_live_…" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Start free, upgrade when you connect
Create a free account and set up your first site. When you are ready to connect your systems, upgrade to Starter for the REST API, or to Business for webhooks and the MCP server.