---
title: "Finish an MCP OAuth consent with the code the provider returned"
method: POST
path: "/mcp/oauth/complete"
tags: ["mcp"]
---

# Finish an MCP OAuth consent with the code the provider returned

`POST /mcp/oauth/complete`

## Request

- Base URL: `https://api.letsship.ai/v1`
- URL: `https://api.letsship.ai/v1/mcp/oauth/complete`
- Auth: none declared

## Request body

- CompleteMcpOAuthRequest
  - `code` string, required
  - `state` string, required

## Response `200`

Credential stored

- CompleteMcpOAuthResponse
  - `projectId` string, required
  - `serverName` string, required
  - `returnTo` string, nullable, required

## Other responses

- `400`: Invalid
- `403`: Role insufficient
- `404`: Not found
- `502`: The MCP server's OAuth step failed
- `503`: Not configured

---

[API](https://skmtc.dev/letsship/apis/ship-api.md) · [All operations](https://skmtc.dev/letsship/apis/ship-api/llms.txt) · [OpenAPI document](https://skmtc.dev/letsship/apis/ship-api/revisions/e6eac1bcadd4?raw)
