Docs
Getting started
- 1. Sign up. Get a sandbox — no card, no waiting on us. Your library starts empty apart from the default prompts and tool metadata; paste in the sample leave policy below to have something for an agent to answer questions about.
- 2. Get your endpoint and credentials. Right after signup you'll see your MCP endpoint URL and machine-to-machine (M2M) credentials. Your tenant's admin can view them again anytime from the dashboard's Settings page, so there's no rush to copy them down immediately.
-
3. Connect an MCP client.
Configure your agent's MCP client with the
client_credentialsgrant using those credentials, pointed at your endpoint. See below for the exact URL shape.
Connecting an MCP client
Each client gets its own MCP endpoint, scoped to that client's data only. The full URL shape, including the two optional params explained below:
https://effectivefrom.com/clients/{client_guid}/mcp?library=prod[&effective_at=...][&as_at=...]
client_guid is issued at signup/provisioning
and identifies your tenant; it's the same value your MCP client authenticates against via
client_credentials. library
selects which environment the endpoint reads from (e.g. prod
vs. a draft library), and stays fixed for a given endpoint — your agent never chooses it
mid-conversation. Optional effective_at
and as_at query params (shown above in
brackets — brackets aren't part of the actual URL) let you point a connection at a
pinned moment in business/system time for staging preview or testing — set once when
configuring the connection, not something the agent varies per call.
Minting an access token
Your MCP client authenticates with the OAuth2
client_credentials grant, directly against
WorkOS's own token endpoint (not this app — your
oauth2_client_id/
oauth2_client_secret are issued by WorkOS at
provisioning). Exchange them for an access token by POSTing them — as form fields, not an
Authorization: Basic header:
curl -X POST https://teachable-tranquility-12.authkit.app/oauth2/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id={oauth2_client_id}&client_secret={oauth2_client_secret}"
The response carries an access_token and
expires_in (seconds). Send the token on every
request to your MCP endpoint as
Authorization: Bearer {access_token}. Tokens
expire — configure your agent's MCP client to re-mint one as needed rather than hardcoding a
single value forever.
Building a library
Library key.
A library is the environment your MCP endpoint reads from — most tenants just use
prod, but you can stand up a second one (e.g.
staging) to try out changes before they reach
the library your agents actually connect to. It's the query parameter on your endpoint URL
that you set once and never vary per request — one endpoint is permanently wired to one
library.
Content key.
The stable identifier for one piece of content across its entire history — every draft,
ready-to-publish version, and published version of "the vacation policy" shares the same
key, and versions are created underneath it. A rollback is just publishing an older
version's content again through that same key, not a separate mechanism. Keys are how your
agent asks for something
specific (get_content("policy-vacation")) and
how you find something again later to edit it. Pick keys the way you'd pick a filename: short,
dash-case, and durable — there's no rename, so changing a key means starting a new one.
Title.
The human-readable name attached to a version, inspired by Dublin Core's title element. It's what a list of everything in the library shows, so an agent (or you, in the
dashboard) can tell items apart without opening each one — it's a discovery label, not
part of the served content itself. get_content
and resource reads return the body verbatim; write your own heading into the body if you want
one. Write the title the way you'd write a one-line summary for a colleague, not a restatement
of the key.
Channel. Which of three ways a piece of content reaches your agent:
- tool — a document your agent looks up by key: listed for browsing, then fetched on demand. This is where policies, FAQs, and reference material live.
- resource — a prompt read directly by the harness — system and user prompts, meant to be loaded once rather than queried.
-
tool metadata (channel
manifest) — not content about your business at all: this is the wording of the two MCP tools themselves. Give your tenant's tools their own name and description by publishing a tool metadata item, no code change required.
Type.
A free-text label for what kind of document something is — policy, faq, runbook, or whatever taxonomy fits your library. It only applies to tool-channel content, since
resources and tool metadata entries are reached by a known key rather than browsed. Inspired by the
Dublin Core type element, without the formal
controlled vocabulary — use words your own team will recognize later.
Subject.
A set of free-text tags on a tool-channel item, inspired by Dublin Core's
subject element. Where type answers "what
kind of document is this," subject answers "what is this document about" —
faceted classification: a document can carry several tags (employee, vacation) and be found by any of them,
rather than forcing one rigid category per item.
Change feed
Once an agent has called get_content (or read
a resource), that text sits in the conversation's context — a later publish changes what
the endpoint serves next, but not what's already there. Every tool/resource result also carries
an opaque identifier in MCP's _meta object
(effectivefrom.com/id,
effectivefrom.com/key,
effectivefrom.com/version) — never a date,
so there's nothing here for the model to reason about. If your orchestration layer keeps a map
of which id each in-flight session was served, it can poll
GET /clients/{client_guid}/changes with the
same credential it uses for the MCP connection, and act on any publish whose id doesn't match
what a live session is holding — append a correction, invalidate a cache, end the session,
or nothing.
Query params: cursor (the previous response's
own cursor, fed straight back in; omit it to
start from now, 0 to replay full history),
library (optional, defaults to all of them),
and limit (default 100, max 500). Poll every
30–60 seconds — publishes are rare and human-driven, so there's no need to go
faster.
Each event's id is a string (a UUID) —
compare it for equality with the _meta id,
nothing else. Each event also carries a seq,
its position in your account's write history; the cursor is the last position you've seen.
Positions have gaps (drafts and unpublished edits take positions too), so treat them as
positions, not counts. Events arrive in the order they were written and none are ever
skipped. A cursor beyond your latest position is rejected with a 400 — start again
from now (omit it) or from 0.
Sample policy to try
A sandbox has no documents in it yet. To have something for an agent to answer questions
about, create a tool-channel item in the dashboard with key
policy-vacation, title
Leave Policy, paste the markdown below as
the body, mark it ready, and publish it. Then ask your agent how much leave a full-time
employee gets. To see a scheduled change land, create a new version with the Additional
Leave figure changed from 5 to 7 days, set its effective date a few minutes from now,
publish it, and ask again after the moment passes.
# Leave Policy
**Applies to:** All permanent full-time and part-time employees
**Owner:** People & Culture
## Purpose
This policy covers two kinds of paid leave: **Annual Leave**, the statutory minimum every employee already has under the National Employment Standards (NES) or applicable award, and **Additional Leave**, an extra allowance we provide on top of that minimum. Where anything below is less than your statutory entitlement, the higher entitlement always applies.
## Annual Leave
- Full-time employees accrue **20 days** of paid Annual Leave per year, in line with the NES minimum, credited progressively each pay cycle from their start date.
- Part-time employees accrue Annual Leave pro-rata, based on contracted hours.
- Requesting, approving, carrying over, and cashing out Annual Leave all follow the NES and your award or enterprise agreement — see your contract or ask People & Culture for the specifics that apply to you.
## Additional Leave
- On top of Annual Leave, full-time employees receive **5 days** of paid Additional Leave per year, granted at the start of each leave year (1 July).
- Part-time employees receive Additional Leave pro-rata.
- Additional Leave does not carry over — unused days lapse on 30 June each year.
- Additional Leave is requested and approved the same way as Annual Leave (see below).
## Requesting Leave
- Submit requests through the HR portal — 2 weeks' notice for 5 days or fewer, 4 weeks' notice for anything longer.
- Your manager confirms or declines within 3 business days, based on operational needs at the time. An unconfirmed request is pending, not approved.
- Leave taken without an approved request is recorded as unpaid.
## Cancelling or Rescheduling
- Approved leave can be moved or cancelled up to 5 business days before it starts without further approval; changes inside that window need manager sign-off.
## Questions
Direct questions on this policy to peopleteam@dataqualityworks.com.