# Check whether a sign-in link can still be answered

> Page: https://docs.plotwork.dev/api/get-user-mcp-request. Index of every page: https://docs.plotwork.dev/llms.txt

open for a link that can be approved or denied, used for one already answered by any account, expired for one past its ten minutes, invalid for one the MCP server did not sign.

`GET /user/mcp/request`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Check whether a sign-in link can still be answered. |
| What does it take? | `request` in the query string. |
| What does it return? | Status 200 with a body of type [`McpRequestState`](https://docs.plotwork.dev/api/schemas.md#mcprequeststate). |
| What can go wrong? | `400` no request was sent; `401` not signed in; `429` too many requests; `503` connecting an agent is not set up on this server. Every failure uses the one error envelope. |

## What it does

open for a link that can be approved or denied, used for one already answered by any account, expired for one past its ten minutes, invalid for one the MCP server did not sign. The approval checks again.

## Query parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `request` | `string` | yes | The signed request the consent page was opened with, exactly as received. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | What the link is now. | [`McpRequestState`](https://docs.plotwork.dev/api/schemas.md#mcprequeststate) |
| 400 | No request was sent. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 401 | Not signed in. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 503 | Connecting an agent is not set up on this server. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## Response body

A 200 answer has the type [`McpRequestState`](https://docs.plotwork.dev/api/schemas.md#mcprequeststate).

| Field | Type | Required | Description |
|---|---|---|---|
| `state` | `"open" \| "used" \| "expired" \| "invalid"` | yes | `open`: it can be approved or denied. `used`: it was approved or denied already, by any account; each sign-in link works once. `expired`: its ten minutes are over. `invalid`: the MCP server did not sign it. |
| `expiresIn` | `integer \| null` | yes | For `open`, the seconds until it stops being good. Null otherwise. |

## See also

| Doc | Why |
|---|---|
| [API reference](https://docs.plotwork.dev/api/reference.md) | Every endpoint, and the error envelope |
| [Schemas](https://docs.plotwork.dev/api/schemas.md) | Every request and response type |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The operations as callable tools |
