Sign in at an MCP server where each person signs in
const url = 'https://api.asklucy.eu/v1/mcp-servers/mcp_8Qk2LmN4Rt7Wx1Yz3Aa5/connection';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"return_url":"https://example.com"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.asklucy.eu/v1/mcp-servers/mcp_8Qk2LmN4Rt7Wx1Yz3Aa5/connection \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "return_url": "https://example.com" }'For a server with auth.type oauth (the organization’s, or yours): Lucy follows the MCP authorization spec
as a client. It discovers the server’s protected-resource metadata and its authorization server, uses its
client ID metadata document (https://api.asklucy.eu/v1/connectors/mcp/client.json) or registers
dynamically, and returns the authorization address with PKCE (S256) and the server as the resource. Open it
in the browser; the authorization server sends it back to https://api.asklucy.eu/v1/connectors/mcp/callback,
and Lucy to return_url with ?connector=mcp&result=connected|denied|error. The tokens are sealed, bound to
you and the server, used only for calls to that server, and refreshed as needed. 409 not-oauth for another
kind of server, 502 oauth-discovery-failed when the server doesn’t publish what’s needed.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
mcp_8Qk2LmN4Rt7Wx1Yz3Aa5Request Bodyrequired
Section titled “Request Bodyrequired”object
Where to send the browser afterwards. An address of the Lucy web app (https, or localhost).
Example generated
{ "return_url": "https://example.com"}Responses
Section titled “Responses”OK
object
Example generated
{ "authorization_url": "https://example.com"}The request is invalid; errors lists what’s wrong.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
Missing, expired or invalid token.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
No such object in your organization.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
The object isn’t in a state that allows this (e.g. Lucy is already answering).
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
Another service Lucy needed didn’t answer as it should (the problem’s type says which).
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.