MCP server
Oak runs a Model Context Protocol server at https://oak.space/mcp for clients that connect to a URL, like Claude's connectors. Agents that can run shell commands usually do better with the CLI and the bundled skill (oak skill install; see Working with agents).
Endpoint
The endpoint is https://oak.space/mcp. It uses the Streamable HTTP transport and answers each request with one JSON response; there are no sessions or server-sent streams.
Connecting
In Claude (claude.ai or the desktop app), open Settings → Connectors, choose "Add custom connector" and enter the URL. In Claude Code:
claude mcp add --transport http oak-space https://oak.space/mcp
then run /mcp in Claude Code to sign in. Other clients that support remote servers with OAuth take the same URL.
Signing in
The first time a client connects, it opens an Oak page that asks whether to allow it. After you click Allow, it can read what your account can read.
The page also has an "Allow changes" box, off by default. Off, the client can't change anything. On, it can also do what your account can do with the tools listed under Changes: set branch descriptions, write mark logs, create and move marks, and, where you're an admin, edit path rules and groups. It can't push files or delete repositories. A second box, "Allow merging", lets it merge branches too.
Allowing a client adds an API key named after it to Settings → API keys: "Claude (connector)" for reading, "Claude (connector, can change)" with changes allowed, "Claude (connector, can change and merge)" with merging too. To disconnect the client, or to take changes away, remove that key and connect again. A client that can't do OAuth can send any Oak API key or oak login token instead, as an Authorization: Bearer header. A read-only key gets the reading tools only.
Every tool calls the Oak API with that key, so groups, path rules, hidden branches and private repositories apply exactly as they do for the CLI. Folders you can't read are left out of every answer, names included, and so are commits that changed them.
Tools
Repositories are written owner/name. Where a tool takes ref, it is a branch, a mark or a commit hash, and defaults to main. A unique prefix of a hash works too, from 7 characters. A name that is both is the branch first, then the mark. Long answers are cut short with a note saying how to ask for the rest.
An answer is at most about 80 KB, or 256 KB when you ask for more with max_bytes. A longer one has patches or the ends of lists left out, with truncated and a note saying how to ask for the rest. oak_log takes path, for the commits that changed a file or folder, and files false to leave out each commit's file list.
Repositories and files:
oak_whoami: the account the connection acts asoak_repo_list: your repositories, with a namequeryand paging;include_publicadds other people's public onesoak_repo_show: one repository's description, visibility andmainheadoak_ls: the files and folders in a folderoak_cat: a file's contents, in line ranges for long files. A line too long for one answer is cut, andstart_bytereads the rest of it
Branches and history:
oak_branch_list: open branches (or closed ones, merged ones included, withstatus) and the start of their descriptions, a page at a timeoak_branch_show: one branch with its full descriptionoak_events: what happened to the repository's branches (branch.created,push,merge), in order. Keepnextand pass it asafterto hear only what is new. Moves of marks are inoak_mark_moves, and webhooks call you insteadoak_diff: what a branch changes, with patches: the same changes its page showsoak_compare: what changed between any two refs, with patches: fromserver-prodtomain, for exampleoak_merge_preview: whether a branch would merge cleanly now, and which files would conflictoak_log: a branch's history, newest firstoak_commit_show: one commit, its changed files and every mark's log at it
oak_diff and oak_compare return patches, and oak_commit_show does with patch. They take path, for one file or folder, and max_bytes; max_bytes 0 lists the changed files without patches.
Marks:
oak_mark_list,oak_mark_show,oak_mark_movesandoak_mark_log: the repository's marks, their moves and their logs. Moves and logs come newest first;beforetakes the last answer'snext_beforefor older ones
Access:
oak_repo_access: groups and people with access to a repositoryoak_path_rules: a repository's path rules, or the one that governs a given pathoak_org_list: organizations you belong tooak_org_show: one organization and its membersoak_group_list: an organization's groups and their members
Pages:
oak_page_list: Pages sites of a repository, an organization or a useroak_page_show: one site with its recent deployments and each custom domain's DNS status
Changes
Only on connections allowed to make changes. Each one is checked by the API as the same request from the CLI would be.
oak_branch_describe: replace an open branch's descriptionoak_merge: merge a branch intomain, with merging allowed.headrefuses if the branch has moved since you lookedoak_mark_log_write: write a mark's log at a commit (what was done with it there)oak_mark_createandoak_mark_move: create a mark, move it forwardoak_path_rule_create,oak_path_rule_updateandoak_path_rule_delete: edit path rules (admins)oak_group_create: create a group (admins)oak_group_member_addandoak_group_member_remove: change a group's membersoak_group_repo_grantandoak_group_repo_revoke: give a group access to a repository, or take it away (admins)