> ## Documentation Index
> Fetch the complete documentation index at: https://docs.askfutures.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> How sign-in works for the MCP server, how long tokens last, and how to get MCP access enabled.

Connecting to the AskFutures MCP server uses standard **OAuth 2.1 with PKCE** —
the same secure browser-based sign-in your MCP client already knows how to do.
You don't paste keys or manage secrets by hand.

<Warning>
  **MCP access is not self-serve yet.** There is currently no toggle in the app to
  turn it on. To get access enabled on your account, email
  [support@askfutures.com](mailto:support@askfutures.com) from the address you
  sign in with and ask for MCP access. Until it's granted, you can sign in but
  tool calls won't be authorized.
</Warning>

## How sign-in works

When you add the server (see the [quickstart](/developers/quickstart)), your
client handles the whole flow for you:

<Steps>
  <Step title="Your client starts the flow">
    On first connect, the MCP client kicks off an OAuth 2.1 authorization request
    with PKCE — a proof-key handshake that keeps the exchange secure even though
    no shared client secret is involved.
  </Step>

  <Step title="You sign in on a hosted page">
    Your browser opens an AskFutures sign-in page. You authenticate there — the
    same account you use for the web app — and approve access for the client.
  </Step>

  <Step title="The client receives a token">
    AskFutures returns a short-lived access token to your client over the secure
    PKCE exchange. Your client stores it and sends it with every tool call.
  </Step>

  <Step title="Tokens refresh automatically">
    When the access token expires, your client uses its refresh token to get a new
    one in the background. You stay signed in without re-authenticating.
  </Step>
</Steps>

```mermaid theme={null}
flowchart LR
  C["MCP client"] -->|"1. start OAuth + PKCE"| A["AskFutures<br/>sign-in page"]
  A -->|"2. you sign in"| A
  A -->|"3. access + refresh token"| C
  C -->|"4. Bearer token on every call"| M["AskFutures<br/>MCP server"]
  C -.->|"refresh when expired"| A
```

## Token lifetimes

| Token             | Lifetime      | Notes                                       |
| ----------------- | ------------- | ------------------------------------------- |
| **Access token**  | about 1 hour  | Sent with every tool call. Short by design. |
| **Refresh token** | about 30 days | Used to silently mint new access tokens.    |

Refresh tokens are **rotated**: each time your client refreshes, it gets a brand
new refresh token and the old one is retired. This is an OAuth 2.1 security
requirement and your client handles it automatically. If you don't use a
connection for longer than the refresh window, you'll simply be asked to sign in
again next time.

<Note>
  All of this is automatic. Once you've signed in through your client, you
  generally won't think about tokens again — the client refreshes and rotates
  them for you in the background.
</Note>

## Getting access enabled

<AccordionGroup>
  <Accordion title="How do I request MCP access?" icon="envelope">
    Email [support@askfutures.com](mailto:support@askfutures.com) from your
    account's email address and ask for MCP access. We'll enable it on your
    account.
  </Accordion>

  <Accordion title="I signed in but tool calls fail" icon="circle-exclamation">
    Sign-in succeeding only means your identity is verified. Calls are rejected
    until MCP access is granted on your account. If you've already requested it
    and still see failures, reach out to support so we can check the grant.
  </Accordion>

  <Accordion title="Do I need a separate AskFutures account?" icon="user">
    No. MCP access uses the same account as the web app. Sign in with the email
    you already use, and request MCP access for that same address.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={3}>
  <Card title="Connect the MCP server" icon="plug" href="/developers/quickstart">
    Add AskFutures to Claude Code, Cursor, or Codex.
  </Card>

  <Card title="Developers overview" icon="code" href="/developers/overview">
    The async create → wait → optimize model.
  </Card>

  <Card title="MCP tools" icon="screwdriver-wrench" href="/developers/tools">
    Every tool, what it does, and what it returns.
  </Card>
</CardGroup>
