# Connect your agent to SynthSkills

SynthSkills gives your agent task-focused skill guidance. Free reader access
covers public skills; librarian tools require separate owner-issued access.

**MCP URL:** `https://synthskills.synthminds.pk/mcp` — use **Streamable HTTP**.
Choose your client below, connect without a key, then follow the two-call start.
No email, Authorization header or client restart is needed for that start.

## Claude Code

Run this in your project, then start a new Claude Code session:

```bash
claude mcp add --transport http synthskills https://synthskills.synthminds.pk/mcp
```

This adds the server to the current project. Use Claude Code's MCP controls to
check that SynthSkills is connected, then ask your agent to follow **No key yet**.

## Codex

Add this single entry to `~/.codex/config.toml`, then start a new Codex session:

```toml
[mcp_servers.synthskills]
url = "https://synthskills.synthminds.pk/mcp"
default_tools_approval_mode = "approve"
```

The approval setting trusts this server's tools. It avoids the client-side
“MCP tool call requires approval, but approval policy is never” dead end in
noninteractive sessions. An administrator's managed policy may still restrict
access. If this server entry already exists, update it instead of duplicating it.
See the [official Codex configuration reference](https://developers.openai.com/codex/config-reference).

## Cursor and any MCP client

For Cursor, put this in your project's `.cursor/mcp.json` or your user
`~/.cursor/mcp.json`, combining it with any existing `mcpServers` entries:

```json
{
  "mcpServers": {
    "synthskills": {
      "url": "https://synthskills.synthminds.pk/mcp"
    }
  }
}
```

For another client, choose **Streamable HTTP**, enter the same MCP URL, and
leave authentication empty. Enable the server's tools in your client. The
client must support MCP initialization and tool calls; the JSON above is for
clients that use the `mcpServers` format. See [Cursor's MCP guide](https://cursor.com/docs/mcp).

## No key yet

Ask your connected agent to make these **two tool calls in the same connection**.
`initialize` and `tools/list` happen automatically in most clients. Choose a
unique agent name of your own, such as your name and machine (replace `<you>-<machine>`
below); keep the same name and client for future recovery. Example names such as
`my-agent` or `example-agent` are never re-issued.

Use one pass per agent, and preferably a separate key per agent. A pass budget
includes **all reads made with that pass string**, including other agents
sharing it; a key’s daily budget includes **all of its passes**, resetting at
UTC midnight. Concurrent readers can consume an allowance between snapshots.
Minting a fourth live pass on one key replaces its oldest pass.

`budget.charged` is the characters charged by this read: the served marked body
after visibility/client filtering and the page cap, including a truncation
marker. The task-use notice, metadata and JSON envelope are not charged.
A section read charges only that section’s served body. Continuation pages
charge their own bodies and use no additional distinct-skill slot.
`budget.scope` is always “pass: all reads made with this pass string; day: all
passes of this key, UTC”. A larger JSON payload is not a larger body charge.
Every read lists `sections_served` (use those ids, or `[]`, in `log_skill_use`); `budget.recharged` is true when you re-read text you already read with this pass, which is charged again; a 429 gives `remaining` and `required`; served text is redacted, and a link to a skill outside the public library reads `[skill not in the public library]`.

Call `report_feedback(pass, kind, skill?, request?, note?)` when a skill helped
(`helped`), was wrong (`wrong`), or nothing fit (`missing`). Optionally name the
skill, describe your task in plain words (`request`, at most 300 characters),
and add a short `note` (at most 500 characters). Omit private details. Feedback
is redacted before storage, uses no read budget, and returns a thank-you and id.

### When nothing fits: ask for the skill

If `ask_receptionist` finds nothing, its reply carries a `next` line and a `coverage`
list (what the public library does cover). Do the task from your own knowledge, but
first file the request once: `report_feedback(pass, kind="missing", request="<one
sentence>", details?)` (`request` at most 300 characters, `details` at most 1000).
Your request may be used to write a public skill; include no private data. Keys,
passes, claim codes, emails, phone numbers, IPs and URL query strings are refused or
removed before anything is stored.

The reply is a receipt: `{ticket, status: "received", check_after, url, message}`.
Nothing is promised; the owner reviews requests regularly. Write the ticket into your
project notes. After `check_after` (48 hours), call `my_requests(ticket)` (works
without any key) or open the `url`. The status is `received`, `approved`, `building`,
`published` or `not_planned`; when `published` it names the skill to read
(`ready: read skill://<name>`). `my_requests(pass)` lists your key's tickets, 20 per
page (`cursor`). A key may file 5 requests per UTC day (20 per network, 300 overall);
a repeat of the same request within 24 hours returns the same ticket. Over a limit the
call returns a 429 error with `retry_after`.

After the task, call `log_skill_use` once for each skill you used, as required
by charter v2 (C13):

**1. Call `join_library` with:**

```json
{"agent_name":"<you>-<machine>","client":"codex","purpose":"Find guidance for my current task"}
```

Replace `client` with `claude-code`, `cursor` or your actual client name. The
reply's first line is **shown once: save it now**. Save `access_key` privately
before filtering or closing the reply. `key_hint` is only its last four
characters. Read the returned `charter.text`; its SHA256 equals `charter.hash`.

**2. Call `accept_charter` with:**

```json
{"agent_name":"<you>-<machine>","client":"codex","purpose":"Find guidance for my current task",
 "charter_hash":"<join_library charter.hash>","access_key":"<join_library access_key>"}
```

Use the same name, client and purpose. Save the returned `pass` and send it as
the `"pass"` argument on protected tools. The connection can stay keyless: no
header change or restart is needed. The reply includes the charter hash, rule
IDs and `budgets`; `verbose=true` also returns the full rules.

**Already have a key?** Reuse it with `accept_charter(access_key=<saved key>)`;
fetch `get_charter` first if you need the current hash. Do not join again for
each task. A new pass lasts 12 hours. Keep keys and passes out of URLs, public
issues and shared logs.

If you prefer header authentication, configure `Authorization: Bearer <saved
key>`. A header takes precedence; it must match any `access_key` argument.
Passes minted with a header keep requiring it. Reader keys work in the argument;
librarians use the header. Expiry, revocation and address restrictions apply to
both paths.

## Use the library

1. Call `intake` once with your pass and a few words about the project.
2. Call `ask_receptionist` with your pass and the task in plain words.
3. Read the recommended sections with `read_skill`; `list_skills` browses metadata without spending the reading budget.
4. Read only what the task needs. If a read is truncated, keep its URI and section and continue with `next_cursor`.
5. After the task, call `log_skill_use` for each skill used, with section IDs actually read, an outcome and a rating.
6. Use `report_feedback(kind='missing')` with your pass when no skill fits; omit private task details.

## Limits and budgets

The following are **defaults**. The operator can change join and shared-network
caps; use the actual `limit.count`, `retry_after` and `resets_at` in a refusal.
`accept_charter.budgets` states the reading allowances before the first read.

| Allowance | Default | Shared scope |
| --- | --- | --- |
| Automatic reader key lifetime | 14 days | The issued key; `expires_at` is authoritative |
| New joins per UTC day | 3 per address, 10 per network, 200 globally | All agents; web form and MCP share the caps |
| Lost-key re-issues per UTC day | 3 per lineage | Same agent name, client and exact address; also spends the global join cap |
| Pass lifetime | 12 hours | Every reader sharing that pass |
| Reading per pass | 150,000 characters, 20 distinct skills | All reads with that pass |
| Reading per key per UTC day | 600,000 characters, 40 distinct skills | All passes of that key |
| One reader page | 12,000 body characters | Use `next_cursor` to continue |
| Pass minting | 10 per sliding hour and 10 per UTC day | One key; at most 3 passes stay live |
| Metadata browsing | 30 calls per sliding hour | One key, across passes |
| Automatic-key distinct reads per UTC day | 60 per read network, 400 globally | All automatically issued keys together |
| New logbook entries per UTC day | 50 per key, 5,000 globally | A repeat for the same pass/skill updates that entry |

Asking the receptionist is limited to 30 a minute and 600 in a rolling 24 hours per key.
A key is suspended only for abuse signals: asking for a 60th distinct skill in one UTC day
after 59 have been served (that request is refused with a 403 and the key is suspended), or
reading decoy skills, which is an independent signal. Ordinary budget refusals (a 429
from a pass, key or shared limit) and rate limits never count toward suspension, so you can
wait for the reset instead of worrying.

Call `my_usage(pass)` to see where you stand: used, cap and remaining for the key and the
pass (distinct skills, characters), the suspension threshold, the shared network and
global counts that apply to self-serve keys (counts only, never other users' activity),
`resets_at` (next UTC midnight; it covers the key's skill and character budgets and the
shared counts), and the last three refusal events with the name of the limit that said no.
Asks use a rolling 24 hours, not the UTC day: `asks_last_24h`, `asks_remaining` and, when
none are left, `asks_retry_at`. A pass budget has no daily reset: it ends with the pass.
It spends no read budget, returns no skill text
and is limited to 30 calls per sliding hour.

For joins, “address” means an IPv4 address or IPv6 /64; “network” means IPv4
/24 or IPv6 /48. The shared read-network cap uses IPv4 /24 or IPv6 /64.
Everyone behind an office network can share these allowances. Other short-term
call limits also apply; follow the returned wait instead of retrying repeatedly.

**Re-reads charge characters again.** Cache the text you already read. A section
costs only its served body; a continuation page costs its own body and adds no
new distinct-skill slot. Notices, metadata and the JSON envelope are not charged.
`read_skill.budget` reports remaining pass and key-day balances after the read.
Balances are snapshots, so concurrent readers may spend them before your next
call. Minting a fourth live pass replaces the oldest. Use a separate key and
pass for each agent. Refused skill requests also count toward the suspension
guard; do not crawl or bulk-copy the library.

All `expires_at` and `resets_at` values are ISO 8601 UTC timestamps ending in
`Z`; `retry_after` is a relative wait in seconds. Daily allowances reset at UTC
midnight. A budget refusal may have `retry_after: null` because it needs an
action; try a smaller section if it fits the remaining budget.

## Lost key

**No previous secret can be returned.** If you lost an automatic reader key,
call `join_library` with the **same agent_name and client from the same address**
(the exact IPv4 address, or the same IPv6 /64).
Names and clients are normalized for Unicode, case and whitespace. If a live
key in that lineage was minted in the last 24 hours, rejoining replaces its secret,
revokes all its passes and shows a fresh key once. It is the same key record, so the
expiry and spent budgets carry over. Save the replacement immediately.
The reply always says “if this agent_name joined from this network today, that
key is now revoked”, whether or not a matching key existed.

Re-issuing spends no address/network join allowance. It spends one of the 3
re-issues per lineage per UTC day and the global join allowance. Another address,
even on the same /24 or /48, gets a fresh key under its normal join caps and cannot
revoke the original. Keys issued before lineage tracking are re-issued only from
the original IPv6 /64; IPv4 ones are not recognised.

**409 key_in_use:** a key that made any authenticated call (a pass, a read, a
listing or a question) in the last 30 minutes is protected. Reuse your saved key; if it is lost, retry after 30 minutes of no use
or ask the owner. This error confirms that the name is active on your own
address; choose a distinct name for each agent.

**Leaked key you still have:** call `rotate_key(access_key=<saved key>)`, or
`rotate_key` with its Authorization header. Save the new key, update any
configured header, and accept the charter again. The old key and all its passes
stop working. Rotation keeps the expiry, permissions and spent budgets, and
spends no join allowance.

An expired key, or a lineage with no live key issued in the last 24 hours,
needs a normal new join and its normal allowance. In approval mode, joining
returns a one-time claim code and a URL; save it, then claim after owner approval.
Approval-mode claims and legacy email-path joins have no automatic lineage
recovery. Ask the owner if those credentials are lost. There is no email
recovery, listing keys by IP, recovery of an old secret, or owner-free un-revoke.

## Errors

Tool refusals have `isError: true`. Read the structured `error.code`, `message`
and `next`; the same error is also supplied as JSON in text content.

| Code | Meaning | Recovery |
| --- | --- | --- |
| `key_required` | No key was supplied, or a header-authenticated pass needs its header. | No key: use the two-call start. Saved key: restore its header or accept with `access_key`. |
| `key_invalid` / `key_expired` | The supplied key is invalid, revoked or expired. | Reuse the saved current key, or follow [Lost key](/connect#lost-key). |
| `pass_invalid` | The pass is unknown or expired on the keyless path. | Call `accept_charter(access_key=<your saved key>)` for a new pass. |
| `pass_expired` / `pass_replaced` / `pass_revoked` | This pass ended. | Accept the current charter with your saved valid key. |
| `charter_changed` | The charter changed after this pass was minted. | Read `get_charter`, then accept its current hash. |
| `read_only` | A reader or keyless caller attempted a librarian tool. | Suggest a skill with `report_feedback(kind='missing')` using a valid pass. |
| `unknown_tool` | The tool does not exist; guessed write names also explain read-only access. | Call `tools/list`; readers can report missing skills. |
| `invalid_arguments` | Missing, unexpected or incorrectly typed fields. | Check `missing` / `unexpected` (at most 5 names each) and `tools/list`; values are never echoed. |
| `key_in_use` | A re-join would replace an active key. | Reuse the saved key, wait 30 minutes of no use, or ask the owner. |
| `rate_limited` / `pass_cap` | A join, read or call allowance was reached. | Follow `limit.name`, `retry_after` and `resets_at`; see [Lost key](/connect#lost-key) for join recovery. |

A daily join refusal names the shared address/network limits and reset time.
It also reminds you to reuse a saved key or re-join the same lineage for lost-key
recovery. `join_reissue_day` means the lineage used its 3 daily replacements.
`join_global_day` applies to re-issues as well as new joins. `key_hint` is for
recognition only and cannot prove ownership.
