본문으로 건너뛰기
  1. 레퍼런스
  2. REST API

레퍼런스

REST API

이 페이지는 영어로 쓰여 있습니다.

  • Status: Draft. Version 1 serves the web UI, the skillcdn command and any program that reads a pack.
  • Response schemas live in packages/core, the routes of an address in packages/serve and the client in packages/client (ADR-0056, ADR-0057); apps/server composes them with the deployment's own routes.

The API shows a person what an agent gets from an address, and gives a program the same (serving an agent from a program). Without a credential it is anonymous, read-only and limited to public repositories; on a deployment where people sign in, a request that carries the session cookie of the deployment's own pages, or a token of this deployment (authorization), is answered for that person, private repositories they can see included (permissions), and a few routes under People belong to whoever is signed in. It shares the index, canonical paths and reading rules of the tools. ADR-0022 explicitly changed the pre-alpha v1 path and skill contracts, and ADR-0024 records the last such replacement; from its surface on, changes are additive unless an ADR defines a breaking transition.

Conventions

  • Base path /api/v1; UTF-8 JSON.
  • <address> follows the address spec, for example /api/v1/mounts/gh/acme/library@v2/marketing. Address percent-escapes are parsed from the raw path.
  • Every content path is an actual repository-root path, including on sub-path connections. A skill's path ends in SKILL.md; its directory is the containing folder. Names do not identify skills.
  • Ordinary reads and listings remain inside the mount. Applicable ancestor rules may arrive through skill-context continuation without permitting arbitrary reads above the mount.
  • Responses use cache-control: no-store, except a ready answer of a public address pinned to a full commit hash, which says public, max-age=86400: the commit never changes, but what the deployment serves of it can, when the operator's lists change, when the reading rules change or when the repository stops being public, so a cache keeps it a day, the bound the skills extension gives such an address as ttlMs (tools), and no longer. An error, an answer given while the commit is being indexed, a moving ref and a private read stay no-store, the last because a shared cache would answer it without the permission check; so does the answer of a search that the meaning did not reach, or that was given while the index was still being embedded, since the same search a moment later may answer in full (ADR-0096).
  • Limiting requests per client is the job of whatever sits in front of the server, as for MCP.
  • CORS allows * without credentials, answers OPTIONS, allows the authorization request header, and exposes x-request-id, retry-after and www-authenticate. Without credentials means another origin's page never sends the session cookie: only the deployment's own pages read what is a person's through it; a page elsewhere presents a token (authorization).
  • Errors have { "error": { "code": "...", "message": "..." } }.
StatuscodeWhen
400address.*The address does not parse.
400request.invalidA query parameter or cursor is invalid, or its snapshot or request no longer matches. Restart pagination.
404mount.repo_not_foundThe repository does not exist, or the caller may not see it; these are indistinguishable.
404mount.ref_not_foundThe ref does not exist in the repository.
403mount.not_allowedThe deployment does not serve this repository.
403mount.not_readThe request names itself a crawler and presents nothing, and the deployment holds no index to answer it from (crawlers).
503mount.rate_limited, mount.unavailableThe git host cannot be asked now; retry-after is set when known.
503skill.unavailableIndexed skill content cannot be read now.
503index.indexing, index.failedA file read cannot establish the publication policy until indexing is ready. Retry later.
404skill.not_found, file.not_foundNo eligible content at that path inside the mount.
409skill.ambiguousMore than one skill answers to the request; the response lists the directories to choose from.
413file.too_largeThe file exceeds the readable size limit; sourceUrl is where its bytes are (ADR-0077).
415file.not_textThe file is not UTF-8 text, or is a Git LFS pointer to a file the host serves; sourceUrl is where the bytes are, and the message says how a private repository's are fetched.
403file.not_servedThe license of the file's skill or repository allows a description, not a copy (licenses); sourceUrl links to the file at its host.
404legal.not_foundThe page of the deployment's own has not been written.
400owner.invalidThe path after /owners is not /gh/<owner>.
404owner.not_foundThe git host shows no account by that name.
401auth.requiredThe route is for whoever is signed in, and nobody is.
401auth.invalid_tokenThe token presented is no good at this address, which is not public (authorization); www-authenticate names the address's protected resource metadata.
403auth.forbidden_originA request that changes something did not come from the deployment's own pages.
404grant.not_foundThe person has no such grant.
400oauth.*An authorization request that is malformed or has expired; the code after the dot is the OAuth error.
400connect.invalidA command asking to connect named no repository or nothing it calls itself, or an answer to one is not readable (connecting).
404connect.not_foundNo command waits under the code or the secret: it was declined, claimed or is past its time.
503connect.busyThe deployment holds as many connection requests as it will; retry-after is set.

Index state and paging

Resolving an address starts indexing. REST never waits: endpoints needing the index answer 200 with status: "indexing", or status: "failed" and errorCode, instead of their usual status: "ready" result. Failed indexing retries after backoff.

