Skip to main content

mcp-host-agent

Host-level deployment and supervision agent for the MCP Worker platform.

Installed once per host, mcp-host-agent manages the local Worker services end to end: deployment (git clone/pull + dependency install), health polling, heartbeat aggregation to the Hub, crash self-healing, and the Hub-facing control endpoints.

Installation

pip install mcp-host-agent

Requires Python 3.10+.

Quick start

# 1. Write the agent configuration (see below).
# 2. Validate it and run the control API.
mcp-host-agent run --config /etc/mavis/agent.yaml

Configuration

The agent is driven by a single agent.yaml file:

hub_url: "https://hub.example.com"
agent_id: "agent-example"
jwt_token: "<jwt>"
agent_token: "<agent-token>"   # optional; required for control endpoints

platform: linux                # linux | macos
agent_port: 9200               # control API port (default 9200)

workers:
  - name: demo-worker
    repo: "https://git.example.com/owner/demo-worker.git"
    branch: main
    port: 9101
    python: "3.11"
    auto_restart: true
    max_restart: 3

How it works

  • Deployment — clones/pulls each worker repo into the working directory and manages it as a systemd (Linux) or launchd (macOS) service.
  • Supervision — polls each worker's process state and /health endpoint, derives its status, and aggregates everything into an AgentHeartbeat.
  • Self-healing — applies a decision tree (restart → rollback → give up) and escalates unrecoverable failures to the Hub orchestrator.
  • Control plane — exposes /health, /meta, and authenticated /api/v1/agent/* endpoints for the Hub orchestrator.

Supported platforms

Platform Runner
Linux systemd
macOS launchd

Windows is not supported in v1. The agent does not self-heal containers (Docker/K3s pods are managed by their own orchestrators); it manages native host processes only.

Development

pip install -e ".[dev]"
pytest

License

Apache-2.0. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_host_agent-1.0.1.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_host_agent-1.0.1-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_host_agent-1.0.1.tar.gz.

File metadata

  • Download URL: mcp_host_agent-1.0.1.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.20

File hashes

Hashes for mcp_host_agent-1.0.1.tar.gz
Algorithm Hash digest
SHA256 620c68d9f782eaf7d9d1e811cf1b6eb3813c04b46503de50471b3945dcb23eba
MD5 0ff9b1324ba801128947f38a05959551
BLAKE2b-256 8de420077de6aa343f1d7830acb1780a4a749f43f82012f477e86a97325bf04d

See more details on using hashes here.

File details

Details for the file mcp_host_agent-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: mcp_host_agent-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 25.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.20

File hashes

Hashes for mcp_host_agent-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 263f568d7c9fa611c071838d61d9ec1da16c6daa3ed4643c5194f9684e159d9e
MD5 966e6ad50d72dcfbd6f24854e51d5d5a
BLAKE2b-256 bd024ce1f144c00023939cfcdbbb055700299beadb26f01778ca44d80be424eb

See more details on using hashes here.

Release history Release notifications | RSS feed

1.1.5

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

This release

1.0.1 This release

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page