---
title: "Store Mcp Oauth User Credential"
method: POST
path: "/v1/mcp/server/{server_id}/oauth-user-credential"
tags: ["mcp_management"]
---

# Store Mcp Oauth User Credential

`POST /v1/mcp/server/{server_id}/oauth-user-credential`

Store the calling user's OAuth2 token for an OpenAPI MCP server

## Path parameters

- `server_id` string, required

## Request body

- MCPOAuthUserCredentialRequest — Stores a user's OAuth2 token for an OpenAPI MCP server.
  - `access_token` string, required
  - `expires_in` integer, nullable
  - `refresh_token` string, nullable
  - `scopes` string[], nullable

## Response `200`

Successful Response

- MCPOAuthUserCredentialStatus — Describes whether the calling user has a stored OAuth credential.
  - `connected_at` string, nullable
  - `expires_at` string, nullable
  - `has_credential` boolean, required
  - `is_expired` boolean
  - `server_id` string, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-19** `c357baf422ab` — 2 info
  - api tag `mcp_management` added
  - api tag `mcp` removed
- **2026-09-18** `082b5fabd909` — 1 info
  - endpoint added
- **2026-09-16** `7afc3544d64d` — 1 breaking
  - api path removed without deprecation
- **2026-09-12** `0915d6a9ba99` — 1 info
  - endpoint added
- **2026-09-11** `f9848f60f12d` — 1 breaking
  - api path removed without deprecation

[Full history](https://skmtc.dev/flock/apis/litellm-api/changes/v1/mcp/server/:server_id/oauth-user-credential/post.md)

---

[API](https://skmtc.dev/flock/apis/litellm-api.md) · [All operations](https://skmtc.dev/flock/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flock/apis/litellm-api/revisions/3b2b241e4b0b?raw)