A request that names itself a crawler in its User-Agent, as the pages read one, and presents neither a token nor a session, starts nothing (ADR-0144). It is answered from what the deployment holds, the index of the commit or of the one before, with a search ranked by words alone, and its read keeps no index. Where the deployment holds nothing to answer from, a name it has not read, a repository that is not public or a commit without an index, the answer is 403 with mount.not_read, and the git host is not asked about a name never read. A program that is no crawler names itself otherwise, or presents a token.

While the newest commit of a moving ref is being indexed, or could not be, the routes answer from the last indexed commit of the same ref, and from the same commit's index under the previous reading rules while it is being rebuilt (ADR-0068): commit then names the commit answered from, and the mounts route says in newest which commit is the newest and why it is not served. An address pinned to a commit is answered from that commit alone.

Paged results identify their commit and return nextCursor, or null when the page is last. Cursors bind to the snapshot and reading-rule version, mount, operation and request parameters. They cannot be reused with another path or query. If a moving ref changes, restart from the first page; pin a full commit hash for a stable workflow. An index marked truncated is partial independently of pagination.

Authorization

A public address needs no credential, and what is served does not depend on who asks (permissions). On a deployment where people sign in, the routes that read an address, mounts, browse, find, skills, files, listing, rows, code and raw, answer for a person in one of two ways (ADR-0052):

  • A session: the cookie of the deployment's own pages, which a browser sends by itself.
  • A token of this deployment, in the authorization header with the Bearer scheme: an access token a person's app received from the authorization server, good at the one canonical address it was issued for, ref and path included (tokens), or a repository token a person made for an agent with nobody to sign in, good at every address of that one repository (repository tokens). A token presented wins over a session sent with the same request. A header that is not a bearer credential is a credential that is no good.

On a deployment that reads the packs of its own directory with a token only, the same routes take a pack token at a local address, with or without signing in (permissions).

The answers are those of the MCP endpoint (permissions), with one difference: a request without any credential for anything that is not public is 404 here, never a challenge. The REST API has no discovery step: a program that runs against it is given its token by a person, and the pages read 404 as a repository that may be private, and offer to sign in.

Request to an addressAnswer
No credential, public repositoryServed, as always.
No credential, anything else404 mount.repo_not_found.
A valid token, a repository its person can seeServed, with visibility: "private"; the answer is that person's, and nothing between the server and the program may keep it.
A valid token, anything else that is not public404 mount.repo_not_found: a repository the person cannot see and a name that is nothing are the same.
A token that is unknown, expired, revoked, malformed, issued for another address or made for another repositoryAt a public address: served, as to anyone. Anywhere else: 401 auth.invalid_token, with the address's challenge in www-authenticate and error="invalid_token", so that a program is told its credential is no good, and nothing else.
A valid token whose person the git host no longer vouches forThe same 401: the person signs in again and makes the token again.

Every request that reads something not public checks the person's access with the git host within the staleness bound, continuations and file reads included (the permission check); a token says who made it, never what they may see. The routes under People and the pages know a person by their session only: a token reads its repository and does nothing else as its person. On a deployment where nobody signs in, a token means nothing and anything not public is 404.

Endpoints

GET /api/v1/mounts/<address>

Repository identity and a bounded overview of the mount:

FieldMeaning
addressCanonical address.
repositoryHost, owner, name, default branch, host description, avatar, the owner's picture as the host serves it (ADR-0031) or the empty string for a pack served from a directory of the deployment, whose owner has none (ADR-0071), and visibility: public, or private for a repository that is only ever answered to someone the git host lets see it (permissions).
ref, pinned, commit, pathRequested ref (null for default), whether it is a full commit hash, resolved commit, and mounted repository-root directory.
verifiedWhether the operator or, later, the owner vouches for the repository (tools).
imageThe picture that stands for the address, as the URL a browser loads it from: the operator's (admin API), else the one the nearest manifest declares (format), a file of the repository at commit at the host or a URL as written; null when there is none.
newestThe ref's newest commit while commit is another one, served in its place, or while this commit's index is being rebuilt (ADR-0068): its commit, its status, indexing or failed, and its errorCode, null unless it failed. null when what is served is the newest. Absent from an answer of a deployment older than the field.
indexState, or a ready overview with manifest metadata, the license that governs the mounted directory outside its skills (kind, name, source), skill/document counts, bounded listings and diagnostics.
index.groups, index.groupCountThe folders of the mounted directory, the first 50 of them, each as the folder listing answers an entry; and how many of all its folders hold a skill or a document, which the connection instructions count the folders they do not list from (connection and prompt). groupCount is absent from an answer of a deployment older than the field.
index.searchHow the mount is searched right now (words and meaning): meaning, whether a search uses the vectors of its sections, and embedding, where the embedding of its index stands: null where nothing has embedded it, { "status": "complete" }, or { "status": "in_progress", "embedded": n, "total": n } in documents. By words alone where the deployment has no embedding model.

