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/mcpAuthentication is handled via OAuth 2.1 with PKCE — your AI tool will prompt you to approve access through a consent flow in the dashboard.
Configure your AI tool
Cursor
- Open Settings → MCP → Add Server
- Set the URL to:
https://relay.flexx.dev/v1/mcpCursor 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/mcpOAuth 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/mcpAny MCP client
flexx works with any tool that supports the Model Context Protocol standard:
| Setting | Value |
|---|---|
| Endpoint URL | https://relay.flexx.dev/v1/mcp |
| Protocol | MCP (Model Context Protocol) |
| Authentication | OAuth 2.1 with PKCE |
| Transport | HTTP + Server-Sent Events |
Available MCP tools
Tools are auto-discovered based on what's installed on your machine. Here is the complete list:
File operations
| Tool | Description |
|---|---|
read_file | Read file contents (supports offset and limit) |
write_file | Write or create files |
list_directory | List files and subdirectories |
delete_file | Delete a file |
glob_files | Find files matching glob patterns (e.g., **/*.ts) |
Code editing
| Tool | Description |
|---|---|
str_replace | Find and replace text in files (exact string match) |
Shell
| Tool | Description |
|---|---|
execute_command | Run shell commands with configurable timeout. Supports optional cwd parameter to run from a subdirectory. |
Search
| Tool | Description |
|---|---|
grep_files | Search file contents using ripgrep (requires ripgrep installed) |
Screenshots
| Tool | Description |
|---|---|
screenshot_url | Capture a full-page screenshot of a URL (requires Chrome/Chromium) |
screenshot_element | Capture a specific DOM element by CSS selector |
Tunneling
| Tool | Description |
|---|---|
tunnel_start | Expose a local port via a public URL through the relay |
tunnel_stop | Stop an active tunnel |
tunnel_list | List all active tunnels |
System
| Tool | Description |
|---|---|
health_check | Check 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 AgentDuring 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
| Scope | Permission |
|---|---|
remotes:read | View your connected machines and their status |
remotes:write | Register, update, and remove machines |
tools:execute | Run MCP tools on your machines |
profile:read | View 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