---
title: "Store MCP OAuth token from an agent container"
method: POST
path: "/api/projects/{projectId}/credentials/mcp"
tags: ["Credentials"]
---

# Store MCP OAuth token from an agent container

`POST /api/projects/{projectId}/credentials/mcp`

Store MCP OAuth token from an agent container. Accepts a JSON request body when defined and returns the resulting resource or action status.

## Path parameters

- `projectId` string, required

## Request body

- MCPTokenRequest — mCPToken Request payload accepted by the API.
  - `url` string, required — URL for a browser or API client to use.
  - `accessToken` string, required — access Token value for the mCPToken Request object.
  - `refreshToken` string — refresh Token value for the mCPToken Request object.
  - `expiresAt` integer — expires At value for the mCPToken Request object.

## Response `200`

Token stored

- Credential — Credential metadata returned without secret material.
  - `id` string — Stable identifier for the object.
  - `provider` string — Provider name or key.
  - `name` string — Human-readable name.
  - `description` string — Optional human-readable description.
  - `authType` string — auth Type value for the credential object.
  - `configured` boolean — configured value for the credential object.
  - `agentVisible` boolean — agent Visible value for the credential object.
  - `visibility` CredentialVisibility — credential Visibility API object.
    - `tools` boolean, required — Collection of tool values.
    - `console` boolean, required — console value for the credential Visibility object.
    - `services` boolean, required — Collection of service values.
    - `hooks` boolean, required — Collection of hook values.
  - `inactive` boolean — inactive value for the credential object.

## Changes

> 11 revisions in range; 1 could not be searched.

- **2026-06-01** `90fa68eb439c` — 5 breaking, 1 info
  - the `visibility` response's property type/format changed from `object`/`` to ``/`` for status `200`
  - removed the required property `visibility/console` from the response with the `200` status
  - removed the required property `visibility/hooks` from the response with the `200` status
  - removed the required property `visibility/services` from the response with the `200` status
  - …2 more
- **2026-05-29** `2d34481e85d7` — 1 breaking, 5 info
  - the `visibility` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - removed `#/components/schemas/CredentialVisibility` from the `visibility` response property `allOf` list for the response status `200`
  - added the required property `visibility/console` to the response with the `200` status
  - added the required property `visibility/hooks` to the response with the `200` status
  - …2 more

[Change history](https://skmtc.dev/ibuildthecloud/apis/discobot-server-api/changes/api/projects/:projectId/credentials/mcp/post.md)

---

[API](https://skmtc.dev/ibuildthecloud/apis/discobot-server-api.md) · [All operations](https://skmtc.dev/ibuildthecloud/apis/discobot-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ibuildthecloud/discobot-server-api/revisions/4de3fcd6be56/schema)
