Skip to main content
Version: Next

View as Markdown

Set up vMCPs for agents

Agent identities connect to vMCPs the same way users do, through the vMCP's profiles. Unlike a user, an agent can't enter configuration values or sign in to an upstream provider. Each component that an agent uses gets its configuration and upstream account in one of two ways:

  • An administrator sets them up for everyone. Values fixed on the vMCP or in its catalog entry, and OAuth preconfigured on the vMCP, apply to every user and agent of the vMCP. An agent can then use the component on its own, with no user present.
  • They're left to users. When a component needs a value that users enter, or an upstream account that each user connects, an agent can use it only while acting on behalf of a user. The user signs in to Obot, approves the agent, and enters the values and connects the accounts that the agent needs. An agent can act only for the users that its user access allows.

You can mix the two in one vMCP. This page explains how to grant agents a vMCP and set up its components. To prepare an agent to act on behalf of users, see Agents acting on behalf of users.

Grant agents access​

To grant an agent a vMCP, open the vMCP's Profiles. In a profile's Add identities... picker, select the agent by name.

A profile applies to an agent only if it names that agent. All Obot Users and groups match users, never agents, so a vMCP that every user can use isn't available to any agent until a profile names it. There's no option for all agents: granting an agent a vMCP is always deliberate.

Agents are named only by ID. The API, obot mcp validate-catalog and catalog sync reject an agent subject with the ID *.

An agent acting on behalf of a user has the same grants as when it acts on its own, not the user's. The user doesn't need access to the vMCP.

Profiles hold only subjects and permissions. A component's configuration and upstream OAuth are set on the component in the vMCP, and apply to every user and agent of the vMCP.

What an agent gets​

An agent named in several profiles of a vMCP gets everything they grant, as a user does:

  • Tools: the tools of every profile that names the agent, combined. Profiles that match only users, such as All Obot Users, add nothing.
  • Components: every component that any of those profiles grants. A profile with Allow All Access grants all of them; otherwise it grants the ones it enables.
  • Upstream accounts: the vMCP's preconfigured OAuth, one account per component, shared by every user and agent of the vMCP. When the agent acts on behalf of a user, it also gets the accounts that the user connected through the agent for components without preconfigured OAuth. See Upstream OAuth.
  • Configuration values: the values that the vMCP or its catalog entry fixes for everyone, including values from Kubernetes Secrets. When the agent acts on behalf of a user, it also gets the values that the user entered through the agent. See Configuration.

Removing an agent from one profile removes only what that profile granted. Removing it from every profile of the vMCP revokes its access, and its next connection is refused with 403.

Every component granted to the agent must be fully set up. If any component is missing a value or a working upstream account, Obot refuses the whole connection rather than offering fewer tools:

  • An agent acting on its own gets 409 agent_configuration_required or 409 agent_oauth_required.
  • An agent acting on behalf of a user who hasn't set up the component gets 409 agent_user_approval_required, so that it asks the user to approve it again and finish the setup.

Configuration​

Agents never enter configuration values. When an agent acts on its own, a component's server gets only the values fixed for everyone:

  • values that the vMCP fixes with the Fixed policy, including values from Kubernetes Secrets
  • values that the catalog entry sets, including its Secret bindings

A value that users enter on their own connections is never given to an agent acting on its own:

  • An optional value is left unset, and doesn't block the agent.
  • A required value, or a configurable Server URL that the vMCP doesn't fix, blocks every agent granted the component. The connection is refused with 409 agent_configuration_required, naming the component and the key, and readiness reports configuration_required.

For a component that blocks agents, choose one of these:

  • Set the value for everyone. Make it Fixed on the vMCP, or set it in the catalog entry. It then applies to everyone who uses the vMCP, users included, and agents can use the component on their own.
  • Leave it to users. Agents can then use the component only on behalf of a user, with the value that the user enters through the agent.
  • Stop granting the component in the profiles that name agents, if the agents don't need it.

Upstream OAuth​

For an agent to use a component that needs OAuth on its own, an administrator must preconfigure OAuth for the component on the vMCP. Open the component's settings in the vMCP designer and select Authorize in its OAuth section. Any remote component of a shared vMCP can be authorized, whether or not a profile grants it to an agent.

Preconfigured OAuth isn't only for agents. Every user and agent that uses the component through the vMCP acts upstream as the authorized account, and users aren't asked to authorize the component themselves. Authorize only an account that all of them are meant to share.

Without preconfigured OAuth, each user connects their own account. An agent can then use the component only on behalf of a user who connected an account through the agent.