The overview's manifest carries its own canonical path, name, description, language and translations, or is absent when no applicable manifest exists. Its start, when present, is the page the pack tells an agent to read before a task (format): the nearest one a manifest at or above the mount names that lies inside the mount, as a repository-root path. An ancestor manifest's path remains its actual repository path even if ordinary file reading cannot reach it from this mount. Names, descriptions and translations belong to their declaring manifest; language inherits from the nearest ancestor that declares it.

Skill listings expose exact path, directory, name, description, warnings and translations. Document listings expose canonical path, title and summary. Overview lists are bounded; clients use the browse and find endpoints' continuations to explore further. Counts cover eligible content, not every file in the git tree. Diagnostics explain unreadable manifests, and truncated identifies indexing limits.

GET /api/v1/browse/<address>?path=&cursor=&limit=

The browse_repo tool's immediate-folder view. path is an optional canonical directory (default: mounted directory), or the path of a file for its outline; limit is 1 to 200, default 50. cursor continues the same listing.

Entries preserve the real folder tree, name their canonical paths, distinguish files and directories, and identify skill folders and manifest metadata when available. Counts help a client choose a subtree without loading every skill; a directory entry that holds pictures says how many (imageCount, absent when none). A manifest adds context to its folder; it creates no shortened path or alias, and the response names the manifest of the browsed folder itself in manifestPath when it has one. A skill entry carries its license and, when this mount only describes the skill, describedOnly: true (licenses). The response carries diagnostics, commit and nextCursor.

Given a file, the response carries outline and no entries (the outline of a file): the file's path, its size in bytes, its totalLength in characters (null when the text is not at hand), headings, each with its level, text, offset and length, paged by limit and cursor, and truncated when the file has more headings than an outline keeps; a heading whose section holds tables carries rows, how many rows they hold. On the first page of a Markdown document it carries tables, how many the document has and the rows they hold together, codeBlocks, how many fenced code blocks, and data, where the two are had as data, the rows and the code route of the address with the file as path, or the command that prints them for a directory read on a machine (rows and code), each present when there is something to say; sources, what the document says it was made from, each with the text as written and, when it names a file of the mount, the file's path and the url of its bytes, and images, the pictures the document links to, each with its path and its alt text, empty when it has none (document packs). When there are no headings to list for a reason other than the file's own, unavailable says why: not_markdown, not_text, too_large or described_only, with the license for the last and the sourceUrl of the file where one exists; a Git LFS pointer is not_text with lfs, the size of the file the pointer stands for, and sourceUrl where the host serves it.

The optional overview describes a readable README of the current folder as { path, title, description }, with nullable title and description. An entry can carry an optional overviewPath. These introductions work without manifests, stay in their original language and open through the files endpoint. Their full text is not part of browse results or required skill context. Overview-only files do not add independent search results or document counts; format rules determine which README is selected and whether it has another discovery role.

GET /api/v1/find/<address>?query=&path=&cursor=&limit=

The search_repo tool's ranked search. query is text of at most 500 characters; path restricts the search subtree, defaulting to the mount. Without a query, or with a blank one, the answer is a listing and not a search: every skill inside the path, then the documents outside the skills, paged the same way, with no sections and no ranking. It is how a program lists a pack whole, which the tool does not do, since the tool takes no call without words. limit is 1 to 25, default 10, and bounds final results after folding. Use the browse endpoint for directory discovery.

A skill result carries its exact path, directory, name, description and translations, its license, and describedOnly: true when this mount only describes the skill (licenses). Matching supporting files are folded into the owning skill before pagination, with up to five matching file summaries and moreFiles for the rest. A skill occupies its best-ranked member's position, even when only a supporting file matched. Independent document results have canonical path, title and summary, and, with a query, sections: the sections of the document that matched, best first, each with its heading path, the offset and length that read it through the files endpoint, and an excerpt of the passage or null (sections in a search result). A document this mount describes without serving carries no sections. A document that is the README of its folder carries overview: true, since a map says a little of everything in its folder (sections in a search result). Results remain in relevance order across folders; linked-only references are not independent search results.

The words of the query are read with the rules of the pack's language, as the index was built (the words that match). Where the deployment offers the search by meaning, the sections nearest in meaning are fused with the words' results and the first results reranked (words and meaning), and the response carries ranking: meaning, whether the sections nearest in meaning took part or the words answered alone this time, reranked, whether the first results were reranked, and identifiers, present and true with both of the others false when the query was identifiers alone and was ranked by its words for that (ADR-0079), and embedding, present while the embedding of the index is going on, with how many documents are embedded so far of the total to embed. The field is absent where only words rank. The response carries the query, result items, diagnostics, resolved commit and nextCursor.

With a query, an item carries match where the search has something of it (how a result matches): strength, close where a layer of the search vouches for the result and loose where none does and one has grounds against it, absent where the search does not know; by, the layers the strength rests on, words, meaning and reranker; and the evidence, each number where the search has it: words, the share of the query's words the result holds where it is judged by them, from 0 to 1, similarity, the cosine similarity of its nearest section, and relevance, the reranker's score in the reranker's own scale. A program that judges by bounds of its own reads the evidence and not the strength. The field is absent from a listing and from an answer of a deployment older than it.

