Skip to main content
Glama
Lalindu0923

RealWorker-Manager MCP Server

by Lalindu0923

MCP Admin Server Architecture

Overview

This is a Manager/Admin MCP (Model Context Protocol) Server that coordinates and monitors multiple worker MCP servers across a distributed network. It acts as a centralized control plane for managing worker nodes. This is a Manager/Admin MCP (Model Context Protocol) Server that coordinates and monitors multiple worker MCP servers across a distributed network. It acts as a centralized control plane for managing worker nodes.

Related MCP server: MCP Proxy Server

Architecture Diagram


┌─────────────────────────────────────────────────────────────────┐
│                      MCP Client (Claude/AI)                     │
│                                                                 │
└───────────────────────────┬─────────────────────────────────────┘
                            │ STDIO
                            │ (Standard Input/Output)
                            │
┌───────────────────────────▼─────────────────────────────────────┐
│                    ADMIN/MANAGER SERVER                         │
│                   (admin_server/admin.py)                       │
│                                                                 │
│  ┌─────────────────────────────────────────────────────────┐    │
│  │              FastMCP Server Core                        │    │
│  │  - Server Name: "Manager"                               │    │
│  │  - Transport: STDIO                                     │    │
│  └─────────────────────────────────────────────────────────┘    │
│                                                                 │
│  ┌─────────────────────────────────────────────────────────┐    │
│  │              Management Tools                           │    │
│  │                                                         │    │
│  │  1. get_all_workers_status()                            │    │
│  │     - Polls all workers simultaneously                  │    │
│  │     - Returns aggregated status                         │    │
│  │                                                         │    │
│  │  2. get_worker_status(worker_name)                      │    │
│  │     - Gets status from specific worker                  │    │
│  │     - Returns detailed worker info                      │    │
│  │                                                         │    │
│  │  3. list_workers()                                      │    │
│  │     - Lists all configured workers                      │    │
│  │     - Returns worker URLs                               │    │
│  └─────────────────────────────────────────────────────────┘    │
│                                                                 │
│  ┌─────────────────────────────────────────────────────────┐    │
│  │           Worker Registry (WORKERS dict)                │    │
│  │                                                         │    │
│  │  Worker-One: http://10.149.14.61:8000                   │    │
│  │  [Additional workers can be added here]                 │    │
│  └─────────────────────────────────────────────────────────┘    │
│                                                                 │
└───────────┬─────────────────────────────────┬───────────────────┘
            │ HTTP/HTTPX                      │ HTTP/HTTPX
            │ (Async Client)                  │ (Async Client)
            │                                 │
┌───────────▼─────────────┐       ┌──────────▼──────────────┐
│   WORKER-ONE SERVER     │       │   WORKER-N SERVER       │
│   (10.149.14.61:8000)   │       │   (Additional Workers)  │
│                         │       │                         │
│  ┌──────────────────┐   │       │  ┌──────────────────┐   │
│  │ MCP Worker Core  │   │       │  │ MCP Worker Core  │   │
│  │ - SSE Endpoints  │   │       │  │ - SSE Endpoints  │   │
│  │ - Tool Handler   │   │       │  │ - Tool Handler   │   │
│  └──────────────────┘   │       │  └──────────────────┘   │
│                         │       │                         │
│  ┌──────────────────┐   │       │  ┌──────────────────┐   │
│  │ Worker Tools     │   │       │  │ Worker Tools     │   │
│  │ - System Status  │   │       │  │ - System Status  │   │
│  │ - Battery Info   │   │       │  │ - Battery Info   │   │
│  │ - Custom Tasks   │   │       │  │ - Custom Tasks   │   │
│  └──────────────────┘   │       │  └──────────────────┘   │
│                         │       │                         │
└─────────────────────────┘       └─────────────────────────┘

Component Details

1. Admin/Manager Server (admin.py)

Purpose: Central coordination server that manages multiple worker MCP servers

Key Components:

  • FastMCP Core: Lightweight MCP server framework

  • Worker Registry: Dictionary mapping worker names to URLs

  • HTTP Client: Async HTTPX client for worker communication

  • Management Tools: Three exposed tools for worker management