When an agent acting on its own is granted a component that needs OAuth:

  • If there's no preconfigured OAuth, the vMCP isn't ready for the agent. Readiness reports oauth_required, and connections get 409 agent_oauth_required.
  • If the preconfigured OAuth stops working, connections get 409 agent_oauth_required with oauth_invalid. Readiness shows oauth_invalid when the provider refused a refresh or the URL changed. Authorize the component again to fix it.
  • After an administrator selects Revoke, connections get oauth_required until the component is authorized again.

Preconfigured OAuth that stops working also blocks the agent when it acts on behalf of a user. The user can't connect their own account in its place, so only an administrator can fix it.

An agent that isn't granted the component never reaches it, so it never uses the component's preconfigured OAuth.

Check readiness​

To see whether an agent can connect, open the agent under Identity & Access > Agents. vMCP readiness lists every vMCP that has a profile naming the agent. For the components those profiles grant, it shows what's missing: a value to fix on the vMCP or the catalog entry, or OAuth to authorize. Each item links to the component's settings in the vMCP designer. Components whose preconfigured OAuth works are listed as Preconfigured.

Readiness describes the agent acting on its own. There's no readiness for each user. What a user can supply when the agent acts on their behalf is marked OBO: values that users enter, and OAuth for components without preconfigured OAuth. A vMCP that lacks only such things is marked OBO instead of Not ready. You can still set them up for everyone on the vMCP instead.

  • OBO applies only while the agent has user access. An agent without it acts for no one, so what users would supply is shown as Not ready.
  • Preconfigured OAuth that no longer works keeps the vMCP Not ready, because only an administrator can fix it.
  • Readiness runs the same checks as a connection. Components that none of the agent's profiles grants don't count, and a vMCP with no profile naming the agent isn't listed.

When an agent acting on its own connects to a vMCP that isn't ready, it gets 409 Conflict with the reasons. It never gets an OAuth challenge or a sign-in link. See Errors. When the reasons are ones a user can supply, the agent can ask a user to approve it and connect on their behalf.

How Obot knows a component needs OAuth​

A component needs OAuth when any of these is true:

  • its catalog entry requires static OAuth;
  • the vMCP holds preconfigured OAuth for it, even OAuth that no longer works;
  • Obot's background check found that it asks for OAuth.

See Which components need OAuth.

Readiness and connections never run the background check themselves. They use the result of the last check that succeeded. Until a check of the component succeeds, for example because the server didn't answer in time, the component doesn't count as needing OAuth, so a server that can't be reached never blocks agents.

Obot doesn't check a component that takes configured headers, such as an API key. Such a component counts as needing OAuth only once the vMCP holds preconfigured OAuth for it. If it asks an agent for OAuth anyway, the agent gets 409 Conflict with agent_oauth_required, never an OAuth challenge.

Catalog-synced vMCPs​

A vMCP synced from a Git catalog is read-only in Obot, but you can still preconfigure OAuth for its remote components there. Syncs keep it. Removing a component from the catalog's vMCP deletes its preconfigured OAuth, and removing the vMCP deletes all of it.

Catalog YAML can name specific agents in profiles, so agents can use catalog-synced vMCPs:

profiles:
- id: nightly-report
name: Nightly report agent
subjects:
- type: agent
id: "7"
vmcpPermissions:
allowAllComponents: true

An agent ID belongs to one Obot deployment. In another deployment that syncs the same catalog, the same ID names a different agent, or none.

  • obot mcp validate-catalog checks only that each agent ID is a decimal ID, such as "7" rather than "agent:7". It can't check that the agent exists.
  • On sync, the ID of a deleted agent matches nobody, because agent IDs are never reused.
  • An ID that no agent has yet grants the agent that is later created with that ID, because agent IDs are assigned in order. Obot logs a warning for it.
  • Neither case fails the sync.

An agent can be named in several profiles of a catalog vMCP, and gets everything they grant, as in any vMCP.

Give each profile an explicit id, as above. Audit records name a profile by its ID, and an explicit ID stays the same when you rename the profile. An id is 1–63 lowercase letters, digits and hyphens, and starts and ends with a letter or digit. Without one, Obot derives the ID from the vMCP and profile names, so renaming the profile makes it a new profile.

Who can do what​

  • Administrators can see agents' readiness, and authorize and revoke preconfigured OAuth.
  • Read-Only Admins and auditors can see readiness and the state of preconfigured OAuth, including who authorized it and when. They can't see configuration values, tokens, or URLs that come from configuration.
  • Agents can't see or change any of this. They can't reach readiness or preconfigured OAuth routes.

A URL that comes from configuration is treated as a value. Readiness and the OAuth section show only its hostname, and errors that would include it show a placeholder instead. A URL fixed by the catalog entry is shown in full.