flexx logoflexx docs

MCP Configuration for AI Agents

Configure Cursor, Claude Desktop, ChatGPT, OpenAI Codex, and other MCP-compatible AI tools to connect to your machine via flexx. Includes config snippets and the complete list of available MCP tools.

What is MCP?

Model Context Protocol is an open standard for AI agents to interact with external tools. flexx exposes your machine's capabilities as MCP tools that any compatible agent can call.

Your MCP endpoint

After running flexx setup, your MCP endpoint is:

https://relay.flexx.dev/v1/mcp

Authentication is handled via OAuth 2.1 with PKCE — your AI tool will prompt you to approve access through a consent flow in the dashboard.

Which tools you get depends on what is connected

The memory tools are available as soon as you connect — no machine required. The remote tools (files, shell, screenshots, tunnels) appear once a machine with the flexx CLI is online. See Memory for the full story.

That holds at the consent screen too: with no machine registered you can still approve the request — Remote Access starts switched off, Memory is granted, and the client connects immediately. Run flexx connect on a machine whenever you want the rest, then re-authorize the client to add Remote Access.

Configure your AI tool

Cursor

  1. Open Settings → MCP → Add Server
  2. Set the URL to:
https://relay.flexx.dev/v1/mcp

Cursor handles OAuth authentication automatically. You'll be prompted to approve access on first connection.

Claude Desktop

Add to ~/.claude/mcp_servers.json:

{
  "flexx": {
    "url": "https://relay.flexx.dev/v1/mcp"
  }
}

ChatGPT

Use the MCP endpoint URL directly in your ChatGPT MCP tool configuration:

https://relay.flexx.dev/v1/mcp

OAuth 2.1 with PKCE is supported — ChatGPT will handle the consent flow automatically.

OpenAI Codex

Add flexx as an MCP server in your Codex configuration:

https://relay.flexx.dev/v1/mcp

Any MCP client

flexx works with any tool that supports the Model Context Protocol standard:

SettingValue
Endpoint URLhttps://relay.flexx.dev/v1/mcp
ProtocolMCP (Model Context Protocol)
AuthenticationOAuth 2.1 with PKCE
TransportHTTP + Server-Sent Events

Available MCP tools

Memory tools

Always available — no machine required. Documented in full under Memory: memory_roots, memory_recall, memory_search, memory_remember, memory_relate, memory_forget.

Remote tools

Remote tools are auto-discovered based on what's installed on the machine, and only appear once a machine with the CLI is connected:

File operations

ToolDescription
read_fileRead file contents (supports offset and limit)
write_fileWrite or create files
list_directoryList files and subdirectories
delete_fileDelete a file
glob_filesFind files matching glob patterns (e.g., **/*.ts)

Code editing

ToolDescription
str_replaceFind and replace text in files (exact string match)

Shell

ToolDescription
execute_commandRun shell commands with configurable timeout. Supports optional cwd parameter to run from a subdirectory.
ToolDescription
grep_filesSearch file contents using ripgrep (requires ripgrep installed)

Screenshots

ToolDescription
screenshot_urlCapture a full-page screenshot of a URL (requires Chrome/Chromium)
screenshot_elementCapture a specific DOM element by CSS selector

Tunneling

ToolDescription
tunnel_startExpose a local port via a public URL through the relay
tunnel_stopStop an active tunnel
tunnel_listList all active tunnels

System

ToolDescription
health_checkCheck daemon health and connectivity

Authentication flow

AI Agent
  │
  ├─ Connects to relay.flexx.dev/v1/mcp
  ├─ OAuth 2.1 + PKCE consent flow
  ├─ User approves access and selects remote
  ▼
Relay (relay.flexx.dev)
  │
  ├─ Validates OAuth token
  ├─ Routes to selected remote
  ▼
Your Machine (flexx daemon)
  │
  ├─ Executes MCP tool
  ├─ Returns result
  ▼
Relay → AI Agent

During the consent flow, you choose which remote machine the AI agent connects to. You can revoke access at any time from Dashboard → Settings.

OAuth scopes

ScopePermission
remotes:readView your connected machines and their status
remotes:writeRegister, update, and remove machines
tools:executeRun MCP tools on your machines
profile:readView your account email and organization

Security

  • All communication is encrypted (WSS/HTTPS)
  • Your machine only makes outbound connections
  • OAuth 2.1 with PKCE prevents token interception
  • Tools respect workspace path scoping
  • Commands are filtered through a blocklist
  • File operations have size limits

On this page