Tool Gateway is in beta.
The Connected as selector is on Tools > MCP servers, in the Workspace view.
The API examples on this page use the environment variables from the quickstart. Managing another owner’s credentials requires a user credential, such as a personal access token, not a service key.
Connect your own account
Connect your own account to call a server as yourself, for example from an MCP client that uses your API key. Each user connects separately, and no one else can use your credential.- UI
- API
- Go to Tools > MCP servers.
- On the server’s row, click Connect.
- Complete the step for the server’s credential type:
- OAuth: In the tab that opens, approve access with the service. A LangSmith page confirms that authentication succeeded.
- API key: Enter your key, then click Save and connect.
Connect an account for an agent
An agent’s credential lets the agent call a server as itself, on calls made with an API key bound to the agent’s environment. Each agent environment holds its own credentials, so an agent’s development and production environments can use different accounts. Connecting for an agent requires theworkspaces:credentials:manage permission, plus projects:update on the tracing project of the agent environment.
- UI
- API
- Go to Tools > MCP servers, and set Connected as to Agent.
- Choose the agent, then choose the environment.
- On the server’s row, click Connect, and complete the sign-in or enter the API key for the agent.
409 until an admin connects it.
Connect an account for a profile
A profile is a named set of credentials that an admin connects once, for agents or other callers that run with no one signed in. A caller selects the profile by sending its ID in theX-LangSmith-Profile header. See Act as users and agents.
Creating a profile and connecting its credentials require the workspaces:credentials:manage permission. Connecting a server also requires permission to call that server.
- UI
- API
- Go to Tools > MCP servers, and set Connected as to Profile.
- Click Add profile, enter a name, such as
Support agent, and click Create profile. - On each server’s row, click Connect, and complete the sign-in or enter the API key for the profile.
409 until an admin connects one.
To rename or delete a profile, use the profile’s actions menu in the UI, or PATCH or DELETE /v1/managed-tools/profiles/<profile-id>. Deleting a profile deletes every credential connected to it and revokes its OAuth tokens with the provider. Agents that use the profile stop working.
Connect one API key for the workspace
A workspace credential is one API key that every caller of a server uses, including agents in the workspace. Use it for a service where everyone shares one account, so that no user needs to connect their own key. Only a workspace server that expects an API key accepts a workspace credential. Setting one requires theworkspaces:credentials:manage permission.
To set the key when you add the server, select API key, set Credentials to Workspace, and enter the key. In the API, include "credential": {"owner_type": "workspace", "fields": {...}} in the POST /v1/managed-tools/servers request. See Add MCP servers.
To set or replace the key on a server that already exists, use the API:
409.
Disconnect an account
Disconnecting deletes one owner’s credential and keeps the server and every other owner’s credentials. Calls that relied on the credential fail until the owner connects again. Disconnecting revokes OAuth tokens with the provider. To disconnect your own account:- UI: On Tools > MCP servers, open the server, then click Disconnect. Do not use the row’s delete action, which deletes the server for everyone.
-
API:
- An agent: Add
?credential_owner_type=agent_identity&credential_owner_id=<agent-environment-id>. - A profile: Send
DELETE /v1/managed-tools/profiles/<profile-id>/servers/<server-id>/credential. - The workspace: Add
?credential_owner_type=workspace&credential_owner_id=$LANGSMITH_WORKSPACE_ID. Callers then have no credential for the server until they connect their own.
204 if the owner is already disconnected.
If the server uses Manual OAuth, your credential lives in a shared Agent Auth connection. Disconnecting removes it from every server and integration that uses that connection.
See also
Connect these docs to your agent of choice via MCP for real-time answers.

