Manage MCP access
Use this workflow only through the authenticated Speakeasy AI Control Plane (AICP) Platform MCP. It mirrors the guarded dashboard workflow for giving one explicitly selected organization member access to one explicitly selected configured MCP through a custom role. Installing the package grants no organization or project access.
Safety rules
- Never infer the project, MCP, custom role, member, or access rules from prior context. Present the eligible choices and require the user to select each target explicitly.
- Show members only by the masked identities returned by
list_access_members. Never reconstruct, request, or reveal an unmasked identity. - Do not expose raw identifiers or opaque references merely to distinguish choices. Present product names and masked identities; retain tool-returned selectors internally and use them only with the exact choice they represent.
- Assign only a role whose returned type is
customand whose freshget_mcp_accesscoverage reportsassignment_eligible: true. Eligibility means the entire role contains only exactmcp:connectselectors for the selected project and MCP; non-MCP, broad, other-project, other-MCP, or unknown grants are not eligible. - Assigning a role includes all of its grants, not just the user's intended subset. Require explicit confirmation of ALL selected MCP grants by presenting EVERY
assignment_rulesentry from freshget_mcp_accesscoverage. Each entry hasall_toolsand may havetoolordisposition:all_tools: truemeans unrestricted tool access, including future tools, not merely the current catalogue. Explain each named tool and disposition rule, including future tools matching that disposition. Do not rely onallowed_known_toolsto establish the full scope. Missing or incompleteassignment_rulesis a stop condition, even when eligibility is true. Do not mutate or narrow a shared existing role to make it assignable; offer to create a dedicated narrow role instead. - Stop when member results are suppressed, ambiguous, expired, or do not contain the selected masked identity. Ask the user for a different identity query rather than guessing.
- Stop if incomplete tool catalogue or unevaluated evidence prevents confirmation of exact scope. Never treat missing tools,
tools_truncated: true, orunevaluated_grants: trueas proof of narrow access. - Local role and membership reads describe local desired state only. Never claim provider synchronization has converged or that the member has effective provider access based on local reads, mutation success, or receipt replay.
- If any read reports that the capability is unavailable, stop without claiming a change.
Workflow
- Call
list_projectswithlimit: 100. This tool supports onlylimit(capped at 100), not cursor or search. Iftruncated: true, stop and hand off project selection to the AICP dashboard; do not invent pagination or treat the partial list as complete. Otherwise present eligible project names and ask the user to choose one exact project. Keep its returned selector internal. - Call
find_mcpfor only that project withlimit: 100. For an unfiltered list, follownext_cursorusingcursorwith the same project and no query until the list is complete. Cursor pagination is supported only for unfiltered results: never combinequeryandcursor. If a search result is truncated, narrow the query or switch to project-scoped unfiltered pagination. Stop if a complete, unambiguous choice cannot be established. Present configured MCP names and ask the user to choose one exact MCP. Keep its returned selector internal. - Call
get_mcp_accessfor the selected project and MCP. Explain its authorization mode, known tool catalogue, and current local role coverage. If it is not managed by role-based access, stop; this workflow must not imply that assigning a role will take effect. Check catalogue completeness and unevaluated evidence before proposing any mutation; if exact scope cannot be confirmed, stop and use the dashboard rather than guessing. - Call
list_access_roles. Present role names, types, privacy-safe member counts, and relevant MCP access summaries. Ask the user to choose an eligible existing custom role or explicitly choose to create a new custom role. - Resolve the custom role without silently broadening it:
- For a new role, collect its name, optional description, and exact MCP access rules from the selected MCP's current enumerable tools or supported disposition classes. Explain the full scope, including any disposition-based access to future tools. Show all proposed grants and ask for explicit confirmation, then call
create_mcp_access_rolefor the exact project and rules. - For an existing custom role, compare its complete coverage from
get_mcp_accesswith the user's requested outcome and requireassignment_eligible: true. If it grants a broader outcome, is ineligible, or exact scope cannot be confirmed, do not assign it or callupdate_mcp_access_roleto narrow or repurpose it. Offer to create a dedicated narrow role with a separately confirmed scope. Otherwise make no role mutation and explicitly confirm all grants, not merely the intended subset. - Use fresh tool-returned opaque references and any required freshness or retry fields only as agent-operational inputs. Do not describe those mechanics as part of the user-facing outcome.
- For a new role, collect its name, optional description, and exact MCP access rules from the selected MCP's current enumerable tools or supported disposition classes. Explain the full scope, including any disposition-based access to future tools. Show all proposed grants and ask for explicit confirmation, then call
- After role creation, call both
list_access_rolesandget_mcp_accessagain. Continue only if the selected custom role exists, reportsassignment_eligible: true, and the re-read shows exactly all confirmed grants for the selected MCP. If the state conflicts or is incomplete, stop and report that no member assignment will be attempted. - Ask the user for an identity search of at least three characters, then call
list_access_memberswithout a role filter. Present only the returned masked identities and current role names. Require the user to choose one exact masked member; do not accept an unmasked identity or select on their behalf. - Immediately before assignment, refresh
list_access_roles,get_mcp_access, andlist_access_membersfor the exact prior choices. Keep the original identity query without a role filter so the privacy cohort is unchanged. Confirm internally that the project, MCP, custom role, all grants,assignment_eligible: true, and masked member still match. If a selector expired or the choices changed, present the safe names and masked identities again and ask the user to reselect. Stop on suppressed results or incomplete scope evidence. - Summarize the proposed local desired state using only the project name, MCP name, custom role name, masked member identity, and ALL selected MCP grants. Present EVERY
assignment_rulesentry in product language for final confirmation, distinguishing unrestricted future-tool access from the known catalogue list. Explain that existing member roles are preserved and provider synchronization remains unverified. Ask for one final explicit confirmation of that complete assignment, not just the user's intended subset. - After confirmation, call
assign_mcp_access_roleusing only the exact refreshed custom-role and member choices, the explicit project, selectedmcp_id, andconfirmed: true. Pass the selected role'sversionfrom the immediately precedingget_mcp_accessresponse asexpected_role_version, and the selected member'sversionfrom the immediately precedinglist_access_membersresponse asexpected_version. Supply a stableidempotency_keyfor retries of that exact request. Keep these fields internal. A version conflict requires fresh role and member reads, explicit reselection, and renewed confirmation before submitting a new request. Do not retry with another member, role, MCP, or project after a refusal or conflict. - The mutation response's
snapshot_scope: assignment_commitidentifies a historical snapshot of committed local desired state, including on receipt replay. Never reuse its member version for a new write. Verify current local state rather than treating that snapshot as final proof:- Call
list_access_rolesagain and confirm the selected role's current local state. - Call
get_mcp_accessagain and confirm the role remains eligible and still has exactly all confirmed grants for the selected MCP. - Call
list_access_membersagain with the original identity query without a role filter. Preserve the original privacy cohort; do not filter by the newly assigned role. Confirm the selected masked member is listed with that role when privacy-safe enumeration is available. - If member enumeration is suppressed or any evidence is stale, incomplete, or inconsistent, report local verification as incomplete. Never bypass suppression by changing filters or infer membership from counts.
- Call
- Report the selected project, MCP, custom role, masked member, and confirmed grants as committed local desired state only when supported by the evidence. Clearly separate the historical commit from current local verification and pending or unverified provider synchronization. These tools do not verify provider convergence or effective provider access; do not claim either from their local results.
Project, MCP, custom-role, masked-member, complete-grant, and final assignment choices all remain explicit conversation checkpoints. All selectors and mutation-control fields remain agent-operational.