Communication:

  • Upstream (to AI Client): STDIO transport

  • Downstream (to Workers): HTTP POST requests to worker SSE endpoints

2. Worker Servers

Purpose: Distributed worker nodes that perform actual tasks and report status

Key Components:

  • MCP Server Core: Handles incoming requests via SSE

  • Tool Endpoints: /sse/tools/call for tool execution

  • Status Tools: get_worker_status() and other worker-specific tools

Communication:

  • Upstream (to Admin): HTTP responses to manager requests

  • Local Resources: Access to system information (CPU, memory, battery, etc.)

Data Flow

Scenario 1: Get All Workers Status

1. AI Client → Admin: Call get_all_workers_status()
2. Admin → Worker-One: POST /sse/tools/call (get_worker_status)
3. Admin → Worker-N: POST /sse/tools/call (get_worker_status)
   [Parallel async requests]
4. Worker-One → Admin: Return status data
5. Worker-N → Admin: Return status data
6. Admin → AI Client: Aggregated results from all workers

Scenario 2: Get Specific Worker Status

1. AI Client → Admin: Call get_worker_status("Worker-One")
2. Admin: Lookup worker URL from WORKERS registry
3. Admin → Worker-One: POST /sse/tools/call (get_worker_status)
4. Worker-One → Admin: Return status data
5. Admin → AI Client: Worker status

Scenario 3: List Workers

1. AI Client → Admin: Call list_workers()
2. Admin: Return WORKERS dictionary
3. Admin → AI Client: List of workers with URLs

Technical Stack

Core Technologies

  • Python 3.11+: Runtime environment

  • FastMCP: MCP server framework

  • HTTPX: Async HTTP client for worker communication

  • STDIO: Transport protocol for AI client communication

Dependencies

httpx>=0.28.1       # Async HTTP client
mcp[cli]>=1.26.0    # MCP framework
psutil>=7.2.2       # System monitoring (likely used by workers)
uvicorn>=0.40.0     # ASGI server (for workers)

Deployment Architecture

Network Layer:
┌─────────────────────────────────────────────────────────┐
│                    Local Network / VPN                   │
│                                                          │
│  Admin Server         Worker-One         Worker-N       │
│  (localhost)          (10.149.14.61)     (10.x.x.x)     │
│                                                          │
└─────────────────────────────────────────────────────────┘

Deployment Characteristics:

  • Admin runs locally and communicates via STDIO with AI client

  • Workers are distributed across network (LAN/VPN)

  • HTTP-based communication between admin and workers

  • 10-second timeout for worker requests

  • Async/parallel communication for efficiency

Security Considerations

  1. Network Security:

    • Workers expose HTTP endpoints (currently unencrypted)

    • Should be deployed on trusted network or use VPN

    • Consider adding HTTPS/TLS for production

  2. Authentication:

    • Currently no authentication between admin and workers

    • Consider adding API keys or mutual TLS

  3. Error Handling:

    • Graceful degradation when workers are unavailable

    • Timeout protection (10s) prevents hanging

Scalability

Current Design:

  • Synchronous registry (WORKERS dict)

  • Hardcoded worker URLs

  • Manual configuration

Future Improvements:

  • Service discovery mechanism

  • Dynamic worker registration

  • Health check automation

  • Load balancing across workers

  • Worker heartbeat monitoring

Extension Points

  1. Add New Worker: Update WORKERS dictionary with new worker URL

  2. Add New Tool: Define new @mcp.tool() function in admin.py

  3. Custom Worker Communication: Extend HTTP client logic

  4. Monitoring: Add logging, metrics collection, alerting

Usage Example

# From AI Client (Claude)
# The admin server exposes these tools:

# 1. List all configured workers
list_workers()
# Returns: {"workers": {"Worker-One": "http://10.149.14.61:8000"}}

# 2. Get status from all workers
get_all_workers_status()
# Returns: {"Worker-One": {...status data...}}

# 3. Get status from specific worker
get_worker_status("Worker-One")
# Returns: {...status data from Worker-One...}

Running the Server

# Development mode
uv run admin.py