GET /api/v1/skills/<address>?path=&cursor=

The load_skill tool. path is required and is an exact canonical SKILL.md path. cursor continues that skill's context; names and directory aliases are not the canonical API.

The ready response names the commit the skill was read from, as every result does, and its skill contains:

  • path, directory, name, description, known front-matter fields, warnings and translations.
  • serving: the license the reader resolved for the skill (kind, name, source), whether the skill is served in full, and the sourceUrl of its manifest at the host. With full false the skill is described only (licenses): body is empty and the rules, files and references are absent.
  • ruleChain: applicable manifest bodies in repository-root-to-nearest order, with canonical source paths and fragment information.
  • body: the skill-body content on this page.
  • tableHead, when the page begins at a row of a table the page before cut: the first two lines of that table, for a reader that shows the page alone to write above the page's first text. It is not part of the text, and a reader that joins the pages leaves it out (tools).
  • pagesLeft, on a page of a skill read in more than one: in how many more pages the rest of the context is read, counted as they will be cut, and 0 on the last. A skill read in one page has none (ADR-0123).
  • Supporting-file paths, included-file information and canonical references for optional reads.
  • oversized, when present: the files of the skill over the read limit, each with its path, size and the sourceUrl of its bytes at the host; the files endpoint refuses them (format).
  • packReferences, when present: the files of other packs the skill, its rules and its included files link to by their skill URIs (format), each with the pack, an address without a ref, the path in it, the href as written and the source file that holds the link. The files endpoint answers the same field for the links of the page it returns. This mount serves none of them.
  • complete and nextCursor, indicating whether the context requires another call.

Context text is bounded to 16 KiB of UTF-8 per page: root-to-nearest rules first, then the skill body, then declared include files. Metadata and response structure add to that size. A page may contain only part of one rule or file and identifies the fragment; it ends between two blocks of Markdown where it can, as the tools say. Continue until complete before treating the skill as loaded. Missing required content leaves complete: false with a diagnostic; nextCursor is absent when pagination cannot repair the failure. Ancestor rules above the mount, and shared pages a skill includes from outside it (format), are delivered through these pages; their paths do not become general file-read permissions. Translations are for the page's visitor, not alternate skill identifiers or search aliases.

GET /api/v1/files/<address>?path=&offset=&limit=

The read_repo_file tool. path is a canonical file path inside the mount. offset and limit are character counts (limit 1 to 100,000, default 40,000). Reads do not wait for indexing: they return HTTP 503 with index.indexing or index.failed until the served set, including exclusions, is known. The references of a page are its links to Markdown files, each with the href as written, the repository-root path, its status and, where the link's fragment names a section of a file the mount can read, section, the offset and the length that read it with the sections under it (ADR-0082). All reading routes enforce ancestor exclusions and failed policy boundaries.

{ "kind": "file", "commit": "<the commit read>", "path": "marketing/docs/guide.md", "content": "...", "offset": 0, "nextOffset": null, "totalLength": 1234 }

A file page names the commit it was read from and never splits a character; the first page of a Markdown document carries sources, what the document says it was made from, as the outline does (the outline of a file). Use the browse endpoint for directories. Raw files do not add inherited rules or stand in for loading a skill. A file over the read limit answers 413 with file.too_large, and one that is not UTF-8 text 415 with file.not_text; both errors carry the sourceUrl of the file's bytes, the only place to get what this endpoint cannot carry: at the git host, at the raw route below for a pack of the deployment's directory, and, for a private repository of a git host, with a line on how its file is fetched (reading a file, ADR-0077). A Git LFS pointer answers 415 too, with the sourceUrl where the host serves the file.

MCP additionally bounds its complete serialized tool result and can return shorter pages than these REST limits. The byte budget and continuation behavior are defined in tools.

GET /api/v1/raw/<address>?path=

The bytes of a served file as they are, for what the files endpoint cannot carry (ADR-0077). path is a canonical file path inside the mount, one the index lists and serves under the license that governs it; anything else answers as the files endpoint does (file.not_found, file.not_served, request.invalid, index.indexing). For a pack served from a directory of the deployment the route sends the file from the disk, whatever its size, as application/octet-stream and an attachment (content-disposition), with x-content-type-options: nosniff and a content-security-policy that allows nothing and sandboxes the document, so that HTML or SVG of a repository never runs on the deployment's origin; cache-control: no-store. For a repository of a git host the route answers 302 to the file at the host and carries no bytes. The skillcdn command's HTTP server answers the same route for the directories it serves, and every result of that server names it as the source of a file. A read through the route counts as a read of the file, as a page of it does.

GET /api/v1/rows/<address>?path=&heading=&cursor=&limit=&format= and GET /api/v1/code/<address>?path=&heading=&cursor=&limit=

