Claude Code with OutSystems 11 (O11)
Service Studio for OutSystems 11 (O11) can run an MCP server that lets an AI agent read and change the module you have open. Projects created with create-outsystems-astro include a Claude Code skill that uses this server to carry out the steps in the O11 guide for you: importing resources, creating the props structure, building the block and wiring the AstroIsland component.
This only works for O11 Reactive modules. O11 Traditional modules are not supported. For ODC, see Claude Code with ODC.
Prerequisites
Section titled “Prerequisites”- Claude Code installed.
- Service Studio for O11 with the MCP server available.
- The Islands O11 Forge component installed, and your module referencing
AstroIsland_Lib(see Adding Islands dependency). - A project generated with
create-outsystems-astro. The skill lives in.claude/skills/outsystems-o11-service-studio/SKILL.mdand is referenced fromCLAUDE.md.
Connect Claude Code to Service Studio
Section titled “Connect Claude Code to Service Studio”-
Open Service Studio, open the module that will host your islands and enable its MCP server. Note the URL it listens on, for example
http://localhost:41820/mcp. -
From the root of your Astro project, add the server to Claude Code. Use the URL from Service Studio:
Terminal window claude mcp add --transport http servicestudio http://localhost:41820/mcpAdd
--scope projectto save it in a.mcp.jsonfile that can be shared with your team. -
Start Claude Code in the project and run
/mcp. Theservicestudioserver should show as connected.
Approvals
Section titled “Approvals”Service Studio keeps you in control of what the agent can do:
- Session approval: on its first call, Claude Code asks Service Studio for a session token. Service Studio shows a dialog naming the agent. Approve it to allow the session. Claude Code reuses the token for the rest of the session.
- Merging changes: every change is applied to a copy of the module and then merged in. Depending on your Service Studio settings, you either review each change in the Compare and Merge window or it is accepted automatically.
- Publishing: Claude Code only publishes when you ask it to. Publishing requires write permission, which you grant in the MCP Server dialog in Service Studio. Until then, publish requests are blocked.
Import your islands
Section titled “Import your islands”-
Set
ASSET_PATHin.envto the name of your module, then generate the output:Terminal window npm run output -
Ask Claude Code to import the output. For example:
Import the Counter island from output/ into the CounterLib module in Service Studio.Create a Counter block with InitialCount and ShowMessage parameters.
Claude Code will:
- Confirm the target module and check that it references
AstroIsland_Lib. - Read
output/and the current state of the module. - Summarise what it will create or change, before writing anything, and list the resource files for you to import (see Importing resources).
- Apply the changes in small steps, checking Service Studio’s validation messages after each one:
- Public and Deploy Action on the resources you imported.
- The
<Block>Propsstructure. - The block’s input parameters and
Props/PropsSerializedlocal variables. - The
PreparePropsclient action, includingSetFunctionPropsfor function handlers. OnInitializeandOnParametersChanged, including theDeploy Resourcelist fromoutput/resources.txt.- The
AstroIslandcomponent:ComponentURL,RendererURL,ClientDirective,Props,OptsandSlots. - Block CSS from any output stylesheets.
- A design-time preview: the
AstroIslandgoes in the False branch of anIfInBrowserwidget whose condition isFalse, and the True branch holds a static mock-up of the component, so the block shows on the Service Studio canvas.
- Report what changed and what is left to do by hand, and offer to publish.
If a step can’t be done through the MCP server, Claude Code tells you what to do by hand in Service Studio.
Importing resources
Section titled “Importing resources”The MCP server can’t read files from your disk, so resource files have to be imported by hand. Claude Code works out which files in output/assets/ the island loads and lists them. In Service Studio, open the Data tab, right-click Resources, select Import Resource and pick the listed files. Tell Claude Code once they are imported and it carries on with the rest of the steps.
Only import the files Claude Code lists. output/assets/ also holds the files for every other island in the project.
Updating after a rebuild
Section titled “Updating after a rebuild”Output file names include build hashes, so every npm run output produces new resource names. Ask Claude Code to update the module, for example:
I rebuilt the output. Update the Counter block in CounterLib to use the new files.It lists the new resource files for you to import and the stale ones to delete, then updates the ComponentURL and RendererURL expressions and the Assets list in OnInitialize.
Other things you can ask
Section titled “Other things you can ask”The skill also works for reading the module. For example:
- “List the blocks in CounterLib that use AstroIsland.”
- “Show me the validation errors in CounterLib.”
- “Compare the props in src/pages/react/counter.astro with the CounterProps structure.”
- “Publish CounterLib.”
Troubleshooting
Section titled “Troubleshooting”- No
servicestudiotools in Claude Code: check that the MCP server is running in Service Studio and that/mcpshows it as connected. Restart Claude Code after adding the server. - Calls are rejected: the session was not approved in Service Studio, or the dialog was dismissed. Ask Claude Code to try again and approve the dialog.
- Merge not applied: Service Studio couldn’t merge the change automatically. Claude Code reads the module again and retries; you can also resolve it in the Compare and Merge window.
- Publish blocked: grant write permission in the MCP Server dialog in Service Studio.