Skip to content

Add MCP platform tool definitions#7599

Open
cstns wants to merge 6 commits into
mainfrom
7430_mcp-platform-tools
Open

Add MCP platform tool definitions#7599
cstns wants to merge 6 commits into
mainfrom
7430_mcp-platform-tools

Conversation

@cstns

@cstns cstns commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the full set of platform tool definitions for the MCP server. 22 tools across 7 domain files, all prefixed with platform. and using the app.inject() pattern to call existing HTTP routes.

  • teams.js (2): list-teams, get-team
  • applications.js (3): list-applications, get-application, create-application
  • instances.js (6): list-instances, get-instance, get-instance-status, get-instance-logs, check-name-availability, create-instance
  • snapshots.js (2): list-snapshots, create-snapshot
  • devices.js (4): list-devices, get-device, list-device-snapshots, create-device-snapshot
  • catalog.js (3): list-instance-types, list-stacks, list-blueprints
  • navigation.js (2): open-editor, open-instance

All read tools have readOnlyHint: true annotations. Write tools (create-application, create-instance, create-snapshot, create-device-snapshot) have readOnlyHint: false. No destructive tools in this first pass, those will come later alongside human-in-the-loop confirmation.

Also fixes CORS for the hijacked POST response by setting headers manually on reply.raw before handing off to the MCP transport.
Builds on #7429. Intentionally excludes manage-instance, update-device, and all destructive/delete operations for now.

Related Issue(s)

closes #7430

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@cstns cstns self-assigned this Jun 23, 2026
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 54.89362% with 106 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.70%. Comparing base (1dc01e3) to head (6d631cc).
⚠️ Report is 27 commits behind head on main.

Files with missing lines Patch % Lines
forge/ee/routes/mcp/tools/instances.js 6.45% 29 Missing ⚠️
forge/ee/routes/mcp/tools/devices.js 10.52% 17 Missing ⚠️
forge/ee/routes/mcp/tools/navigation.js 12.50% 14 Missing ⚠️
forge/ee/routes/mcp/tools/applications.js 14.28% 12 Missing ⚠️
forge/ee/routes/mcp/tools/snapshots.js 15.38% 11 Missing ⚠️
forge/ee/routes/mcp/registrations.js 83.05% 10 Missing ⚠️
forge/ee/routes/mcp/tools/catalog.js 10.00% 9 Missing ⚠️
forge/ee/routes/mcp/server.js 91.17% 3 Missing ⚠️
forge/ee/routes/mcp/toolLoader.js 96.29% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7599      +/-   ##
==========================================
- Coverage   76.93%   76.70%   -0.23%     
==========================================
  Files         410      420      +10     
  Lines       21084    21260     +176     
  Branches     5138     5157      +19     
==========================================
+ Hits        16221    16308      +87     
- Misses       4863     4952      +89     
Flag Coverage Δ
backend 76.70% <54.89%> (-0.23%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP Platform Tool Definitions

1 participant