MCP server
Use this when: you want to call your AgentSky agents from a Model Context Protocol client — Claude Desktop, Cursor, Zed, or any MCP-compatible host.
Don't use this when: you are building an application that calls agents directly via HTTP (use the Agent API instead). MCP is for connecting an agent to another agent or tool host, not for building your own product on top of agents.
AgentSky exposes your agents as tools over the Model Context Protocol. Remote MCP clients can use the same agents, sessions and scopes as the REST routes.
- Server URL:
https://api.agentsky.dev/v1/mcp - Transport: Streamable HTTP. Every call is answered in one JSON body; there is no server-side session to resume.
- Auth:
Authorization: Bearer ast_…— an API key from Developer → API keys, orsky auth login. Clients that only speak OAuth can sign in instead - Scopes:
readlists and reads;writealso starts sessions and sends messages
Tools
| Tool | What it does | Scope |
|---|---|---|
list_workspaces | All workspaces you belong to: slug, name, role, is_personal, is_current. Pass a slug as workspace to any list or create tool | read |
describe_workspace | What the workspace has and what you may do there, read live: agents, company skills, routines and their triggers, installed connectors and their tools, policies, remaining budget, your role and route groups, each with a one-line usage example. Optional workspace | read |
help | Help generated from the server's own API document: without topic, the topics; with one (routines, sessions, connectors/<kind>, workflow, …), its operations, required fields, a skeleton body and a usage line. Optional workspace | read |
list_agents | Your agents in the workspace: id, name, harness, model, session count. Optional workspace | read |
list_sessions | Sessions, newest first; agent_id narrows to one agent. Optional workspace | read |
get_session | One session and its status: provisioning, idle, running or terminated. Workspace derived from the session | read |
start_session | Start a session with an agent (an id, or a catalog @handle) and send the task as its first message; requires an idempotency_key and returns the session, the message_id and the cursor just after it. task_id joins an existing task (workspace derived from it; omit workspace); budget_cents caps what the session may spend; model runs another model than the agent's own. Optional workspace | write |
send_message | Send the next message into an idle session, with optional uploaded files; requires an idempotency_key. Workspace derived from the session | write |
interrupt_session | Abort the session's in-flight turn, as the Stop button does; on a chat that runs on your Mac it stops it there, for a key paired with that Mac | write |
update_thread | Rename, pin, archive or mark a thread read or unread, as the rail's row menu does | write |
read_session_secrets / save_session_secret | A conversation's secret names; save a credential the person gave you in that conversation's own vault and get the reference to send instead of the value | read / write |
interrupt_thread | Stop what a thread's agents are doing, as its Stop button does: every agent, or one column_id | write |
get_thread_options / start_thread / send_thread_message | What a new thread can start on; start a thread with one agent or several side by side (request_id makes a retry safe); send one message to every agent of a thread or to column_ids (delivery_id names the send) — the web composer | read / write |
add_thread_agent / remove_thread_agent / fork_thread | Add one more agent beside a thread's others, take one out (its session stays), or continue one agent's conversation in a thread of its own — the thread's column menu | write |
search_threads / list_joinable_threads / join_thread | Search the words of your conversations; the teammates' and shared threads you can open; open one by its session_id | read / write |
pick_comparison_winner | Record the winner of a side-by-side comparison, or outcome tie / both_bad | write |
list_projects / remember_project | The GitHub repositories a new thread can start on with the remembered choice, and remembering one (or null) for the next thread | read / write |
open_sky | Open your Sky without sending anything, making it on first use | write |
open_tracking_board / start_tracking | Open your own or the team tracking board, making it on first use; start a board about one scope | write |
set_session_access | Make a session private or workspace-visible, edit its viewers, and share the owner's logins with it; the owner only | write |
request_mac_reach | Ask one of your Macs to lend a folder, browser, Chrome tab, screen or its apps; the owner's Mac permission mode applies | write |
take_back_mac | Revoke a lent Mac mount | write |
read_session | That message's replies after the cursor, one page at a time; with wait_seconds (up to 50) waits until the turn's idle mark. Workspace derived from the session | read |
search_context | The one search over everything you can open in the workspace (chats, traces, memory and notes, artifacts, files, meeting notes, skills, agents, help). query is plain words, "exact phrase" or /regex/ (every matching line, with its path and line); scope narrows to a folder such as skills/review/; a page at a time (nextCursor → cursor). Optional workspace | read |
read_context | Read a search_context hit in full: pass its ref unchanged; nextOffset → offset continues a long message | read |
collect_result | What a session produced: its last reply, the task files it wrote, and the task_id they live in. Workspace derived from the session | read |
switch_model | Change a session's model, thinking level or both; its next turn uses them and the conversation and files stay. Workspace derived from the session | write |
set_permission_mode | Set a cloud chat's permission mode: ask holds each tool call for the person's approval, allow allows all. It can make the agent's own setting stricter, never looser. Owner only; Ask works on Claude Code and Codex | write |
hand_off_session | Switch the agent and engine that take this session's next turn (agent_id, an id or @handle; message, that turn), optionally on a chosen model and thinking level, in the same session: the same engine continues its native conversation, another one gets a written summary of the conversation and memory. An engine with no run-scoped execution (anything but Claude Code, Codex, OpenClaw and Pi) is refused with harness_unsupported. Requires an idempotency_key; returns the completed handoff | write |
fork_session | Fork a session into a new one on an agent (agent_id, an id or @handle), optionally up to a completed reply (last_message_id) and on a chosen model and thinking level; the original stays as it is. Requires an idempotency_key; returns the operation to poll with get_handoff until target_session is ready | write |
continue_on_computer | Move an idle Claude Code or Codex session you own onto your own computer: its exact conversation (and its workspace, where carried) is exported for download. On that computer sky session continue-here or AgentSky for Mac restores and resumes it. Until a computer downloads it, a new cloud message cancels the move; after that the session takes no cloud turns until return_to_cloud. Requires an idempotency_key; returns the handoff | write |
return_to_cloud | Bring a session continued on your own computer back to the cloud; it takes messages again from where the cloud last left it, and anything done on the computer since stays there | write |
get_handoff | Where a handoff stands; once completed, target_session is the session to continue with | read |
get_cloud_copy | What is kept in the cloud for a chat synced from your own computer: its working folder and native session, so continuing it in the cloud needs no computer | read |
stop_session | Archive a session you are done with; its transcript, files and artifacts stay. Workspace derived from the session | write |
list_session_ports / expose_session_port / open_session_port | A session's exposed local servers; expose a port at its own origin (private or public); a one-minute entry link for a private port — the session's Ports panel | read / write |
stop_session_browser | Stop a session's browser and release it; the agent's turn goes on (interrupt_session stops that) | write |
take_over_session_browser | Ask the person to take over the session's cloud browser (an optional reason is shown to them); over MCP it never takes the browser itself and answers asked: true | write |
hand_back_session_browser | Hand the session's cloud browser back to the agent; only the person holding it may (not_holder for anyone else); the agent is told in the chat and carries on | write |
ask_side_chat | Ask one question about a session's conversation, answered beside it and never sent to its agent — the web's Side chat | write |
search_catalog | Every agent you can start, by @handle, with what it does, its categories, pricing and requirements. Optional workspace | read |
get_catalog_agent / publish_catalog_listing / unpublish_catalog_listing | One catalog agent by handle; list one of the workspace's agents under a @handle (409 handle_taken); take a listing down, the agent untouched | read / write |
list_tasks / get_task | Your tasks and what each is waiting on; one task's sessions, open requests and cost. list_tasks accepts optional workspace; get_task derives workspace from the task | read |
set_task_completion_answer / dispute_agent_fee | Say whether a task did the job (did_the_job, replacing an earlier answer); dispute a paid agent's fee within 72 hours of the task's first result | write |
read_task_story | Everything that happened in one task, each entry with who did it: messages by person and agent, the agents' tool calls, helpers and handoffs, requests and answers, mentions, file versions, artifacts and comments, connector calls (named by the person whose turn made them), meetings, the task's work graph events by their own kind (connector and context results with a link to the stored reply, stored files, GitHub pull requests and checks), and each session's cost. No size limit: cursor reads the next page, order asc from the start or desc from now. by_session lets task_id name any session of the task | read |
read_timeline_day | One day of what your own Mac recorded, as stretches of work or time away, with the day's pauses and digests. Pass date and tz; each stretch's raw range goes to search_events. Only your own key reaches it. | |
read_timeline_pause | Whether your work timeline is paused now, since when and until when. | |
pause_timeline | Stop recording your work on every Mac of yours, until resume_timeline or a time you name in until. Nothing they send is stored meanwhile. | |
resume_timeline | Start recording your work again on every Mac of yours. | |
read_work_digest | Short summaries of your own recorded work, one per hour or local day, newest first: what you worked on and where, decisions, outputs and tasks. Read it before searching the raw log; every activity cites event ids that read_event opens, and raw is the search_events query for the window's original records. | |
read_task_graph | The task's events and inferred cross-thread associations, each with confidence and exact object evidence. Follow next_cursor; source permissions still apply | read |
correct_task_link | Confirm, remove or move an association in your task view. Use expected_version from the graph, or 0 before its first correction. Moving stays within the same workspace; source permissions do not change | write |
find_task_email_threads / attach_email_thread | Search the person's Gmail (or a Gmail a teammate shared with the task's workspace) for a thread, and keep one in the task's files as plain text; the story names who attached it. Read-only on Gmail; each read is a billed connector call | write |
list_task_files / read_task_file / write_task_file | A task's shared folder, as text up to 256 KiB per file. Workspace derived from the task | read / write |
request_artifact_adoption / read_artifact_adoption / prepare_artifact_adoption / proof_artifact_adoption / verify_artifact_adoption / cancel_artifact_adoption / cancel_source_artifact_adoption | Inactive legacy artifact owner handshake. Requires the actual owner's unrestricted write bearer, including read/proof. Request → prepare → verify establishes provenance only; cancel canonical before cancel source. No content transfer or activation | write |
list_artifact_adoptions / read_artifact_upgrade / advance_artifact_upgrade / cancel_artifact_upgrade | Upgrade one older consumer file with one repeated call: check the gate, run each idempotent step until active, or cancel before copying finishes. A complete copy cannot be undone, so copying needs accept_one_way. | |
read_artifact_activation / prepare_artifact_activation / import_artifact_activation / revisions_artifact_activation / activate_artifact_activation / cancel_artifact_activation | Explicit owner-only legacy cutover. Import one retained raw revision per call until imported; then source-forward and activate the same request. Imported is a one-way boundary; default-off starting gate does not block exact recovery | write |
original_source_artifact_activation | Exact retained raw revision during activation, bound to source/target/request/version. MCP returns binary metadata; use sky artifact activation source-original or REST for bytes | write |
prepare_source_artifact_activation / proof_source_artifact_activation / history_source_artifact_activation / forward_source_artifact_activation / cancel_source_artifact_activation | Original source fence and bounded retained history, same unrestricted owner bearer. No second content writer or source fallback | write |
list_adopted_artifacts | Explicit active adopted-file discovery with real current grants, SQL pagination, live total, row/next cursors and scope/visibility/name/kind filters. Shared URL grants do not expand discovery; task listing stays separate | read |
read_artifact_resource / read_artifact_original | Explicit task/adopted owner metadata and exact original raw endpoint. Task shape stays unchanged; adopted shape declares consumer_adopted and null task_id. MCP reports binary metadata; use REST or sky artifact original for bytes | read |
prepare_artifact_content / read_artifact_content_request / commit_artifact_content / close_artifact_content_request | Exact UUID/base/hash/size raw-byte mutation and recovery. Current policy/edit/base and source claim are rechecked. Uncertain responses recover the same request; no silent rebase or duplicate charge | read / write |
reserve_source_artifact_content / claim_source_artifact_content / settle_source_artifact_content / close_source_artifact_content | Original source admission owner verifies the exact canonical eligible purpose. Claimed capacity stays charged until actual canonical generation reclamation | write |
read_artifact_reclamation / reclaim_artifact | Actual retired owner-only exact UUID reclamation and progress. Close pending work, delete/check real canonical objects, then release original source admissions. Unknown deletion retains capacity; both operations require write scope | write |
read_artifact_policy / change_artifact_policy | Actual owner-only policy read/change; exact UUID/current policy and content bases. Preserve workspace incarnation, independent alias grants and common public pin. Ordinary readers cannot inspect policy; public links never grant discussion | read / write |
list_artifacts / publish_artifact / share_artifact | Published results from a task, and their public link. list_artifacts accepts optional workspace (or task_id); the others derive workspace from the task or artifact | read / write |
list_artifact_comments / add_artifact_comment | Private artifact feedback: read roots and replies; append text at the viewed base_version, optionally replying with parent_id. Does not publish or start an agent. After an uncertain write response, read before resubmitting | read / write |
set_artifact_thread_resolution | Resolve or reopen a root with current base_version and base_resolution_version (0 when absent). Same-state requests preserve metadata; stale transitions return 409. Replies inherit root state | write |
list_browser / share_browser / stop_sharing_browser | Your saved browser (yours in every workspace) with its sites and whom you shared it with, plus the browsers shared with you here; share it with one member (user_id) or everyone here, for every site or only sites; stop a share by its id. Never returns cookies, passwords or stored state. Optional workspace; not with a workspace key | read / write |
remove_browser_site | Sign your saved browser out of one site, in running sessions too | write |
open_browser_tabs | Open pages in the browser of a session you own, at once or at its next start. Where browser sync is on for the workspace. | |
import_artifact | Bring in a file (file_name and content_base64, up to 16 MiB) or a public https page (url) as a new artifact, its original as version 1's file in a task's folder. No task_id uses the person's own imports folder | write |
export_artifact | An artifact's bytes in one of its export_formats, up to 16 MiB, as an embedded resource; format zip or none is every file as one archive | read |
convert_artifact | Make a Markdown, Word or PDF artifact into a page as its next version; restoring the earlier version undoes it | write |
save_artifact_file | Save one file of a published artifact as its next version: content text, content_base64 bytes, or restore_version, against the base_version you read. A newer version is refused with a conflict; identical content makes no version. Design systems use save_design_system_file | write |
update_artifact / copy_artifact | Rename a published artifact, or copy one version of it into a new artifact in the same task or a task of another workspace. | |
read_artifact_file | One text file of a published artifact. list_artifacts with kind: "design_system" lists the workspace's design systems; read one's project/README.md before designing with it | read |
import_design_system / save_design_tokens | Import a design system's file table into a task and publish it; save its whole tokens.json as the next version against the base_version you read | write |
save_design_system_file | Save one of a design system's editable_files (its brand book project/README.md, guidelines, tokens) with new content, or restore it from an earlier version, as the next version against the base_version you read | write |
buy_credit | Add 10, 20, 50 or 100 dollars of credit to your own balance: card charges the saved card; alipay or wechat_pay returns a checkout_url the person opens and pays. request_id never charges twice. Not with a workspace key | write |
get_billing / set_auto_topup / start_card_setup / claim_credit_invite | Your balance split into purchased and bonus credit with the latest payments; turn auto top-up on or off and set its threshold and amount; a hosted link to save a card; redeem a credit invite code — Billing | read / write |
list_api_keys / create_api_key / reveal_api_key | Your own API keys; create one (its secret is in the answer); read a key's secret again. The person's own admin key, not fixed to a workspace | admin |
delete_workspace | Permanently delete a workspace you own and everything in it; confirm must repeat the slug. Sessions are stopped and the wallet's credit goes back to you. Not your default workspace; not with a workspace key | write |
answer_request | Answer a question, approval or connection a task is waiting on. Workspace derived from the task | write |
list_reflection_proposals / decide_reflection_proposal | Skill and lesson changes suggested after finished tasks (default: pending), and approving (decision: "approve", writes it for the workspace) or rejecting one. Owner or admin decides. Optional workspace | read / write |
get_goal / set_goal / clear_goal | A session's standing goal: an objective (with optional criteria, each text or {text, command}) the session keeps working toward on its own, checked after every turn, within max_iterations, max_spend_cents and max_minutes. The writes need an idempotency_key. Workspace derived from the session | read / write |
list_plugins / get_plugin | Everything the agents can use as one list of plugins (GET /plugins?view=…): view yours (added, off or needing the person) or discover (everything that can be added), optional q, use and cursor; each plugin is an app, tool, chat app, plugin bundle (a skill pack, which people add in Plugins › Skills; use: "skills" lists packs and skills), skill, MCP server, browser login or Mac feature with its provider, price, status and what it gives agents. get_plugin takes a plugin_id (app:gmail, bundle:review-kit, …). Without view, list_plugins answers the installed plugin bundles as before | read / read |
install_plugin / uninstall_plugin | Claude Code plugin bundles in the workspace (RFC-0155): install_plugin takes source (github:owner/repo[/path][@ref] or a github.com URL) and installs or updates its skills and commands as workspace skills every new session gets, answering the connectors it uses and which to connect; uninstall_plugin takes the bundle's name | write / write |
update_plugin / start_plugin_session / set_plugin_policy / list_plugin_marketplaces / add_plugin_marketplace / remove_plugin_marketplace | RFC-0155 phase 2: update_plugin switches a plugin on or off; start_plugin_session starts a session with only that plugin's skills and MCP servers, its calls to connected apps limited to the apps the plugin declared; set_plugin_policy (owners and admins) marks it recommended, default (installs it) or blocked; the marketplace tools browse and manage the workspace's Claude Code marketplaces. install_plugin also takes mcp_tokens | write / write / write / read / write / write |
list_routines / create_routine / run_routine / delete_routine | Agents on a schedule: each fire starts a new session of agent_id or sends message into session_id, on a 5-field cron in timezone or only when run_routine fires it; budget_cents caps each run. A routine whose paying wallet is empty pauses itself after three failed runs (paused_reason). run_routine needs an idempotency_key; delete_routine removes one for good. Optional workspace on list and create | read / write |
get_usage | Your balance, whether a card is saved, and what you spent across sessions and API keys over UTC days from–to grouped by group_by; with session_id, that session's totals and newest entries | read |
share_session | Turn a session's share link on (view_only for a read-only link) or off; returns share_url. Workspace derived from the session | write |
get_session_share / rotate_session_share | A session's share link (token null when off), and replacing it with a new one at the same access level; the owner only | read / write |
send_link_message / interrupt_link | Send a message or stop the turn through a guest share link's token, as the guest page does; billed to the session's owner | write |
list_session_people / read_session_presence | Everyone who may send a session turns (the people a turn can name with @, by name or email local part, and the people it can be assigned to), and who has it open right now | read |
assign_session | Assign a session to one of its people (user_id from list_session_people), or clear it with null; they see it waiting on them and are notified — the thread's "Assign to…" on the web and the Mac | write |
list_notifications | Your latest notices, at most 20 from the last day or after after | read |
read_session_threads | The threads of a session's task: root first, then helpers, handoffs and children, each with its agent, model, status and spend. Workspace derived from the session | read |
read_session_record | The human decisions (adopted, rerun, revise, discard, vote, did_the_job, approve) and observed outcomes (pr_merged, deployed, reopened, later_failure, shipped) recorded about a session's result. Empty means nobody decided yet | read |
read_agent_performance | Decisions, outcomes, spend and undecided count for every harness and model the caller's sessions ran on, over a since–until range (default last 30 days). A read model rebuilt from the session record | read |
help_search / help_get | Search the AgentSky Help Center in English or Chinese, then read one article by its slug; answer with the article's link, agentsky.dev/help/<slug> | read |
update_agent / archive_agent | Change an agent's name, description, prompt, instruction files, custom data, engine, model or reasoning effort (only the fields passed; an unknown field is refused), or archive it — the Library's agent folder | write |
export_agent_manifest / apply_agent_manifest / create_agent_from_manifest | Read an agent as an agentsky/v1 manifest, make an agent what a manifest declares (only changed fields are written; the answer lists each change; dry_run previews; expected_version refuses a stale apply), or create an agent from one | read / write |
list_agent_templates | The agents a plugin pack ships, each with the ref create_agent_from_manifest takes as template to create an agent from it; the agent keeps the plugin, template and revision as template | read |
delete_agent | Delete a saved agent with no live sessions (409 agent_has_sessions); one whose sessions were all deleted is archived instead | admin |
set_agent_secret / unset_agent_secret | Set (write-only) or clear the value of a secret an agent declares | write |
add_vault_secret | Add a secret to a vault: an MCP server's bearer or OAuth token, or an environment variable for the pod; never returned | write |
list_plugin_revisions / read_plugin_file | A skill plugin's saved versions (GET /plugins/skill:{id}/revisions) and one UTF-8 file (e.g. SKILL.md) of a version — the Library's skills folders. List the skills themselves with list_plugins (use skills) | read / read |
export_plugin / export_plugin_marketplace | One plugin as a package, or every plugin the workspace has switched on as a marketplace folder, for Codex (format: codex, the default), Claude Code (claude) or Grok (grok, the same folder as claude); no tokens, an API-key server reads its key from an environment variable. Add the folder with codex plugin marketplace add, claude plugin marketplace add or grok plugin marketplace add; sky setup plugins does it for every agent on the computer | read / read |
list_memory_stores / list_memory_notes / read_memory_note | The Library's memory stores, the notes in one (optionally under a folder), and one note with its content | read |
delete_memory_note | Delete one note from a workspace memory store, as Delete note does | write |
save_memory_note | Create a note at a path, or save a new version of note_id; every save keeps the earlier version; pass the read's content_sha256 as precondition to refuse a concurrent change with 409 | write |
export_memory_store / import_memory_notes | Page through a store's current notes at one consistent revision (next_cursor; a concurrent edit returns 409 export_changed), and import up to 100 notes as one atomic batch whose request_id replays the original receipt instead of writing twice. An existing path needs its current expected_sha | read / write |
list_library_artifacts / list_files | The person's Library outputs, and the workspace Drive's files | read |
get_library_artifact_share / set_library_artifact_share | A Library output's public link and the version it serves, and turning it on or off at the current revision — the Share dialog | read / write |
place_library_artifact / delete_library_artifact | Place your own Library output in a workspace (or null for only you); delete it with every version at the revision you saw | write |
read_library_file_links | Read any Library file's sharing, current revision and real available members without creating a link; pass ref and optional audience workspace | read |
share_library_file | Change workspace_access or member_changes: [{user_id, access: none/view/edit}]; none clears the individual override and restores workspace access; reads first, preserves every unmentioned grant and public access. Optional reviewed revision | write |
publish_library_file | Set enabled to create or revoke public view-only access; reads first and preserves workspace/member grants. Optional reviewed revision | write |
revoke_library_file_links | Revoke all sharing of ref at an explicit revision from a prior read; stale revisions fail without retry | write |
read_shared_library_file | Read a native snapshot directly from a 43-character shared URL token; optional public: true chooses the public view-only route. Returns editable, source revision and native content/history | read |
save_shared_library_file | Save through the original source writer with a shared token, opaque revision, exactly one text / html / office / docx / restoreRevision, and optional requestId UUID. Live edit grant required; no public writer; 403/409 remain tool errors without retry | write |
read_workspace_context | What every session in the workspace loads at start: AGENTS.md, MEMORY.md, the indexes and the caller's member page, with sizes and limits | read |
rename_workspace | Rename a workspace the caller owns; the slug stays | write |
list_workspace_members / invite_workspace_members / accept_workspace_invite / revoke_workspace_invite / set_workspace_member_role / remove_workspace_member | A workspace's people and waiting invitations; invite up to 50 emails; join through an invitation token; withdraw an invitation; make someone an admin or a member; remove someone, or leave with me — Settings › Members | read / write |
connect_workspace_app | Start connecting an app the workspace itself owns; share one of your own connected apps with share_plugin | write |
list_external_accounts / connect_external_account / disconnect_external_account | The workspace's vendor accounts (never credentials); connect one from a credential the person gave, or disconnect it | read / write |
show_in_panel | Show an artifact, browser, pull request, changes, story, automations, notes, status board, background tasks or shared files in a session's right panel | write |
list_channel_connections / set_chat_app_agent / unlink_chat_identity | Chat app connections and the session each answers through; choose which agent or chat answers a chat app; unlink a chat identity | read / write |
list_hook_rules / set_hook_rules / create_webhook | The workspace's hook rules in order; replace the whole list (owner only, at most 20); register a webhook endpoint for notify rules, its secret only in the answer | read / write |
whoami | Caller, resolved workspace and scopes | read |
create_workspace | Create a workspace; personal keys only | write |
create_agent | Create a saved agent for start_session | write |
get_agent | One saved agent's full spec | read |
update_routine | Change a routine; omitted fields keep their value | write |
set_routine_paused | Pause or resume a routine | write |
list_routine_runs | Every fire attempt of the workspace's routines, with whether each is running, succeeded or failed | read |
list_referral_links | Your customer discount links and what they earned | read |
create_referral_link | Create a customer discount link | write |
disable_referral_link | Disable a customer discount link | write |
list_model_subscriptions | Connected model plans, metadata only | read |
begin_model_subscription_login | Start a plan's browser sign-in; returns the link for the person to open | write |
get_model_subscription_login | How a plan sign-in stands | read |
submit_model_subscription_login_code | Hand over the code the sign-in page showed | write |
cancel_model_subscription_login | Abandon a plan sign-in | write |
connect_model_subscription | Add an account from a credential, or replace one's credential | write |
update_model_subscription | Rename an account or make it the default for new tasks | write |
read_model_subscription_usage | The allowance left on an account | read |
switch_model_subscription_agents_to_credits | Move an account's agents onto credits | write |
copy_model_subscription | Copy an account into another workspace you administer | admin |
remove_model_subscription | Delete an account so it leaves every list | write |
list_machines | The person's connected Macs | read |
create_environment | Create a reusable session environment | write |
list_session_files | One directory of a session's working folder | read |
search_api | Find the AgentSky API operation for anything a person can do on agentsky.dev or in the Mac app that no tool above covers (threads, the Library's artifacts, files, skills and memory notes, agents, workspaces, connectors, vaults, channels, routines, billing, …): words match method, path, summary, operation id, field names and description; deprecated operations come last | read |
describe_api | One operation from search_api: its description, parameters and request body schema | read |
call_api | Run one documented operation as the person with this connection's own key: the same route, checks and answer as REST at https://api.agentsky.dev/v1. method, concrete path, query, JSON body, optional workspace and idempotency_key; returns status and body. Only operations in the API reference are reachable; file bytes go through download_api_content and upload_api_content | read for GET, write otherwise |
download_api_content | The bytes of a documented GET operation that answers with a file, up to 16 MiB, as an embedded resource (base64 blob) beside its type, size and filename | read |
upload_api_content | Send file bytes to a documented operation that takes them, as files (multipart, with text fields) or raw, up to 16 MiB | write |
Errors carry the API's own codes (not_found, insufficient_scope, insufficient_credits, …) as tool errors, so a client sees the same contract it would over HTTP.
Workspaces
Every list and create tool accepts an optional workspace slug. Omit it to use the workspace the connection resolved to (the personal workspace for local MCP configs that send no x-universe header). Call list_workspaces to see every workspace you belong to and pick the slug.
Tools that take a task_id, session_id, or artifact_id always derive the workspace from that object and ignore workspace — one task never spans workspaces and follow-up calls need no explicit workspace. If task_id and workspace are both given to start_session, the call is refused.
A token minted for a specific workspace (or an app token) is locked to that workspace: passing any other slug returns universe_mismatch.
The Library link tools use GET/PUT/DELETE /library/links through the same public API with this connection's bearer key. Their workspace selects the team audience without moving the original file and is never inferred from the connection workspace. The owner's native source permission and each recipient's precise workspace membership are checked independently. The reference is one of {kind:"agent_prompt",agentId} (the agent's user-authored AGENTS.md only), {kind:"file",fileId,sessionId?}, {kind:"task_file",taskId,path}, {kind:"memory_note",storeId,memoryId}, {kind:"skill_file",skillId,path}, {kind:"artifact",artifactId}, or {kind:"platform_artifact",artifactId,path?}. An uploaded meeting note is a Drive file. For a DesignSystem file, platform_artifact.path is its full native manifest path: actual root plus the relative editable_files path, or the native reader's libraryRef; omitting it shares the entire artifact entry. Editable files use the original versioned writer, including derived files and republishing. Token reader APIs reject ?path rather than expanding the file grant. The API enforces source ownership, real membership, workspace-key bounds and whether edit access is supported. These tools never send messages or start an agent session. Conflicts, denied requests and incomplete API receipts return tool errors; read the current state before intentionally retrying. Existing share_artifact and artifact version management remain available.
A task, start to finish
list_agents— pick the agent'sid.- Generate a unique stable
idempotency_key, then callstart_sessionwith it,agent_idand the task asmessage— the reply is the new session, themessage_idof that message and thecursorjust after it. read_sessionwithsession_id, thatcursor, thatmessage_idandwait_seconds: 50— repeat with the returned cursor untilturn_finishedis true (and at once, without waiting, wheneverhas_moreis true: a call reads at most 200 events in total). The first turn also boots the agent's sandbox, which can take a minute.- Once
turn_finishedis true, usesend_messagewith a newidempotency_keyto continue the conversation, thenread_sessionagain. If another surface already has a turn running,send_messagereturnssession_busy; finish reading that turn and retry.
Keep each mutation's key until its receipt arrives. If a call is cancelled, times out or loses its response, retry the exact same tool with the same key and inputs: AgentSky replays the original session, message and cursor without submitting the work twice. Reusing a key with changed inputs returns idempotency_conflict. Use a new key only for intentionally new work.
Splitting work across agents
search_catalogwith words for the work, and pick each agent by what it does.- Start the first agent with
start_sessionand abudget_cents. Read itstask_idfromcollect_resultorget_task(it is the first session's id). - Start every other agent with that
task_idand its ownbudget_cents: they join the same task, read and write the sametask/folder, and appear as one task in AgentSky. - Read each turn to completion with
read_session, thencollect_resultand check the files withread_task_file.stop_sessionthe sessions you are done with.
Sessions started this way are ordinary sessions: they appear in the console, keep their history, and bill as usual.
These are the four delegation tools every harness has, under the same names inside a session's sandbox:
| Tool | Does | In a sandbox | Outside (MCP) |
|---|---|---|---|
agents.hire | start an agent of any harness on a self-contained brief, with a budget taken from yours | actl agents hire @handle --task "Brief" --budget 0.50 | start_session |
agents.message | send an agent you hired a follow-up | actl agents message HELPER "Text" | send_message |
agents.status | the recorded state of one agent you hired, or of all of them | actl agents status [HELPER] | get_session |
agents.collect | an agent's proposed result and the files it wrote | actl agents collect HELPER | collect_result |
list_session_people answers who may send a session turns, and get_session_overview its people, engines and plugins.
Meta Muse (not verified)
AgentSky has not exercised or certified this flow in Meta Muse. Meta's connector documentation describes custom connectors backed by a remote MCP server or public API, with credentials entered through Muse's credential prompt (How Muse works with Connectors). If that connector option is available in your Muse account, the values to try are https://api.agentsky.dev/v1/mcp as the remote MCP URL and an AgentSky API key as the bearer credential. Use a key with write scope to start or continue sessions. Muse's current UI and interoperability with this server remain unverified.
One command for Claude Code and Codex
npx @agentsky/sky setupIt signs you in if needed, registers this server with every Claude Code and Codex it finds, and installs the agentsky skill, which carries the agent catalog (catalog.md, including your own workspace's agents) and teaches the agent when to hire, how to brief and check each agent, and how to keep their work in one task. Run it again to update. --dry-run shows what it would change. Codex gets the key in its config.toml, so it needs no environment variable. To set things up by hand instead, use the commands below.
Claude Code
claude mcp add --transport http agentsky https://api.agentsky.dev/v1/mcp --header "Authorization: Bearer ast_..."Codex
export AGENTSKY_API_KEY=ast_...
codex mcp add agentsky --url https://api.agentsky.dev/v1/mcp --bearer-token-env-var AGENTSKY_API_KEYThat command writes this entry to ~/.codex/config.toml ($CODEX_HOME/config.toml), which the Codex CLI, IDE extension and desktop app all read. You can write it yourself instead:
[mcp_servers.agentsky]
url = "https://api.agentsky.dev/v1/mcp"
bearer_token_env_var = "AGENTSKY_API_KEY"Codex sends the key from AGENTSKY_API_KEY in the environment Codex starts in. For an app that is not started from your shell, put the key in the entry instead: http_headers = { Authorization = "Bearer ast_..." } in place of bearer_token_env_var. codex mcp list shows the server once it is registered.
Other clients
Most clients accept a JSON entry for a remote server with a bearer header:
{
"mcpServers": {
"agentsky": {
"type": "http",
"url": "https://api.agentsky.dev/v1/mcp",
"headers": { "Authorization": "Bearer ast_..." }
}
}
}Your own agents can attach it the same way: declare it under mcpServers when you create an agent (see the API reference), with the token in a declared secret.
Sign in with OAuth
A client that cannot send an API key can use standard MCP authorization. A request with no valid credential answers 401 with WWW-Authenticate: Bearer resource_metadata="https://api.agentsky.dev/.well-known/oauth-protected-resource/v1/mcp"; that document names https://accounts.agentsky.dev as the authorization server, whose metadata is at its /.well-known/oauth-authorization-server. Authorization uses the code flow with PKCE (S256), and the client must send resource=https://api.agentsky.dev/v1/mcp on both the authorization and token requests.
Registration. A client registers itself at the registration_endpoint in that metadata (dynamic client registration, RFC 7591), as a public client (token_endpoint_auth_method: "none") or with a secret. Redirect URIs match exactly and must be https, or http on localhost or 127.0.0.1. The consent page names the client, marks it as not reviewed and shows the host it returns to. To use fixed credentials instead, create the app with POST /oauth_clients. Remove a client's access with DELETE /oauth_grants/{client_id}, sky, or your account page; its tokens stop working on the next request.
What a signed-in client can do. The person allows it read, write or both, in the one workspace they choose on the consent page. It sees only these tools: list_agents, list_sessions, get_session, start_session, send_message, read_session, collect_result, stop_session, search_catalog, list_tasks, get_task, search_api, describe_api, call_api, help_search and help_get. call_api reaches whoami, tasks, sessions, agents and catalog routes; any other route answers 403 forbidden. For the full tool list, use an API key.
Help Center server
https://api.agentsky.dev/v1/help/mcp is a second server with only help_search and help_get. It needs no key, because the Help Center is public. Every cloud session already reaches both tools on this server as agentsky, with its own session token; add it to any other MCP client the same way as the main server, without the Authorization header. It allows 600 calls a minute per caller address.
Rate limits and waiting
The server shares the API's per-token rate limit. read_session polls on your behalf while it waits, so one call with wait_seconds: 50 costs one request, not fifty. Prefer waiting over tight loops of get_session.
