FlowFuse / FlowFuse/flowfuse

FF Expert access to remote instance-hosted MCP nodes

Open
#6,529 2 comments 0 reactions 0 assignees View on GitHub
area:ff-expert area:remote-instance needs-refinement task
Dominant language
JavaScript
Stars
400
Forks
89
Avg merge
1d 20h
Merged PRs (30d)
149

Description

### Description

Enable FlowFuse Expert to access MCP servers running on Remote Instances (devices). Currently, only MCP servers on Hosted Instances are accessible

#### Value proposition

- **Consistency**: MCP should work everywhere - hosted and device deployments
- **Practical Use Case**: Users deploy MCP servers on the same instances where edge machine data is processed, and Expert should be able to query that co-located data

### Current Behavior

When a user deploys a Node-RED flow with an MCP server to a Remote Instance:

MCP server "exists" in platform but Expert can't see or use it. No error message provided.

1. MCP server registers successfully: `POST /api/v1/teams/:teamId/mcp/device/:deviceId/:nodeId`
2. Registration stored in database (`MCPRegistration` table, `targetType: 'device'`)
3. Expert capabilities API silently **excludes** device MCP servers
4. Device MCP servers don't appear in capabilities selector
5. Expert cannot invoke device MCP tools or query device resources

### Requirements

#### User Experience
Users should experience **no workflow difference** between hosted and device MCP servers:
- Device MCP servers appear in capabilities list alongside hosted MCP servers
- Same selection process, same interaction model
- Location transparency - users work with "MCP servers" regardless of deployment

#### Functional Requirements
- **Discovery**: Device MCP servers visible in Expert Operator Agent capabilities list
- **Tool Invocation**: Expert can call MCP tools on device-hosted servers
- **Resource Queries**: Expert can read MCP resources from device-hosted servers
- **Error Handling**: Clear messages when device offline/unreachable
- **RBAC**: Same application-level permissions apply to device MCP servers

#### Non-Functional Requirements
- **Performance**: Device MCP operations < 3 seconds typical
- **Reliability**: Graceful handling of device offline scenarios
- **Ease of Use**: No special network configuration required
- **Consistency**: Identical workflow to hosted MCP servers

### Success Criteria

- [ ] Device MCP servers visible in Expert capabilities selector
- [ ] Expert successfully invokes tools on device MCP servers
- [ ] Expert successfully reads resources from device MCP servers
- [ ] No workflow difference for users (transparent experience)
- [ ] Clear error feedback when device offline/unreachable
- [ ] Performance acceptable (< 3s typical)
- [ ] RBAC properly enforced
- [ ] Documentation for device-hosted MCP deployment

---

### Technical Context (High-Level)

Details

**Why devices are different**:
- Hosted Instances have direct URLs (e.g., `https://instance.flowfuse.cloud`)
- Remote Instances connect through Device Agent - no direct URL
- Current code expects `instance.url` property → devices filtered out

**Note**: Solution approach is out of scope for this issue description.


---

### Coordination Required

**Issue #6480 - Enable FlowFuse User Authentication for Programmatic MCP Clients**
- This issue: **Network access** to device MCP endpoints
- #6480: **Authentication** for MCP endpoints
- Recommendation: Design together - shared architecture
- Dependency order TBD by @Steve-Mcl

---

### Related Issues

- #6477 - Application-level RBAC for MCP Servers
- #6478 - Security Debt: Team Owners visibility
- [Expert & MCP Roadmap FlowFuse/product#2](https://github.com/FlowFuse/product/issues/2)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.