# Upfyn-Code MCP Server

Connect any MCP client to control your Upfyn-Code instance

## Quick Start

1
Get your API key — Log into Upfyn-Code, go to Settings, then API Keys. Click "Generate New Key".
2
Add MCP config to your client (see examples below).
3
Start using tools — Your client can now send prompts, manage canvas, and control sessions.

## Client Configuration

Get your personalized MCP configuration from the Dashboard at `cli.upfyn.com/dashboard`. It includes the exact URL and credentials for your account — just copy and paste into your AI tool's MCP settings.

### Claude Desktop

Add to `~/.claude/mcp_servers.json`:

    {
      "upfynai": {
        "type": "streamable-http",
        "url": "YOUR_MCP_URL",
        "headers": {
          "x-api-key": "YOUR_API_KEY_HERE"
        }
      }
    }

### Claude Code CLI

    claude mcp add upfynai \
      --transport streamable-http \
      YOUR_MCP_URL \
      --header "x-api-key: YOUR_API_KEY_HERE"

### Cursor

Add to `.cursor/mcp.json` in your project:

    {
      "mcpServers": {
        "upfynai": {
          "url": "YOUR_MCP_URL",
          "headers": { "x-api-key": "YOUR_API_KEY_HERE" }
        }
      }
    }

### Any HTTP MCP Client

    POST YOUR_MCP_URL
    Headers:
      Content-Type: application/json
      x-api-key: YOUR_API_KEY_HERE

## Capabilities

Once connected, your MCP client can:

Send AI prompts and receive streaming responses
Browse and manage your projects
View and manage active sessions
Interact with the Upfyn Canvas
Control running AI sessions

The full list of available tools and resources is auto-discovered by your MCP client when it connects.

## Authentication

All MCP requests require authentication using an API key:

API Key:
`x-api-key: YOUR_API_KEY_HERE`

Generate API keys from Settings → API & Tokens in the web UI.

Security: Keep your API key secret. Each key is tied to your user account. You can revoke keys at any time from Settings.