Skip to content

Add MCP platform tool definitions#7599

Open
cstns wants to merge 2 commits into
7429_mcp-endpoint-handlerfrom
7430_mcp-platform-tools
Open

Add MCP platform tool definitions#7599
cstns wants to merge 2 commits into
7429_mcp-endpoint-handlerfrom
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 12.14953% with 94 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.70%. Comparing base (1d61cac) to head (c3ebbf5).

Files with missing lines Patch % Lines
forge/ee/lib/mcp/tools/instances.js 6.45% 29 Missing ⚠️
forge/ee/lib/mcp/tools/devices.js 10.52% 17 Missing ⚠️
forge/ee/lib/mcp/tools/navigation.js 12.50% 14 Missing ⚠️
forge/ee/lib/mcp/tools/applications.js 14.28% 12 Missing ⚠️
forge/ee/lib/mcp/tools/snapshots.js 15.38% 11 Missing ⚠️
forge/ee/lib/mcp/tools/catalog.js 10.00% 9 Missing ⚠️
forge/ee/routes/mcp/server.js 50.00% 2 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           7429_mcp-endpoint-handler    #7599      +/-   ##
=============================================================
- Coverage                      77.03%   76.70%   -0.33%     
=============================================================
  Files                            415      421       +6     
  Lines                          21163    21270     +107     
  Branches                        5148     5160      +12     
=============================================================
+ Hits                           16303    16316      +13     
- Misses                          4860     4954      +94     
Flag Coverage Δ
backend 76.70% <12.14%> (-0.33%) ⬇️

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.

@cstns cstns changed the base branch from main to 7429_mcp-endpoint-handler June 24, 2026 10:10
# Conflicts:
#	forge/ee/lib/mcp/tools/applications.js
#	forge/ee/lib/mcp/tools/catalog.js
#	forge/ee/lib/mcp/tools/devices.js
#	forge/ee/lib/mcp/tools/instances.js
#	forge/ee/lib/mcp/tools/navigation.js
#	forge/ee/lib/mcp/tools/snapshots.js
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

2 participants