Skip to Content
ReferenceMCP Integration

MCP Integration

OpenFactory supports the Model Context Protocol (MCP) , an open standard that lets AI assistants like Claude, Cursor, and other MCP-compatible clients interact directly with OpenFactory. Build OS images, manage VMs, run tests, and browse recipes — all through natural language.

Quick Start

Claude Desktop

Add this to your Claude Desktop configuration (~/.claude/claude_desktop_config.json):

{ "mcpServers": { "openfactory": { "url": "https://console.openfactory.tech/api/mcp/sse" } } }

Cursor

Add this to your Cursor MCP settings (.cursor/mcp.json):

{ "mcpServers": { "openfactory": { "url": "https://console.openfactory.tech/api/mcp/sse" } } }

Claude Code

claude mcp add openfactory \ --transport sse \ --url "https://console.openfactory.tech/api/mcp/sse"

Claude.ai (Browser)

You can also connect OpenFactory directly in the Claude.ai web app:

  1. Open claude.ai  and go to Settings
  2. Navigate to CustomizeConnectors
  3. Click the + button to add a new connector
  4. Enter the SSE endpoint: https://console.openfactory.tech/api/mcp/sse
  5. Name it OpenFactory and save

Once connected, you’ll see all 21 OpenFactory tools listed under the connector. Set tool permissions to Needs approval or Always allow based on your preference.

OpenFactory MCP connector configured in Claude.ai settings, showing all 21 available tools

Restart your client and you’ll see OpenFactory’s tools available.

Connection

PropertyValue
SSE Endpointhttps://console.openfactory.tech/api/mcp/sse
Messages Endpointhttps://console.openfactory.tech/api/mcp/messages
TransportSSE (Server-Sent Events)

The MCP server uses the SSE transport. Your MCP client connects to the SSE endpoint for server-to-client messages and posts to the messages endpoint for client-to-server messages. Most MCP clients handle this automatically.

Your session is tied to your IP address, so your builds, VMs, and test results persist across requests.

Available Tools

OpenFactory exposes 21 tools across 4 categories.

Build Tools

ToolDescriptionKey Parameters
list_buildsList your builds with status and featuresstatus_filter, limit
get_buildGet full details of a build including its recipebuild_id
get_build_statusGet current status with stage informationbuild_id
create_buildCreate a new build from a reciperecipe (name, base_image, features, packages, services, networking, security)
get_iso_download_urlGet the download URL for a completed buildbuild_id
retry_buildRetry a failed build with the same recipebuild_id

Recipe Tools

ToolDescriptionKey Parameters
list_recipesBrowse pre-built recipe templatescategory, search
list_recipe_categoriesList all recipe categories with descriptions
get_recipeGet full recipe details including packages and servicesrecipe_id
validate_recipeValidate a recipe without starting a buildrecipe
create_recipe_from_templateCustomize an existing recipe templatetemplate_id, name, modifications

VM Tools

ToolDescriptionKey Parameters
list_vmsList your running VMsbuild_id
create_vmCreate and start a VM from a buildbuild_id, name, memory_mb, vcpus
start_vmStart a stopped VMvm_name
stop_vmStop a running VM (graceful or forced)vm_name, force
delete_vmDelete a VM and its resourcesvm_name
get_vm_console_urlGet the VNC console URL for a VMvm_name

Test Tools

ToolDescriptionKey Parameters
run_testsRun tests on a built ISO by creating a test VMbuild_id, tests, memory_mb, vcpus, timeout_seconds
get_test_resultsGet detailed results of a test runrun_id
list_test_runsList test runs for your buildsbuild_id, limit
stop_test_runStop a running test and clean up VMsrun_id

Examples

Once connected, you can interact with OpenFactory using natural language:

Building an image:

“Build me a Debian Bookworm server with SSH, Docker, and monitoring enabled”

Checking build status:

“Show my recent builds” or “What’s the status of my latest build?”

Running tests:

“Run tests on build abc123” or “Show the test results for my last build”

Working with recipes:

“Show me the available healthcare recipes” or “Create a build from the GxP MedTech template with extra packages: vim, htop”

Managing VMs:

“Create a VM from my latest build” or “List my running VMs”

Sign In

If you create an account at console.openfactory.tech , you can link your MCP client to it with an API key. This lets you access builds from the web console and keeps your work consistent across different networks and devices.

Creating an API Key

  1. Sign in at console.openfactory.tech 
  2. Go to Settings and generate an MCP API key
  3. Add the key to your client config:

Claude Desktop / Cursor:

{ "mcpServers": { "openfactory": { "url": "https://console.openfactory.tech/api/mcp/sse", "headers": { "Authorization": "Bearer of_mcp_your_key_here" } } } }

Claude Code:

claude mcp remove openfactory claude mcp add openfactory \ --transport sse \ --url "https://console.openfactory.tech/api/mcp/sse" \ --header "Authorization: Bearer of_mcp_your_key_here"

Managing API Keys

You can also manage keys via the API:

# Create a key POST /api/mcp-keys Authorization: Bearer <your_jwt_token> Content-Type: application/json {"name": "Claude Desktop"}
# List keys GET /api/mcp-keys Authorization: Bearer <your_jwt_token>
# Revoke a key DELETE /api/mcp-keys/{key_id} Authorization: Bearer <your_jwt_token>

API keys are prefixed with of_mcp_ and shown only once when created. Revoking a key immediately disconnects any clients using it.

Troubleshooting

Connection refused or timeout

Test the connection with:

curl -H "Accept: text/event-stream" \ https://console.openfactory.tech/api/mcp/sse

You should see SSE events streaming back. If not, the service may be temporarily unavailable.

Tools not appearing

Restart your MCP client after adding the server configuration. Claude Desktop and Cursor may need a full restart to pick up new MCP servers.

”Invalid API key” error

If you’re using an API key, verify it hasn’t been revoked. Remove the Authorization header to fall back to your default session, or generate a new key from the console.

Build or VM operations failing

Check that the operation is valid (e.g., you can only download ISOs from completed builds).