# Production mode (via MCP configuration)
# Add to Claude Desktop config:
{
  "mcpServers": {
    "admin-server": {
      "command": "uv",
      "args": ["run", "admin.py"],
      "cwd": "d:\\SLT\\AI\\MCP_Servers\\admin_server"
    }
  }
}

Project Structure

admin_server/
├── admin.py           # Main admin/manager server
├── main.py           # Alternative entry point (unused)
├── pyproject.toml    # Project dependencies
└── README.md         # This architecture document

Available Tools

5 tools
get_all_workers_system_statsB

Returns system statistics for all workers.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavioral traits itself, but it only says 'Returns,' giving no information about side effects, permission requirements, performance implications, or result format. It is a simple read, but transparency is minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, short sentence with no redundant information. It is front-loaded with the action and resource, making it highly concise and efficient for this simple read operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with no parameters or output schema, but the description could still specify what system statistics are returned or how they are aggregated. It provides a minimal overview, but an agent would lack detail about the response content, so it is barely adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema fully documents that fact. The description naturally adds nothing beyond the schema, so the baseline score of 4 applies due to the absence of parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a direct verb 'Returns' and specifies the resource 'system statistics for all workers,' which clearly distinguishes it from sibling tools like get_worker_system_stats (likely singular). However, it does not elaborate on what 'system statistics' entails, so it is clear but not fully detailed.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It does not mention scenarios for using get_all_workers_system_stats over list_workers or get_worker_system_stats, nor exclude cases where other tools are more appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_system_stats_by_locationB

Returns system stats of workers filtered by floor and section.

ParametersJSON Schema
NameRequiredDescriptionDefault
floorYes
sectionYes

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavioral traits but only states the basic retrieval operation. It does not mention whether the call is read-only, what happens when no workers match, whether a list or aggregate is returned, or any error/edge-case behavior. This is a significant gap given the absence of structured annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, front-loaded with the result ('Returns system stats'), and contains no redundant words. It is perfectly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has two required string parameters and no output schema, yet the description does not explain what 'system stats' includes, whether results are per-worker or aggregated, or how location filtering works in practice. Even with sibling names, the description is too sparse for an agent to fully understand the tool's behavior without additional assumptions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides only types and required flags (0% description coverage). The description adds that 'floor' and 'section' are filter criteria, giving them semantic context. However, it does not specify allowed values, format, or how the filters combine, so it only partially compensates for the missing schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Returns' and clearly identifies the resource 'system stats of workers' with a location filter ('by floor and section'). This distinguishes it from sibling tools like get_all_workers_system_stats or get_worker_system_stats, which have broader or per-worker scopes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for retrieving stats from workers located on a specific floor/section, but it lacks explicit guidance on when to prefer this tool over alternatives. It does not mention exclusions or directly compare to sibling tools, so the usage context is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_worker_infoB

Returns battery percentage and charging status of a worker.

ParametersJSON Schema
NameRequiredDescriptionDefault
worker_nameYes

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full responsibility for behavioral disclosure. It explicitly states the return content (battery percentage and charging status), implying a read-only operation. However, it does not mention potential error cases (e.g., worker not found), authentication requirements, or other side effects, leaving some ambiguity for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no unnecessary words. It delivers the key purpose immediately and is highly concise, earning a perfect score for conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite being a simple tool, the description lacks output schema, annotations, and sufficient context to fully inform an agent. It does not explain how to use the tool in conjunction with sibling tools, what the output format looks like, or whether worker_name must reference an existing worker. Given the complexity signals (no output schema, no annotations), the description is incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, and the description does not add any meaning to the only parameter, worker_name. While the parameter name is self-explanatory, the description does not clarify how to obtain the worker name or what constitutes a valid worker, failing to compensate for the lack of schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it returns battery percentage and charging status of a worker, using a specific verb ('returns') and resource ('worker'). This distinguishes it from siblings like get_worker_system_stats, which likely cover broader system stats, and list_workers, which lists workers rather than retrieving info.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives such as get_worker_system_stats or get_all_workers_system_stats. The description simply states what the tool does without hinting at appropriate scenarios or limitations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_worker_system_statsC