The tables and the fenced code blocks of a document, or of every document under a folder, as data (ADR-0080): what a program takes whole, where a model would otherwise read a table and write it again. path is a Markdown file or a folder, the mounted directory when left out; the documents and skills under a folder are read in path order, which is the order a set is read in. heading keeps what stands under a heading path that holds every word of it, as a word of its own and whatever the case.

rows answers status: "ready" with the commit, the path, the tables in reading order, each with the path of its file, the heading path of the section it stands in (empty before the first heading), its columns as the header row names them and its rows, each as many cells as there are columns, as written, with an escaped pipe as the pipe it stands for; rowCount, the rows of the page together; and nextCursor. A table that stands in several sections and files under the same header is several entries with the same columns, one after another. A page is whole files: it ends with the file in which it reaches limit rows (1 to 5,000, default 1,000), a million characters of cells, or 200 files read. With format=csv the page is one CSV (text/csv, RFC 4180): a header of path, heading and every column name of the page in the order they first appear, then a line per row; the cursor of the next page, when there is one, is in the x-next-cursor header.

code answers the same way with blocks, each with its path, its heading path, the language the block says it is written in (the first word after its opening fence, empty when it says nothing) and its text, the lines between the fences; limit is 1 to 500, default 100.

A file this mount describes without serving, a file over the read limit and a file that is not text are passed over. A path that names no Markdown document, and none under it, is 404 with file.not_found. Never waits for the index.

GET /api/v1/listing/<address>?cursor= and ?uri=

The skills extension as data (the skills extension), for a program that installs skills into an agent's own folder. Without uri, a page of the skills the mount lists, in path order, as skills/list lists them: each with its uri, its frontmatter as data and its resources, every served file of the skill directory with uri, digest (sha256: and 64 hex digits over the bytes a read returns) and size; nextCursor continues the page and total counts the listed skills. With uri, what one URI of the listing names, under item by its kind: a skill, with its entry, the assembled SKILL.md as document and the digest of it, which skills/get and resources/read answer over MCP; a file, with its mimeType, its text or its bytes as a base64 blob, and the digest the listing declared; or a directory, with the resources under it as resources/directory/read lists them. The answer names the commit it was read from. A URI that names nothing listed, or another repository, answers 404 listing.not_found; a skill the mount describes without serving is not listed and its URI names nothing (licenses). A skill asked for by its URI counts as a load of the skill, a file as a read of it.

GET /api/v1/search?query=&limit=

The search across every public pack the deployment serves (ADR-0070): what the search_packs tool of the deployment's root answers, as data. query is required, 1 to 500 characters; limit is 1 to 20, default 10. The answer is status: "ready" with the query, how many packs were searched, and items, each the canonical address of its pack (/gh/<owner>/<repo>), the repository as owner/name, what the pack is (kind: skills for a repository with a manifest and skills, documents for one with a manifest and no skill, repository for one read without a manifest; verified, whether the operator vouches for it; skills, how many it holds; and avatar, its owner's picture as the host serves it, empty for a pack at no git host), and the item in the shape of a find item, a skill or a document with the sections that matched, with match as the find route has it (ADR-0141); ranking as the find route has it, where the search by meaning is at hand, with words: false when the words of the query ran out of their time and the results are the nearest in meaning alone (ADR-0091): what only the words would find is then missing, the response is no-store, and asking again is answered in full. An answer by words alone because the meaning did not answer this time (meaning: false without identifiers) is no-store as well, and kept by nothing (ADR-0096). The packs searched are every public repository with an index, at the commit a mount of its default branch is served from, that the operator has not blocked and whose root manifest does not keep it out (search: { hub: false }, format). A result is shown where the git host showed its repository to be public within a day: where its last word is older, the host is asked before the result is shown, two seconds at most for all the results of an answer, and a repository it no longer shows to everyone, whose name it now gives to another repository, or that it cannot be asked about in time, has no result; an answer that left a result out for want of the host's word is no-store and kept by nothing, since the next may have it (ADR-0097). Never waits for an index: a pack is searched as it is served. The answer to a question is kept for the time the deployment configures and shared with whoever asks the same meanwhile, and the response says so to a cache in front (cache-control: public, max-age=60, s-maxage=<seconds>, stale-while-revalidate=<seconds>, or no-store where the deployment keeps nothing); an answer that holds an entry still waiting for its vectors is kept like any other, since it says nothing of how far an embedding is and the entry stands where its words put it (ADR-0126); only so many searches run at once (ADR-0075, deploy). 503 search.busy with retry-after past that; 503 search.timeout when neither the words nor the meaning answered in the time the deployment gives them; 404 on a deployment that has turned it off. The pages answer the same search at /search/<term>, rendered with its results.

GET /api/v1/featured

