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

# MCP Overview

> Use Artificial Studio from Claude Code, Cursor, and any MCP-compatible AI.

The Artificial Studio **MCP server** lets AI editors and assistants generate images, videos, audio, and 3D directly — no code, no API keys, no glue scripts. One URL, OAuth login, done.

<Note>
  MCP (Model Context Protocol) is an open standard created by Anthropic that lets AI apps connect to external tools over a common interface. Think of it as "USB-C for AI tools".
</Note>

## Endpoint

```
https://api.artificialstudio.ai/mcp
```

* **Transport**: HTTP (streamable)
* **Auth**: OAuth 2.1 with PKCE — no API keys
* **Stateless**: every request authenticates with a Bearer token

## What you can do from your AI

Once connected, your AI has access to 6 tools:

| Tool               | Description                                                         |
| ------------------ | ------------------------------------------------------------------- |
| `search_tools`     | Find the right tool for a task ("generate image", "text to speech") |
| `get_tool_detail`  | Get the input schema and pricing for a specific tool                |
| `generate`         | Submit a generation job (async — returns a `job_id`)                |
| `check_generation` | Poll a job until it completes                                       |
| `list_generations` | List your recent generations                                        |
| `get_account`      | Check credits remaining and plan info                               |

See the full [tool reference](/mcp/tools) for details.

## Why MCP instead of the API?

|              | MCP                      | REST API                     |
| ------------ | ------------------------ | ---------------------------- |
| **Use case** | Chat/editor workflows    | Programmatic / production    |
| **Auth**     | OAuth (sign in once)     | API key                      |
| **Setup**    | 1-line install           | Write code                   |
| **Best for** | Exploration, quick tasks | Apps, automation, batch jobs |

You don't have to choose — the same account, credits, and plan work for both.

## How it works

<Steps>
  <Step title="Install">
    Add the MCP server to Claude Code, Cursor, Claude Desktop, or Windsurf with one command.
  </Step>

  <Step title="Authenticate">
    First request triggers an OAuth flow: a browser opens, you sign in to Artificial Studio, approve access. A token is stored locally.
  </Step>

  <Step title="Use it">
    Ask your AI: *"Generate an image of a dog surfing"*. It discovers the right tool, picks a model, runs it, and shows you the result.
  </Step>
</Steps>

## Async generation — important

Image and especially video generation can take seconds to several minutes. The MCP server handles this with an **async pattern**:

1. `generate` returns **immediately** with a `job_id` and `status: "pending"`.
2. Your AI client polls `check_generation` with that `job_id` every few seconds.
3. When `status: "success"`, the `output` field contains the result URL.

The server sends `poll_after_seconds` as a hint so your AI waits the right amount of time. This prevents HTTP timeouts on long jobs (like Veo 3.1 videos).

See [Async & polling](/mcp/async-polling) for details.

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/mcp/quickstart">
    Install the MCP server in your AI editor — 60 seconds.
  </Card>

  <Card title="Authentication" icon="lock" href="/mcp/authentication">
    How OAuth works and how tokens are stored.
  </Card>

  <Card title="Tool reference" icon="wrench" href="/mcp/tools">
    Complete reference of all 6 MCP tools.
  </Card>

  <Card title="Async & polling" icon="clock" href="/mcp/async-polling">
    How long-running generations work under MCP.
  </Card>
</CardGroup>
