MCP Server status shows as 'Stopped' even when running
- Dominant language
- TypeScript
- Stars
- 72.7k
- Forks
- 8.6k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 85
Description
## Bug Description
The `claude-flow status` command incorrectly shows MCP Server as 'Stopped' even when MCP servers are actively running.
## Current Behavior
- MCP Server status always shows: `Status: Stopped`
- Port shows as: `Port: Not configured`
- Connections based on agent count, not actual MCP connections
## Expected Behavior
- Should show `Status: Running` when MCP server processes are active
- Should display the actual port (default 3000)
- Should show real connection count
## Root Cause
The status command determines MCP status using:
```javascript
mcp: {
status: agents.length > 0 ? 'Running' : 'Stopped', // Wrong!
port: null,
connections: agents.length,
}
```
This checks for agents in memory rather than actual MCP server processes.
## Evidence of Running MCP Servers
Multiple MCP processes are running:
- `mcp-server.js` processes
- `claude-flow mcp start` processes
- `flow-nexus mcp start` processes
## Proposed Fix
1. Check for actual MCP server processes
2. Detect port binding (default 3000)
3. Read real connection metrics
## Impact
Users can't tell if their MCP servers are actually running, leading to confusion about system state.
## Related Issues
- #758 - Status commands showing mock data (fixed in PR #759)
Contributor guide
Research direction
Start at the `claude-flow status` entry point and the MCP status object shown in the issue, then inspect the `mcp-server.js` and `claude-flow mcp start` process paths. Done means status reflects active MCP processes, reports the actual or default port (3000), and counts real MCP connections rather than agents; verify with running and stopped server scenarios.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100