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.0.tar.gz (21.4 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.0-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_host_agent-1.0.0.tar.gz
  • Upload date:
  • Size: 21.4 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.0.tar.gz
Algorithm Hash digest
SHA256 4dfd26d66706d72f6657c4debf8384ac558e52c5408c7d13d44469691c76423b
MD5 184a637ee160c952dc646b97547cc3b0
BLAKE2b-256 2b7e7ac61da517b6b5a72787bc204d59130c78a53a7e6c7eb4c0e8b4c728f659

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mcp_host_agent-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 24.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a7b0e1c4e5a79fd3aeeb6c101115bc8f8d873cba1e736930596c056bad02fb4
MD5 0af6f221eb0825a72643a5573a120de6
BLAKE2b-256 4da48648a736e593e51d1bab131f9f273ee0989b038682c248c6bb6083f2b6a4

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

1.0.1

2 files

This release

1.0.0 This release

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