mcp_server¶
The MCP tools and the MCP App view.
coalitionkit_mcp ¶
The CoalitionKit MCP server: any MCP host joins a Coalition with an A2A member's rights.
Deps
dataclass
¶
The ports and the clock a server is built from.
HostedParticipant
dataclass
¶
One participant and the two hosted keys that act for it. Never shared between participants.
agent_key signs envelopes; owner_key signs consent and only after the person answered.
TokenPort ¶
Bases: Protocol
Maps a bearer access token to exactly one participant.
participant_for
async
¶
The participant the token belongs to, or None when the token is not valid.
ViewPort ¶
Bases: Protocol
What one participant may read. Every method is scoped to the participant it is given.
Implementations return only what that participant's scopes allow (originals where nothing is redacted, projections elsewhere, stubs outside the scope for log reads); the server filters the shape again with allowlists but never widens it.
coalitions
async
¶
Summaries of the Coalitions the participant belongs to.
coalition
async
¶
One summary (coalition_id, goal, roles, status), or None.
charter
async
¶
The current charter payload, including its revision.
open_asks
async
¶
What this participant is asked to decide right now: kind, id, revision.
log
async
¶
Entries with seq above since, each an original, a projection or a stub.
pending_questions
async
¶
Open coalition.query items addressed to the participant's vault.
surface
async
¶
The data of the participant's live surface for the MCP App view.
talk
async
¶
The agents' talk as this participant may see it: open, round, rounds and
thread. Optional: a view without it reports the talk as closed.
subject_revision
async
¶
The current revision of a subject the participant may see, or None.
create_app ¶
create_app(
deps: Deps,
*,
public_url: str,
issuer_url: str,
allowed_hosts: Sequence[str] = (),
allowed_origins: Sequence[str] = (),
) -> FastAPI
Serve the MCP endpoint at /mcp.
public_url is the endpoint's own URL. A server reached by a real host name must list that
name in allowed_hosts (host or host:port, :* for any port) and, for browser
clients, allowed_origins; the SDK refuses any other Host header.
build_server ¶
The server for deps: public_url is the MCP endpoint, issuer_url the issuer.