The addresses the operator selects for the explorer (the featured list of the admin API), with their repository metadata (the owner's avatar included), manifest introduction when available, whether the repository is verified, the image that stands for the address as on the mount (or null), index status, skill count and a few skill names. While the operator features nothing, the reference repository is featured (ADR-0028). Unresolvable addresses are omitted, and so is a repository whose index found no license (ADR-0026). There is no public enumeration of every indexed repository: asking for an address alone does not opt its author into a catalog, and the search across packs answers a question with what matched, listing nothing (ADR-0070).

GET /api/v1/owners/gh/<owner>?page=

The page of an account of the git host (ADR-0037), for any account, whether or not it ever signed in here, and the same for everyone who asks. Exists where the deployment has a git host to list from.

FieldMeaning
ownerhost, login as the host spells it, name and bio (or null), kind (organization or user), avatar, the url of the account's page at the host, and publicRepositories, the host's count.
indexedOn the first page only: the account's public repositories whose default branch this deployment has indexed and found skills in, most skills first, as the cards of GET /api/v1/featured. Read from the index; a repository is listed only while the host still shows it to everyone.
repositoriesA page of the account's other public repositories as the host lists them, most recently pushed first: address, name, description, fork, archived, stars and pushedAt (an instant, or null). What indexed shows is left out, on every page.
nextPageThe page to ask for next (1 to 100), or null.

Asking indexes nothing: a repository is indexed when somebody opens its address. Private and blocked repositories never appear, whoever asks. 404 with owner.not_found for a name the host shows no account for; 503 when the host cannot be asked.

GET /api/v1/showcase

The entries the front page leads with (the showcase of the admin API, ADR-0028), in order, and the organizations named beside them. An entry carries its id, the address it leads to, the link to the result itself (an https URL or a path of the deployment, or null), what that result is when it is an upload of the deployment (linkType, its content type, else null), whose work it shows (origin: pack or builder), its position, the width and height of its media, the durationMs and published date of its clip (null without one), media with a url and a type in each slot (poster always; clip, animation, reference, picture and social, or null), texts by language tag: title, body, tags, action, and requirement, clip, credit and the example conversation demo, or null; and cuts by language tag, the result cut in that language, each a link and media with clip, animation, poster and social, where null is the entry's own: a page in that language shows the cut's files in place of the entry's (showcaseCut in @skillcdn/core resolves them). An organization carries its id, name, url, logo (a url and a type) and position. items is empty until the operator writes an entry, and organizations until the operator writes one; the pages then show the build's own. link, linkType, origin, cuts and organizations are absent from an answer of a deployment older than them.

Media URLs are paths under /media/, named by the SHA-256 of the file: they never change, are served with cache-control: public, max-age=31536000, immutable and answer byte ranges. Anything else under /media/ is 404.

GET /api/v1/legal/<kind>

A page of the deployment's own (ADR-0029): terms or privacy, as the operator wrote it through the admin API. The document carries its kind, the revised date (YYYY-MM-DD, or null) and texts by language tag, each a title and a body in Markdown. 404 with legal.not_found for a page that has not been written, and for any other kind. The pages themselves are served at /terms and /privacy, rendered with the document.

Serving an agent from a program

A program that gives an agent what MCP gives it, a console, a command-line tool, a job, reads the same index through these routes, with a token where the repository is not public (authorization). The API carries data and no prose for a model: there are no connection instructions and no prompt here, and what an MCP client passes to its model (tools) is for the program to say in its own words. It need not find them: packages/core builds every body of these routes from the reader's results (mountBody, browseBody, findBody, skillOutcome, fileBody, listingBody, listedBody) and reads each back as the result it was made from (mountSummaryOf, catalogStateOf, browseResultOf, findResultOf, skillResultOf, fileResultOf, directoryResultOf), and joinSkillPages makes one skill of its pages, so that a program renders the text an MCP client's model is given, with the same functions the MCP endpoint renders it with (renderInstructions, renderBrowseResult, renderFindResult, renderSkillResult, renderFileResult). @skillcdn/client is this API as typed functions, with a token sent to one origin and no redirect followed (ADR-0056); the skillcdn command is such a program. A deployment counts a read through these routes as it counts a tool call, under the route as the subject (rest/mounts, rest/browse, rest/find, rest/skills, rest/files, rest/listing, rest/rows, rest/code, rest/raw), the first page of a skill as a load of the skill and the first page of a file as a read of it, and the client by the product token its User-Agent begins with (skillcdn-cli, curl; browser for any browser), as usage statistics says.

Over MCPOver RESTWhat to give the agent
Connecting: the server's instructions and infoGET /api/v1/mounts/<address>The pack's name and description (the manifest's, else the README summary, else the host's description), the mounted path and the commit, the counts, the folder overview and the diagnostics. The instructions MCP renders on connect are made from this overview, within 2,000 characters (connection and prompt).
browse_repoGET /api/v1/browse/<address>?path=&cursor=&limit=The entries with their canonical paths, skill folders marked, counts, and the folder's overview to read on demand; for a file, its outline, each heading with the offset and length that read its section.
search_repoGET /api/v1/find/<address>?query=&path=&cursor=&limit=The results in relevance order, a skill with its matching files folded under it, a document with the sections that matched and what reads each, and describedOnly where a license keeps the content at its source. Words in the pack's language, and meaning where the deployment offers it, with ranking saying which took part.
load_skillGET /api/v1/skills/<address>?path=&cursor=The ruleChain from the repository root to the nearest manifest, then the body, then the included files, in that order and each labeled by its source, as loading a skill lays them out. Follow nextCursor until complete before giving the agent the skill, never a page alone. A skill with serving.full false is described only: its name, description, license and sourceUrl, and nothing else.
read_repo_fileGET /api/v1/files/<address>?path=&offset=&limit=The text, continued at nextOffset, with the document's sources on its first page; a directory listing for a folder; the sourceUrl of what cannot be carried, which GET /api/v1/raw/<address>?path= sends or sends the reader on to. The source SKILL.md as written, never a skill load.
none: a table or a code block wholeGET /api/v1/rows/<address>?path= and GET /api/v1/code/<address>?path=The tables under a path as JSON or CSV, the code blocks as JSON: what a program is given instead of a model copying them out. The outline of a document names the two for it.
The use_skill promptnoneA convenience of MCP clients. A program starts loading a skill by its path.
The skills extension: skills/list, skills/get, resources/read and resources/directory/readGET /api/v1/listing/<address>?cursor= and ?uri=The listed skills with their files and digests, a page at a time; one URI of the listing: a skill with its assembled SKILL.md, a file as text or bytes with its digest, or a directory's entries. What a program that installs skills into an agent's own folder reads, checking each file against its digest (listing).

What the program tells the agent is what the tool descriptions tell a model (inputs, indexing and trust): content paths start at the repository root and are the only identifiers, a cursor continues one listing and is not reusable, every result names its commit and a moving ref may move between calls, and the content comes from the pack's author, under its license and with its provenance notice until the repository is vouched for. A program that holds a token sends it with every request, keeps it where passwords are kept and prints it nowhere; what it reads from a private repository is that person's for the staleness bound, so it shows it to that person's agent and keeps no copy beyond the request.

People

Present only on a deployment where people sign in (permissions); elsewhere these paths are 404. Signing in and out are navigations under /auth/, described there. Everything here is no-store.

GET /api/v1/me

{ "user": ... }: who the session cookie says is signed in (host, login, name or null, avatar), or null for nobody. Nobody is an answer, not an error; the pages ask this once to decide what the header shows.

GET /api/v1/me/repositories

The repositories the person can reach through the git host's app, by where it is installed: installUrl (where the app is added to an account or to repositories at the host, or null), and installations, each with its account (login, kind, avatar), manageUrl (or null), selection (all or selected), its repositories (address, owner, name, description, visibility) and whether the list is truncated. The answer is the host's, asked with the person's own token, and bounded: a long list is cut and says so, and the rest opens by address. 401 with auth.required for nobody, and also when the host no longer accepts the person's sign-in, which signs them out.

GET /api/v1/me/grants and DELETE /api/v1/me/grants/<id>

The apps the person allowed to read an address as them: items, newest first, each with its id, the client (name, and uri or null, both the client's own word), the address, createdAt and lastUsedAt (or null). Deleting one ends it at once, with every token under it; it must come from the deployment's own pages.

GET /api/v1/me/tokens, POST /api/v1/me/tokens and DELETE /api/v1/me/tokens/<id>

The tokens the person made for agents that have nobody to sign in (permissions). Listing answers items, newest first and without those that expired, each with its id, the address of the repository it reads, the label its maker gave it, createdAt, expiresAt (null for a token made without an end, ADR-0060) and lastUsedAt (or null), and limit, how many a person may hold. A secret is on no list.

Making one takes { "address": "/gh/<owner>/<repo>", "label": "...", "expiresInDays": 1..366 or null } from the deployment's own pages and answers 201 with { "token": "scdn_repo_...", "item": ... }: the secret, this once. 400 with token.invalid for a body that is not that (the label is one to sixty characters), with token.not_a_repository for an address with a ref or a path, and with token.public_repository for a repository everyone reads; 404 with mount.repo_not_found for a repository the person cannot open, the same as for a name that is nothing; 409 with token.limit when they hold as many as one may; 503 when the git host could not be asked. Deleting one ends it at once, and answers 404 with token.not_found for a token that is not theirs.

GET /api/v1/me/index/<address> and POST /api/v1/me/index/<address>

What the person signed in may ask of a repository's index, and the asking (ADR-0064). Reading answers { "administers": true | false }: whether the git host, asked as the person, says they administer the repository. Asking, from the deployment's own pages, queues the repository to be indexed now and its documents embedded ahead of everything else, for a repository that is not public as well, and answers 202 with { "queued": true }, or false when the same address waits in the queue already; the address names a repository, with a ref at most. 401 with auth.required for nobody; 400 with index.not_a_repository for an address with a path; 404 with mount.repo_not_found for a repository the person cannot open, the same as for a name that is nothing; 403 with index.not_administrator for someone who reads the repository without administering it; 503 with index.unavailable where the deployment runs no worker, and with mount.unavailable when the git host could not be asked.

GET /api/v1/oauth/request?request= and POST /api/v1/oauth/decision

What the consent page asks and answers (permissions). The first describes a sealed authorization request: the client (name, uri, the redirectHost its answer goes to, which is the host of a web address or the scheme of an app's own link, and whether that is loopback, an app on the person's own computer), the address, the scope, the user who would be agreeing (or null), whether that person can see the repository right now (visible: true, false, or null when nobody is signed in or the host could not be asked; a repository that does not exist is the same false), and installUrl. The second takes { "request": "...", "approve": true | false } from the signed-in person, from the deployment's own pages, and answers { "redirect": "..." }: where the browser goes with the answer. 400 with oauth.invalid_request for a request that has expired. An approval is taken only for an address its person can open: 403 with oauth.not_visible otherwise, the same for a repository that is not theirs and for a name that is nothing, and 503 with mount.unavailable when the git host could not be asked. A refusal is always taken.

POST /api/v1/connect, GET /api/v1/connect/<code>, POST /api/v1/connect/<code>/decision and POST /api/v1/connect/claim

How a command gets a repository token without anyone seeing it (permissions, ADR-0059). The command begins with { "address": "/gh/<owner>/<repo>", "agent": "..." }, as nobody, and is answered 201 with the code to show a person, the url of the code's page, the secret it claims with, expiresAt and intervalSeconds. The person, signed in, reads the request under its code (agent, address, expiresAt, approved, user, visible, installUrl) and answers it from the deployment's own pages with { "approve": true, "label": "...", "expiresInDays": n or null } or { "approve": false }, answered { "status": "approved" | "denied" }. The command claims with { "secret": "..." } and is answered { "status": "pending", "expiresAt": "..." } until the person approved, then once { "status": "connected", "token": "scdn_repo_...", "item": ... }, the item being what the person's token list shows. The refusals are the token form's (token.not_a_repository, token.public_repository, mount.repo_not_found, token.limit) and the connection's own (connect.invalid, connect.not_found, connect.busy). Everything here is no-store.

GET /social/<address>?lang=&skill=

The social preview of the page of an address (ADR-0032): a 1200 by 630 PNG the server draws with the owner's picture, the name, the address, the description and a few facts, in the language lang names (else the one the request asks for, with vary: accept-language), and for the skill at the canonical SKILL.md path skill names when given. The page of an address names it as its og:image. Asking for it resolves the address and starts indexing it, as asking for the page does; a card drawn before the index is ready says less and is drawn again once it is. A crawler or a link preview, by its User-Agent, starts nothing: it is drawn the card of what is indexed, and gets 404 for a repository the deployment has not read (ADR-0074). 404 for an address that is nothing, a repository that is not public (a card is drawn for whoever a link is sent to), a skill that is not there, or a deployment without the web UI. Answered with cache-control: public, max-age=3600, an ETag, and byte ranges.

GET /social/docs[/<page>]?lang=

The social preview of a page of the documentation, or of its index without a page (ADR-0049): the same card, drawn from the words the build writes for the page, with the site's symbol where an owner's picture would be, in the language lang names (else the one the request asks for, with vary: accept-language). 404 for a page that is not one, or a deployment without the web UI. Answered with cache-control: public, max-age=3600, an ETag, and byte ranges. The pages themselves, /docs and /docs/<page>, and the Markdown beside each, /docs/<page>.md, are files of the web build, not routes of the API.

GET /badge/<address>

The badge of an address, for the README of its repository: an SVG 20 pixels tall with the symbol, the name of the service and how many skills the address serves (12 skills), or indexing until the index is ready and unavailable when it failed. Asking for it resolves the address and starts indexing it, as asking for the page does, unless a crawler asks, which gets the badge of what is indexed and 404 for a repository the deployment has not read (ADR-0074). 404 for an address that is nothing or a repository that is not public (a badge is shown to whoever reads the README). Answered with cache-control: public, max-age=3600 (max-age=60 until the index is ready), an ETag, and byte ranges. In a README, linked to the page of the address:

[![SkillCDN](https://skillcdn.ai/badge/gh/<owner>/<repo>)](https://skillcdn.ai/gh/<owner>/<repo>)

The badge carries the symbol; the trademark policy allows it, as served, for a repository the deployment serves.

GET /icon/<address>

The icon of the MCP server of an address (tools): the owner's picture as the git host serves it, 128 pixels square, fetched without credentials and served on from this origin, because a client fetches a server's icon from the server's own origin and from nowhere else. Served only when the bytes are a PNG, JPEG, GIF or WebP by their own first bytes, whatever the host said; 404 otherwise, for an address that is nothing or not public, and for a crawler asking about a repository the deployment has not read, which is not asked of the git host (ADR-0074). Answered with the image's type, cache-control: public, max-age=86400 (an account's picture rarely changes), an ETag that names the account and the size, and byte ranges.