---
title: "Force-refresh the access token for an MCP server"
method: POST
path: "/api/mcp-oauth/{mcpServerId}/refresh"
tags: ["MCP OAuth"]
---

# Force-refresh the access token for an MCP server

`POST /api/mcp-oauth/{mcpServerId}/refresh`

## Path parameters

- `mcpServerId` string, required

## Request body

- object
  - `userId` string

## Response `200`

Refreshed token

- object
  - `ok` true, required
  - `expiresAt` string, nullable, required
  - `scope` string, nullable, required

## Other responses

- `404` — No token for this MCP server
- `500` — Refresh failed

---

[API](https://skmtc.net/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.net/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/versions/101e7a060651/schema)
