Implementation:1mcp app Agent statusCommand
| Knowledge Sources | |
|---|---|
| Domains | CLI, MCP_Protocol |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
Concrete CLI command for checking the runtime status of a specific MCP server by probing the running 1MCP instance.
Description
The statusCommand function checks the status of a specific MCP server by connecting to the running 1MCP runtime (if available) and querying its health endpoint. It reports whether the server is connected, disconnected, awaiting OAuth, or unreachable. Unlike `listCommand` which reads from the config file, `statusCommand` probes the live runtime for current connection state.
Usage
Import this function when you need to:
- Check if a specific server is connected in the running runtime
- Diagnose connection issues (OAuth required, unreachable, error states)
- Get verbose status information for a single server
Code Reference
Source Location
- Repository: 1MCP Agent
- File: src/commands/mcp/status.ts (L66-88)
Signature
export interface StatusCommandArgs extends GlobalOptions {
name: string;
verbose?: boolean;
}
export function buildStatusCommand(yargs: Argv): Argv;
export async function statusCommand(argv: StatusCommandArgs): Promise<void>;
Import
import { statusCommand, buildStatusCommand, StatusCommandArgs } from '@src/commands/mcp/status.js';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Server name to check |
| verbose | boolean | No | Detailed status output |
Outputs
| Name | Type | Description |
|---|---|---|
| stdout | formatted text | Status report (connected/disconnected/oauth/error) |
Usage Examples
Check Server Status
1mcp mcp status my-server
1mcp mcp status my-server --verbose