MCP tools
The host offers these tools to an MCP client at <PUBLIC_URL>/mcp, over
MCP’s Streamable HTTP. It answers each JSON-RPC message on its own, as
JSON. It speaks MCP 2025-06-18, 2025-03-26 and 2024-11-05, and
answers an initialize that asks for another version with the latest.
MCP says how a client connects and signs in.
| Message | Answer |
|---|---|
initialize, ping, tools/list, tools/call | as MCP has them |
a notification, with no id | 202, with no body |
| any other method | JSON-RPC -32601 |
| a body that isn’t JSON | 400, JSON-RPC -32700 with a null id |
| JSON that isn’t one JSON-RPC 2.0 object (a batch, a string) | -32600 |
| an unknown tool, or arguments that aren’t an object | -32602 |
| no token, or one the host doesn’t know | 401, with WWW-Authenticate: Bearer naming the resource metadata |
The tools are the commands
Section titled “The tools are the commands”Every command atgrp <group> <action> that acts in a group has one
tool, <group>_<action>. So atgrp member assign is member_assign.
A tool takes what its command takes, except the group, which is always
the one the client connected to. It takes the command’s arguments by the
names its usage gives them (member, roles), and its flags in snake
case (--display-name is display_name, --undo is undo).
Where the command takes a comma-separated list, the tool takes an array.
The commands list each one’s arguments. TOOLS in
crates/group-host-mcp/src/lib.rs lists the tools, and the command reads
its words by the tool’s schema, so the two can’t drift.
The commands with no tool make, move or delete a group or an account:
group create, group seed, group move, group delete and account import. A client connected to a group can switch it off, and its
stewards can undo that, but it can’t delete the group. admin logs and
admin stats have no tool either, since they read the whole host and a
client acts in one group.
The host runs each tool as the member who connected the client, in that group. A tool does one of four things:
- It asks one of the host’s methods, as the member.
- It writes one of the group’s records (its about and config records, a rule, role or membership) as the member’s own session for the group would. It carries the scope a group token for that space carries, holds to the member’s current roles, and logs the write under the client.
- It writes an invite in the invitee’s inbox, or takes it back, the same way.
- It adds to a role’s grant in its record, or takes from it.
MCP says why.
The host makes a tool’s input schema from the lexicon of what it asks or
writes, named in the Lexicon column below. The schema leaves out the
group and the time a record was made, which the host fills in. A tool’s
description says what it does, then what that lexicon says. A method’s
result is the method’s JSON. A write’s result is the record’s uri, plus
its cid for a put. Each comes as text and, for an object, as
structuredContent. A call the member’s roles don’t allow, or that the
host refuses, comes back isError: true, with the text <error>: <message> in the host’s words. If a required argument is missing or
isn’t text, the host refuses it before asking anything:
<name> is required, as text.
A write replaces the record whole and drops any field not given. The
exceptions are profile_set and role_grant, which change only what
they’re given. You can’t upload a picture through MCP, so profile_set
keeps the group’s avatar unless given one already uploaded.
group_showWhat it does shows the group as the member may see it: its about record, rules, member count, roles and spaces
Lexicon
Get a detailed view of a group: its profile and rules, and — for a viewer who may read the members space — how many are in it (listMembers names them), its roles, spaces and their read gates, plus the join queue for a viewer holding
admit. Without auth, only the group's did and handle; with it, the viewer's standing and what their roles let them read. Every gate is the decision a space credential is minted on.Parameters
groupstring (did)The group DID. Output
groupdefs#groupViewDetailedrolesarray of defs#roleView, optionalbindingsarray of defs#roleBinding, optionalspacesarray of defs#spaceView, optionaljoinRequestsarray of defs#joinRequest, optionalPending requests, newest first. Present only for a viewer holding admit.Errors
GroupNotFoundgroup_deactivateWhat it does switches the group off. With
undo,org.atgrp.internal.activateGroupswitches it back onLexicon
Switch the group off: its account is deactivated on this host, so nothing can read its spaces or write as it. Reversible with activateGroup. Requires group.configure. The host remembers who held group.configure at this moment, because while the group is off its membership cannot be read.
Input
groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles. Errors
AlreadyDeactivatedgroup_handleWhat it does gives the group a handle on a domain that names it, or gives its own address back
Lexicon
Give the group a handle on a domain it owns, once that domain names the group by its _atproto DNS record or its /.well-known/atproto-did; or give it back its own address as its handle. Updates the group's did:plc and tells the network. Its address stays reserved for it. Requires group.configure.
Input
groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles. handlestring (handle)The new handle: a domain that names the group, or the group's own address. Output
handlestring (handle)Errors
InvalidHandle,UnsupportedDomain,HandleNotAvailable,NotPointing,NotController,InvalidOperationgroup_domainWhat it does serves the group at its handle’s own domain once that domain reaches this host. With
undo,org.atgrp.internal.deleteGroupDomainstopsLexicon
Serve the group at the domain of its handle, once the group has a handle on a domain of its own and that domain reaches this host: the domain answers the host's /.well-known/ and /xrpc/, its / leads to the group's page in the console, and the group's address and www. under the domain redirect to it. Until the handle changes or deleteGroupDomain. Requires group.configure.
Input
groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles. Output
domainstringThe domain the group is served at: its handle, a domain of its own. Errors
NoOwnDomain,NotReaching
profile
Section titled “profile”profile_setWhat it does changes the fields given in the group’s about record (at
selfin its meta space) as the group, and keeps the rest.join_policychanges its config record beside it, which is written only when it’s given. A field given empty ornullis removed. It answers{"written": [...]}, one write for each record changedLexicon of
aboutBasic information for presenting the group. Written by the group in the meta space.
Record
displayNamestring, at most 640 bytesdescriptionstring, at most 20000 bytes, optionalavatarblob, optionalwebsitestring (uri), optionalGroup website. Must be http or https. Lexicon of
configThe group's configuration, such as how to join. Written by the group in the meta space.
Record
joinPolicystring,open,approval,inviteopen admits anyone; approval queues a join request; invite requires an invitation. An invitation admits its recipient under any policy.
rule_setWhat it does writes a rule in the members space as the group. It writes the one
rulenames by its key, or without one a new rule keyed by the host’s clockLexicon
A group rule, written by the group in the members space. Reports can cite it by URI.
Record
titlestring, at most 640 bytestextstring, at most 20000 bytesorderinteger, optionalDisplay order, ascending. rule_deleteWhat it does deletes the rule
rulenamesLexicon
A group rule, written by the group in the members space. Reports can cite it by URI.
Record
titlestring, at most 640 bytestextstring, at most 20000 bytesorderinteger, optionalDisplay order, ascending.
label_defineWhat it does defines or changes the group’s own label
label: itsnameanddescription, and how apps should show it (severity,blurs,default_setting,adult_only)Lexicon
Define one of the group's own labels, or change one it defines: what it means and how apps should show it, in its labeler, with the label among the values it applies. Changing one replaces how apps show it, and its name and description only in the given language: those in other languages stay. Requires group.configure.
Input
groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles. labelstring, at most 100 bytesThe label's value, as it is applied: lowercase letters and hyphens. namestring, at most 640 bytesWhat people see it called, in its lang. descriptionstring, at most 20000 bytesWhat it means, for people deciding how to see what wears it, in its lang. langstring (language), optionalThe language of its name and description, which replace any it has in that language and leave the others. en unless given. severitystring,inform,alert,none, optionalHow apps should convey it: inform, alert, or none. inform unless given. blursstring,content,media,none, optionalWhat apps should hide behind it: content, media, or none. none unless given. defaultSettingstring,ignore,warn,hide, optionalHow apps should show it to someone who has not chosen: ignore, warn, or hide. warn unless given. adultOnlyboolean, optionalWhether only those who show adult content may choose to see what wears it. Output
com.atproto.label.defs#labelValueDefinitionlabel_deleteWhat it does stops defining the label
labelLexicon
Stop defining one of the group's own labels: its definition, and the value among those its labeler applies. Labels already applied stay. Requires group.configure.
Input
groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles. labelstring, at most 100 bytesThe label's value.
role_setWhat it does writes the role
role(its id: lowercase letters and hyphens, three or more) in the members space, as the group, with itspermissionsand the roles its holders may assign (can_assign,*for every role)Lexicon
A group role and its group-wide grants, keyed by role ID. Role IDs follow label value syntax ([a-z-]+) and are at least 3 characters. Written by the group in the members space. Grants within a space live in that space's policy.
Record
displayNamestring, at most 640 bytes, optionalDefaults to the role ID. descriptionstring, at most 20000 bytes, optionaldefaultboolean, default false, optionalIf true, granted to members admitted through requestJoin. permissionsarray of string, at most 2000 bytes, at most 100, optionalGroup-wide permissions, one per item. For permissions not tied to one space, such as manage=create, rpc: permissions, and space:* grants. canAssignarray of string, at most 512 bytes, at most 100, optionalKeys of roles this role may assign, or * for every role. botboolean, optionalPeople with this role are bots: accounts that act on their own, not a person. A member is a bot if any of their roles says so. role_deleteWhat it does deletes a role nobody holds
Lexicon
A group role and its group-wide grants, keyed by role ID. Role IDs follow label value syntax ([a-z-]+) and are at least 3 characters. Written by the group in the members space. Grants within a space live in that space's policy.
Record
displayNamestring, at most 640 bytes, optionalDefaults to the role ID. descriptionstring, at most 20000 bytes, optionaldefaultboolean, default false, optionalIf true, granted to members admitted through requestJoin. permissionsarray of string, at most 2000 bytes, at most 100, optionalGroup-wide permissions, one per item. For permissions not tied to one space, such as manage=create, rpc: permissions, and space:* grants. canAssignarray of string, at most 512 bytes, at most 100, optionalKeys of roles this role may assign, or * for every role. botboolean, optionalPeople with this role are bots: accounts that act on their own, not a person. A member is a bot if any of their roles says so. role_grantWhat it does adds the
permissionsgiven, and the roles its holders may assign (can_assign), to those in the record ofrole. Withundo, it takes them away, or takes all of both if none are given. The rest of the record stays as it was, and the write follows the same rules as any write of it. A role the group doesn’t have is refusedLexicon
A group role and its group-wide grants, keyed by role ID. Role IDs follow label value syntax ([a-z-]+) and are at least 3 characters. Written by the group in the members space. Grants within a space live in that space's policy.
Record
displayNamestring, at most 640 bytes, optionalDefaults to the role ID. descriptionstring, at most 20000 bytes, optionaldefaultboolean, default false, optionalIf true, granted to members admitted through requestJoin. permissionsarray of string, at most 2000 bytes, at most 100, optionalGroup-wide permissions, one per item. For permissions not tied to one space, such as manage=create, rpc: permissions, and space:* grants. canAssignarray of string, at most 512 bytes, at most 100, optionalKeys of roles this role may assign, or * for every role. botboolean, optionalPeople with this role are bots: accounts that act on their own, not a person. A member is a bot if any of their roles says so.
member
Section titled “member”member_listWhat it does lists who’s in the group and their roles, a page at a time, filtered by part of a handle or DID (
q)Lexicon
A group's members, each with their roles, a page at a time in the order of their DIDs, for a caller who may read its members space. With
q, only those whose handle or DID holds it.Parameters
groupstring (did)The group DID. qstring, at most 256 bytes, optionalPart of a member's handle or DID, in any case. limitinteger, 1 to 100, default 50, optionalcursorstring, at most 2048 bytes, optionalOutput
cursorstring, optionalPresent while there are more. membersarray of defs#memberViewErrors
GroupNotFoundmember_assignWhat it does writes the membership of
member(a DID) withrolesin place of theirs,memberamong them. It lets in someone waiting to join, or changes a member’s rolesLexicon
A member's roles in the group, keyed by the member's DID. Written by the group in the members space, and paired with the member's confirmation.
Record
rolesarray of string (record-key), at most 100createdAtstring (datetime)member_ejectWhat it does deletes the membership, which puts them out
Lexicon
A member's roles in the group, keyed by the member's DID. Written by the group in the members space, and paired with the member's confirmation.
Record
rolesarray of string (record-key), at most 100createdAtstring (datetime)
join_listWhat it does lists the requests to join that are waiting
Lexicon
List pending join requests, which the host stores privately. Approve one by writing the requester's membership record. Deny requests with 'denyJoinRequest'. Requires auth as the group.
Parameters
groupstring (did), optionalThe group's DID. A group account session names its own; a member's service auth names it here. limitinteger, 1 to 100, default 50, optionalcursorstring, optionalOutput
cursorstring, optionalrequestsarray of defs#joinRequestErrors
InvalidCursorjoin_denyWhat it does turns down
member’s requestLexicon
Deny a pending join request, deleting it. To approve one, write the requester's membership instead. Requires auth as the group.
Input
groupstring (did), optionalThe group's DID. A group account session names its own; a member's service auth names it here. memberstring (did)Errors
JoinRequestNotFound
invite
Section titled “invite”invite_sendWhat it does invites
person(a DID), with an optionalmessageandexpires_at, and answers the invite’suri. Withundo, it takes back the invite waiting for themLexicon
An invitation to join the group, written by the group into the invitee's inbox space. Deleting it revokes the invite.
Record
createdAtstring (datetime)expiresAtstring (datetime), optionalmessagestring, at most 20000 bytes, optionalinvite_listWhat it does lists the invites that are waiting
Lexicon
Outstanding invites. Requires invite.
Parameters
groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles. limitinteger, default 50, optionalcursorstring, optionalOutput
cursorstring, optionalinvitesarray of defs#inviteView
space_createWhat it does makes a space of
typeunderpolicy, anorg.atgrp.policyobject, as the group with a group token for it.skeyis its key, or a new one if left outspace_recordsWhat it does lists the records in the space
spaceLexicon
Records in one of a group's content spaces, from the host's index of it: one collection or every collection, newest first, a page at a time. Only for someone signed in whom the space's policy lets read, checked on every call, a space open to anyone included.
Parameters
groupstring (did)spacestringThe space's URI. collectionstring (nsid), optionallimitinteger, 1 to 100, default 50, optionalcursorstring, optionalFrom the last page: continues with older records. fieldstring, at most 128 bytes, optionalOnly records whose field (a name or a dotted path, like subject.uri) equals equals.equalsstring, at most 2048 bytes, optionaluristring (at-uri), optionalOne record in the space, by its URI. Output
recordsarray of spaceRecordcursorstring, optionalErrors
NotFound,NotAuthorized
subject is an account’s DID or a record’s URI: at:space/… in one of
the group’s spaces, at://… in a public repo. Where the method asks for
a version, it comes with its cid, the way a label on a record does.
mod_listWhat it does shows the moderation queue: every subject, or those of a
status(openorresolved) or with any of thetags, oldest first, newest first or latest updated first (sort)mod_historyWhat it does shows what was done about a subject, newest or oldest first (
sort)mod_updateWhat it does resolves or reopens a subject (
status), adds or removes its tags (add_tags,remove_tags), or adds anote. What isn’t given stays as it wasmod_labelWhat it does labels a subject
valas the group, with acom.atproto.label.recordrecord beside it, where the member’s roles write labels. Withundo, it deletes the label (com.atproto.space.deleteRecord)