Skip to content

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.

MessageAnswer
initialize, ping, tools/list, tools/callas MCP has them
a notification, with no id202, with no body
any other methodJSON-RPC -32601
a body that isn’t JSON400, 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 know401, with WWW-Authenticate: Bearer naming the resource metadata

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_show

Command group show

Lexicon org.atgrp.internal.getGroup

What 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#groupViewDetailed
rolesarray of defs#roleView, optional
bindingsarray of defs#roleBinding, optional
spacesarray of defs#spaceView, optional
joinRequestsarray of defs#joinRequest, optionalPending requests, newest first. Present only for a viewer holding admit.

Errors

GroupNotFound

org.atgrp.internal.getGroup.json

group_deactivate

Command group deactivate

Lexicon org.atgrp.internal.deactivateGroup

What it does switches the group off. With undo, org.atgrp.internal.activateGroup switches it back on

Lexicon

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

AlreadyDeactivated

org.atgrp.internal.deactivateGroup.json

group_handle

Command group handle

Lexicon org.atgrp.internal.updateGroupHandle

What 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, InvalidOperation

org.atgrp.internal.updateGroupHandle.json

group_domain

Command group domain

Lexicon org.atgrp.internal.putGroupDomain

What it does serves the group at its handle’s own domain once that domain reaches this host. With undo, org.atgrp.internal.deleteGroupDomain stops

Lexicon

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

org.atgrp.internal.putGroupDomain.json

profile_set

Command profile set

Lexicon org.atgrp.about, org.atgrp.config

What it does changes the fields given in the group’s about record (at self in its meta space) as the group, and keeps the rest. join_policy changes its config record beside it, which is written only when it’s given. A field given empty or null is removed. It answers {"written": [...]}, one write for each record changed

Lexicon of about

Basic information for presenting the group. Written by the group in the meta space.

Record

displayNamestring, at most 640 bytes
descriptionstring, at most 20000 bytes, optional
avatarblob, optional
websitestring (uri), optionalGroup website. Must be http or https.

org.atgrp.about.json

Lexicon of config

The 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.

org.atgrp.config.json

rule_set

Command rule set

Lexicon org.atgrp.rule

What it does writes a rule in the members space as the group. It writes the one rule names by its key, or without one a new rule keyed by the host’s clock

Lexicon

A group rule, written by the group in the members space. Reports can cite it by URI.

Record

titlestring, at most 640 bytes
textstring, at most 20000 bytes
orderinteger, optionalDisplay order, ascending.

org.atgrp.rule.json

rule_delete

Command rule delete

Lexicon org.atgrp.rule

What it does deletes the rule rule names

Lexicon

A group rule, written by the group in the members space. Reports can cite it by URI.

Record

titlestring, at most 640 bytes
textstring, at most 20000 bytes
orderinteger, optionalDisplay order, ascending.

org.atgrp.rule.json

label_define

Command label define

Lexicon org.atgrp.internal.putLabelDefinition

What it does defines or changes the group’s own label label: its name and description, 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#labelValueDefinition

org.atgrp.internal.putLabelDefinition.json

label_delete

Command label delete

Lexicon org.atgrp.internal.deleteLabelDefinition

What it does stops defining the label label

Lexicon

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.

org.atgrp.internal.deleteLabelDefinition.json

role_set

Command role set

Lexicon org.atgrp.role

What it does writes the role role (its id: lowercase letters and hyphens, three or more) in the members space, as the group, with its permissions and 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, optional
defaultboolean, 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.

org.atgrp.role.json

role_delete

Command role delete

Lexicon org.atgrp.role

What 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, optional
defaultboolean, 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.

org.atgrp.role.json

role_grant

Command role grant

Lexicon org.atgrp.role

What it does adds the permissions given, and the roles its holders may assign (can_assign), to those in the record of role. With undo, 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 refused

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, optional
defaultboolean, 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.

org.atgrp.role.json

member_list

Command member list

Lexicon org.atgrp.internal.listMembers

What 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, optional
cursorstring, at most 2048 bytes, optional

Output

cursorstring, optionalPresent while there are more.
membersarray of defs#memberView

Errors

GroupNotFound

org.atgrp.internal.listMembers.json

member_assign

Command member assign

Lexicon org.atgrp.membership

What it does writes the membership of member (a DID) with roles in place of theirs, member among them. It lets in someone waiting to join, or changes a member’s roles

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 100
createdAtstring (datetime)

org.atgrp.membership.json

member_eject

Command member eject

Lexicon org.atgrp.membership

What 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 100
createdAtstring (datetime)

org.atgrp.membership.json

join_list

Command join list

Lexicon org.atgrp.listJoinRequests

What 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, optional
cursorstring, optional

Output

cursorstring, optional
requestsarray of defs#joinRequest

Errors

InvalidCursor

org.atgrp.listJoinRequests.json

join_deny

Command join deny

Lexicon org.atgrp.denyJoinRequest

What it does turns down member’s request

Lexicon

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

org.atgrp.denyJoinRequest.json

invite_send

Command invite send

Lexicon org.atgrp.invite

What it does invites person (a DID), with an optional message and expires_at, and answers the invite’s uri. With undo, it takes back the invite waiting for them

Lexicon

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), optional
messagestring, at most 20000 bytes, optional

org.atgrp.invite.json

invite_list

Command invite list

Lexicon org.atgrp.internal.listInvites

What 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, optional
cursorstring, optional

Output

cursorstring, optional
invitesarray of defs#inviteView

org.atgrp.internal.listInvites.json

space_create

Command space create

Lexicon com.atproto.space.createSpace

What it does makes a space of type under policy, an org.atgrp.policy object, as the group with a group token for it. skey is its key, or a new one if left out

space_records

Command space records

Lexicon org.atgrp.internal.listSpaceRecords

What it does lists the records in the space space

Lexicon

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), optional
limitinteger, 1 to 100, default 50, optional
cursorstring, 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, optional
uristring (at-uri), optionalOne record in the space, by its URI.

Output

recordsarray of spaceRecord
cursorstring, optional

Errors

NotFound, NotAuthorized

org.atgrp.internal.listSpaceRecords.json

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_list

Command mod list

Lexicon org.atgrp.mod.querySubjects

What it does shows the moderation queue: every subject, or those of a status (open or resolved) or with any of the tags, oldest first, newest first or latest updated first (sort)

mod_history

Command mod history

Lexicon org.atgrp.mod.querySubjectHistory

What it does shows what was done about a subject, newest or oldest first (sort)

mod_update

Command mod update

Lexicon org.atgrp.mod.updateSubject

What it does resolves or reopens a subject (status), adds or removes its tags (add_tags, remove_tags), or adds a note. What isn’t given stays as it was

mod_label

Command mod label

Lexicon com.atproto.space.createRecord

What it does labels a subject val as the group, with a com.atproto.label.record record beside it, where the member’s roles write labels. With undo, it deletes the label (com.atproto.space.deleteRecord)