# MCP

### What Is the Model Context Protocol?

The **Model Context Protocol (MCP)** is an open standard that lets AI models connect to external tools and data sources. Think of it as a USB port for AI — a universal interface that any AI client can plug into to gain new capabilities.

When an AI model connects to an MCP server, it gains access to **tools** (functions it can call), **resources** (data it can read), and **prompts** (templates it can use). The model decides when and how to use these capabilities based on the conversation.

***

### How OBTO Uses MCP

OBTO exposes its entire deployment platform as an MCP server. When you connect your AI client to your OBTO MCP endpoint, the AI model gains the ability to:

* **Create applications** — Scaffold new full-stack projects
* **Deploy code** — Write server scripts, routes, pages, stylesheets, and JavaScript modules directly to the platform
* **Read existing code** — Fetch any artifact to understand or modify it
* **Search codebases** — Semantic vector search across your entire app
* **Generate previews** — Create live preview URLs for testing
* **Patch files** — Surgically modify existing code without rewriting entire files

The AI doesn't need a terminal, a file system, or Git. It uses OBTO's MCP tools to deploy code the same way a human developer would use an IDE and a deploy script — except it does it in seconds, within the same conversation where you described what you wanted.

***

### Your MCP Endpoint

Every OBTO user gets a personal MCP server URL. This URL is unique to your account and scoped to your environment (domain).

**Format:**

```
https://{your-domain}.obto.co/ms/mcp
```

You receive this URL after signing in at [obto.co](https://www.obto.co). It's displayed on your landing page.

***

### Connecting Your AI Client

Each AI client has a different way to add MCP servers. Here's the overview:

#### Claude Desktop

1. Open **Settings** → **MCP Servers**
2. Click **Add Server**
3. Paste your OBTO MCP endpoint URL
4. Claude will redirect you to authenticate via OAuth
5. Click **Approve** — OBTO's tools will appear in your available tools

#### Claude Web

1. Open or create a **Project**
2. In project settings, go to **Integrations**
3. Add your OBTO MCP server URL
4. Authorize when prompted

#### Cursor

1. Open **Settings** → **MCP**
2. Add a new server with your OBTO endpoint URL
3. The tools appear automatically after connection

#### VS Code (GitHub Copilot)

1. Add MCP server configuration to your `settings.json` or `.vscode/mcp.json`
2. Specify the OBTO endpoint URL
3. Restart — tools are available through Copilot

#### OpenAI Codex

1. Add your OBTO MCP endpoint URL in the agent configuration
2. Tools are available once connected

For detailed per-client setup guides, see the dedicated pages: Claude, Codex, AntiGravity, VSCode, Cursor IDE.

***

### The OBTO Skill File

Connecting the MCP server gives the AI access to tools. But for the AI to use those tools *correctly*, it needs context — deployment order, platform conventions, collection types, the `xe.` pattern, and more.

That's what the **OBTO Skill file** (`SKILL.md`) provides. It's a set of instructions that teaches AI models how to build applications on OBTO.

**Download it from GitHub:** [github.com/obto-inc/platform](https://github.com/obto-inc/platform)

Place the skill file where your AI client can access it:

| Client         | Where to Put SKILL.md                        |
| -------------- | -------------------------------------------- |
| Claude Desktop | Add to project knowledge or attach as a file |
| Claude Web     | Upload as a file attachment                  |
| Cursor         | Place in workspace root or `.cursor/skills/` |
| VS Code        | Place in workspace root                      |
| AntiGravity    | Place in `.agent/skills/` directory          |

> **Why is this separate from the MCP server?** MCP defines what tools are available. The Skill file teaches the AI *when* and *how* to use them. This separation means you can upgrade the skill instructions independently of the platform's tooling.

***

### Authentication Flow

OBTO uses **OAuth 2.0** for MCP authentication:

1. Your AI client sends a connection request to your MCP endpoint
2. OBTO redirects to Google OAuth for authentication
3. You approve the connection
4. The AI client receives a token scoped to your domain
5. All subsequent tool calls are authenticated automatically

Your token is scoped to your OBTO domain — the AI can only access applications and data within your environment.

***

### Next Steps

* **MCP Tools - OOB** — See every tool available out of the box
* **Create Tool** — Build custom MCP tools for your specific workflows
