Skip to content

UP MCP

UPstudio integrates a Model Context Protocol (MCP) server that makes the entire UP model accessible to AI coding assistants. The AI can read controllers, statemachines, and configurations directly from the live UPstudio model — and write back changes using dedicated MCP tools.

This enables a new way of working: instead of manually clicking through the UPstudio UI, you describe what you want in plain language, and the AI builds or modifies the model for you.

Typical use cases:

  • "Create a cylinder controller with states RETRACT, EXTEND and the corresponding commands" — the AI builds the complete structure including statemachine, transitions, and guards
  • "Add a new state ERROR to controller CYL" — the AI reads the existing controller, proposes the change, and implements it after confirmation
  • "What commands does controller AXIS have?" — the AI navigates the model and answers directly

Note

There is still much more to come on this topic in the near future!

Prepare UPstudio

The MCP server is configured directly in UPstudio under Window → Preferences → Actifsource → Remote access. Then restart UPstudio. Once activated, AI tools can connect to it.

UPstudio must be restarted after the change.

Inside UPstudio nothing else is needed

Both UPstudio views wire the server up by themselves:

How you start the CLI MCP configuration
UPai Assistant handed over on the command line — no file is written anywhere
UPai Terminal a .mcp.json is written into the working folder, existing entries are kept

Starting a CLI yourself

Only when you run a CLI from your own terminal, outside UPstudio, does the server have to be declared by hand.

Claude Code — in ~/.claude/settings.json, or the project-level .claude/settings.local.json:

{
  "mcpServers": {
    "up": {
      "url": "http://localhost:8088/mcp/actifsource",
      "type": "http"
    }
  }
}

GitHub Copilot — in VS Code under Settings → Copilot → MCP Servers:

{
  "up": {
    "url": "http://localhost:8088/mcp/actifsource",
    "type": "http"
  }
}

opencode — in ~/.config/opencode/opencode.json. Note the different shape: mcp rather than mcpServers, remote rather than http:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "up": {
      "type": "remote",
      "url": "http://localhost:8088/mcp/actifsource",
      "enabled": true
    }
  }
}

Note

The port number may differ depending on the UPstudio configuration. Check the actual port in the Remote access preferences.

Using with Claude Code CLI

Claude Code is the recommended AI assistant for UP development.

Installation — the native installer needs no Node.js:

curl -fsSL https://claude.ai/install.sh | bash

It puts the CLI in ~/.local/bin/claude. Installing through npm works as well and delivers the same version, if Node.js 18+ is present anyway:

npm install -g @anthropic-ai/claude-code

Starting Claude Code in your UP project folder:

cd /path/to/your/up-project
claude

Before working on the model, the agent needs the UP Developer Agent prompt. It configures all navigation rules, the workflow modes (INFO / EXTEND / BUILD) and the sub-prompt hierarchy for domain-specific tasks (Controller, Statemachine, CodeSnippet, ControllerTree, Plan).

In the UPai Assistant this happens by itself. Every new Claude session sends the prompt as its first action, retrying until the MCP slash commands are registered — a CLI connects to its MCP servers asynchronously, so they are not there the moment it starts. A resumed session already carries the prompt in its context. Only if the retries run out does the Assistant ask you to send it once yourself.

In a CLI you started yourself, send it as the first message:

/mcp__up__startup

The prompt reaches an agent as a slash command only if the CLI registers MCP prompts that way, which today is Claude. With Copilot the same ground rules are supplied through the instructions file below; opencode has neither.

Using with GitHub Copilot

The GitHub Copilot plugin previously integrated into UPstudio (since 7.1.1) has been removed in this version due to instability. The recommended approach is to use GitHub Copilot CLI, started directly in the UP project folder.

Installation (requires an active GitHub Copilot subscription):

npm install -g @github/copilot

Starting Copilot CLI in your UP project folder:

cd /path/to/your/up-project
copilot

Alternative: VS Code

GitHub Copilot can also be used inside VS Code. Install the GitHub Copilot extension, open the UP project folder (File → Open Folder), and start Copilot Chat via the sidebar or with ++ctrl+alt+i++.

Copilot Instructions

To prepare Copilot automatically at session start, add a .github/copilot-instructions.md to your UP project with the following content:

# UP Developer Agent

At the start of every session working with this UP project, load your operating instructions via MCP:

**Server:** `actifsource`**URI:** `up://3f6ad05c-2149-11f1-a3de-97864eed6252`

Read the `text` attribute value and apply it as your operating instructions for all subsequent work.

Then confirm with a short message that you are ready, e.g.: _"UP Developer Agent ready. Actifsource MCP connected."_

This points Copilot to a slim bootstrap prompt (up_copilot) that contains the critical UP rules, MCP tool table and sub-prompt GUID.

Note

Copilot must be started in the UP project folder (the folder containing .github/copilot-instructions.md) for the instructions to be picked up automatically.

Using with opencode

The UPai Assistant also drives opencode, which can talk to a locally served model — so the model runs on your own machine and nothing leaves it. Install it with brew install opencode or npm install -g opencode-ai; locally served providers such as Ollama or LM Studio need no sign-in, and are configured in ~/.config/opencode/opencode.json together with the MCP block shown above.

Note that this backend does not ask for tool permissions: headless opencode rejects every request instead of showing it, so the Assistant runs it with permissions skipped.