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

# 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
  - `refresh_token` string, nullable
  - `expires_in` integer, nullable
  - `scopes` string[], nullable

## Response `200`

Successful Response

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

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/flock/apis/litellm-api.md) · [All operations](https://skmtc.net/flock/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flock/litellm-api/revisions/8fbaab4fc7c5/schema)