Returns full system statistics of a specific worker.

ParametersJSON Schema
NameRequiredDescriptionDefault
worker_nameYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations are absent, so the description must carry the full burden. It discloses only that the tool returns data, implying a read operation, but does not mention any behavioral traits such as authentication requirements, potential errors (e.g., worker not found), side effects, or the exact nature of 'full system statistics'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, immediately front-loaded with the action ('Returns full system statistics'). Every word earns its place, and it is appropriately sized for a tool with one parameter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description should supply information about return values and error behavior. It does not; it only gives a vague notion of 'full system statistics.' The tool is simple, but the description leaves the agent uncertain about what data will be returned and what could go wrong.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has one parameter, worker_name, with 0% description coverage. The description adds only the phrase 'specific worker,' which does little beyond the parameter's title. It does not explain how to obtain or validate the worker name, nor any format requirements.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the function: 'Returns full system statistics of a specific worker.' The verb 'returns' and resource 'system statistics' are specific, and the phrase 'specific worker' distinguishes it from sibling tools that return stats for all workers or by location. However, it does not explicitly contrast with those siblings, so it's not a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like get_all_workers_system_stats or get_worker_info. The description simply states the action without any context about scenarios, prerequisites, or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_workersA

Returns a summary of all real workers including IP, floor, section, and connection status.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the tool returns a summary with specific fields, but does not explicitly state that it is read-only, mention any side effects or prerequisites, or describe pagination/ordering. This is adequate for a simple list tool but could be richer.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, front-loaded with the action and resource, and lists the key fields. Every word earns its place; no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no params, no output schema), the description sufficiently explains what is returned. It names the fields included in the summary, making it complete enough for an agent to decide on usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the input schema is empty (100% coverage trivially). The description does not need to explain parameters. Baseline for zero parameters is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Returns') and resource ('all real workers'), and lists the exact fields (IP, floor, section, connection status). This clearly differentiates it from sibling tools like get_worker_info (which targets a single worker) or get_all_workers_system_stats (which focuses on system stats).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly implies when to use this tool (when you need a summary of all workers with basic location/status info). It doesn't explicitly state exclusions or alternatives, but the context is clear enough given the sibling tool names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv0.1.0
    • First observedget_all_workers_system_stats
    • First observedget_system_stats_by_location
    • First observedget_worker_info
    • First observedget_worker_system_stats
    • First observedlist_workers

TDQS

A3.5/5.0

Scored across 5 tools

Disambiguation4/5

Most tools are clearly distinct: list_workers for summaries, get_worker_info for battery/charging, and three system stats variants for different scopes. However, get_worker_info and get_worker_system_stats could be confused if an agent overlooks the specific fields, since system stats may include battery data.

Naming Consistency4/5

Tools consistently use verbs (list/get) followed by nouns, and all are snake_case. Minor inconsistency exists in noun phrasing (e.g., get_system_stats_by_location vs get_worker_system_stats vs get_all_workers_system_stats), but the pattern remains predictable overall.

Tool Count5/5

With 5 tools, the server is well-scoped for a real-worker management/monitoring domain. Each tool covers a distinct retrieval need, and the count feels neither too sparse nor excessive.

Completeness4/5

The server covers core read-only operations: listing workers, getting individual details, and fetching system stats at various granularities. Minor gaps exist, such as no dedicated tool for a specific worker's connection status beyond the list, but agents can work around this by filtering list_workers.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables centralized management and unified interface for multiple child MCP servers (filesystem, sqlite, etc.), allowing users to discover, launch, and execute tools across different MCP servers through a single gateway.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Aggregates multiple backend MCP servers into a single unified interface with optional web management UI for tool control and configuration.
    60 npm
    193
    MIT
  • F
    license
    Not graded
    quality
    F
    maintenance
    MCP server for infrastructure discovery and remote management, enabling SSH command execution, file transfer, log tailing, and machine/service inventory with a companion web dashboard.
    2
    -
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables discovering and managing MCP servers through a registry, supporting listing, searching, and configuration.
    -