MCP Tools Reference

Complete reference for all MCP protocol tools exposed by MCP Hangar. These tools are callable by any MCP client (Claude Desktop, LM Studio, custom integrations).

Quick Reference

ToolCategoryDescriptionSide Effects
hangar_listLifecycleList all MCP servers with state and tool countsNone (read-only)
hangar_startLifecycleStart a MCP server or groupStarts process/container
hangar_stopLifecycleStop a MCP server or groupStops process/container
hangar_statusLifecycleHuman-readable health dashboardNone (read-only)
hangar_reload_configLifecycleReload configuration from diskStops/starts MCP servers
hangar_loadHot-LoadingLoad MCP server from registry at runtimeDownloads and starts MCP server
hangar_unloadHot-LoadingUnload a hot-loaded MCP serverStops and removes MCP server
hangar_toolsMCP ServerList tools available on a MCP serverMay start cold MCP server
hangar_detailsMCP ServerDetailed MCP server or group informationNone (read-only)
hangar_warmMCP ServerPre-start MCP servers for faster first callStarts MCP server processes
hangar_healthHealthSystem-wide health summaryNone (read-only)
hangar_metricsHealthMCP Server metrics in JSON or Prometheus formatNone (read-only)
hangar_discoverDiscoveryTrigger discovery scan across all sourcesUpdates pending MCP server list
hangar_discoveredDiscoveryList pending discovered MCP serversNone (read-only)
hangar_quarantineDiscoveryList quarantined MCP serversNone (read-only)
hangar_approveDiscoveryApprove a pending or quarantined MCP serverRegisters MCP server
hangar_sourcesDiscoveryList discovery source statusNone (read-only)
hangar_group_listGroupsList all MCP server groups with member detailsNone (read-only)
hangar_group_rebalanceGroupsRebalance group membership and reset circuit breakerRe-checks members, resets circuit
hangar_callBatch and ContinuationInvoke tools on MCP servers (single or batch)May start cold MCP servers
hangar_fetch_continuationBatch and ContinuationFetch truncated response dataNone (read-only)
hangar_delete_continuationBatch and ContinuationDelete cached continuation dataRemoves cached response

Lifecycle

hangar_list {#hangar_list}

List all configured MCP servers, groups, and runtime (hot-loaded) MCP servers with current state, mode, and tool counts.

Parameters:

ParameterTypeDefaultDescription
state_filterstr | NoneNoneFilter by state: "cold", "ready", "degraded", "dead"

Side Effects: None (read-only).

Returns:

FieldTypeDescription
mcp_serverslist[object]Configured MCP servers with mcp_server, state, mode, alive, tools_count, health_status, tools_predefined, description
groupslist[object]Groups with group_id, state, strategy, healthy_count, total_members
runtime_mcp_serverslist[object]Hot-loaded MCP servers with mcp_server, state, source, verified, ephemeral, loaded_at, lifetime_seconds

Example:

// Request
{"state_filter": "ready"}

// Response
{
  "mcp_servers": [
    {"mcp_server": "math", "state": "ready", "mode": "subprocess", "alive": true,
     "tools_count": 4, "health_status": "healthy", "tools_predefined": false}
  ],
  "groups": [],
  "runtime_mcp_servers": []
}

hangar_start {#hangar_start}

Start a MCP server or group. Transitions the MCP server from COLD to READY.

Parameters:

ParameterTypeDefaultDescription
mcp_serverstrrequiredMCP Server ID or Group ID

Side Effects: Starts MCP server process or container. State transitions from COLD to READY.

Returns:

For a MCP server:

FieldTypeDescription
mcp_serverstrMCP Server ID
statestrNew state (typically "ready")
toolslist[str]Available tool names

For a group:

FieldTypeDescription
groupstrGroup ID
statestrGroup state
members_startedintNumber of members started
healthy_countintHealthy member count
total_membersintTotal member count

Example:

// Request
{"mcp_server": "math"}

// Response
{"mcp_server": "math", "state": "ready", "tools": ["add", "subtract", "multiply", "divide"]}

Errors: ValueError("unknown_mcp_server: <id>"), ValueError("unknown_group: <id>")

hangar_stop {#hangar_stop}

Stop a running MCP server or group.

Parameters:

ParameterTypeDefaultDescription
mcp_serverstrrequiredMCP Server ID or Group ID

Side Effects: Stops MCP server process or container. State transitions to COLD.

Returns:

For a MCP server:

FieldTypeDescription
stoppedstrMCP Server ID
reasonstrStop reason

For a group:

FieldTypeDescription
groupstrGroup ID
statestrGroup state
stoppedbooltrue

Example:

// Request
{"mcp_server": "math"}

// Response
{"stopped": "math", "reason": "manual_stop"}

Errors: ValueError("unknown_mcp_server: <id>")

hangar_status {#hangar_status}

Human-readable health dashboard with state indicators for all MCP servers and groups.

Parameters: None.

Side Effects: None (read-only).

Returns:

FieldTypeDescription
mcp_serverslist[object]MCP servers with id, indicator, state, mode, last_used
groupslist[object]Groups with id, indicator, state, healthy_members, total_members
runtime_mcp_serverslist[object]Hot-loaded MCP servers with id, indicator, state, source, verified
summaryobjectCounts: healthy_mcp_servers, total_mcp_servers, runtime_mcp_servers, runtime_healthy, uptime, uptime_seconds
formattedstrPre-formatted text dashboard

Indicator values: [READY], [COLD], [STARTING], [DEGRADED], [DEAD].

Example:

// Request
{}

// Response
{
  "mcp_servers": [
    {"id": "math", "indicator": "[READY]", "state": "ready", "mode": "subprocess"}
  ],
  "groups": [],
  "runtime_mcp_servers": [],
  "summary": {"healthy_mcp_servers": 1, "total_mcp_servers": 1, "uptime": "2h 15m"},
  "formatted": "[READY] math (subprocess, 4 tools)"
}

hangar_reload_config {#hangar_reload_config}

Reload configuration from disk, applying MCP server additions, removals, and updates.

Parameters:

ParameterTypeDefaultDescription
gracefulbooltrueWait for idle before stopping modified/removed MCP servers

Side Effects: Stops removed/modified MCP servers, registers new MCP servers, updates changed MCP servers.

Returns:

FieldTypeDescription
statusstr"success" or "failed"
messagestrHuman-readable result description
mcp_servers_addedlist[str]Newly added MCP server IDs
mcp_servers_removedlist[str]Removed MCP server IDs
mcp_servers_updatedlist[str]Updated MCP server IDs
mcp_servers_unchangedlist[str]Unchanged MCP server IDs
duration_msfloatReload duration in milliseconds

On failure, the response includes error_type instead of MCP server lists.

Example:

// Request
{"graceful": true}

// Response
{
  "status": "success", "message": "Configuration reloaded",
  "mcp_servers_added": ["new-api"], "mcp_servers_removed": [],
  "mcp_servers_updated": ["math"], "mcp_servers_unchanged": ["filesystem"],
  "duration_ms": 45.2
}

Hot-Loading

hangar_load (async) {#hangar_load}

Load a MCP server from the MCP registry at runtime. Hot-loaded MCP servers are ephemeral and lost on server restart.

Parameters:

ParameterTypeDefaultDescription
namestrrequiredRegistry name of the MCP server
force_unverifiedboolfalseLoad unverified MCP servers without confirmation
allow_toolslist[str] | NoneNoneFnmatch patterns for allowed tools
deny_toolslist[str] | NoneNoneFnmatch patterns for denied tools

Side Effects: Downloads and starts the MCP server process. Adds to the runtime registry.

Returns:

The primary success response:

FieldTypeDescription
statusstr"loaded"
mcp_serverstrAssigned MCP server ID
toolslist[str]Available tool names

Other possible status values: "ambiguous" (multiple matches found, includes matches list), "not_found" (no match in registry), "missing_secrets" (required secrets not configured, includes missing list and instructions), "unverified" (MCP server not verified, use force_unverified to override), "failed" (configuration error).

Example:

// Request
{"name": "filesystem", "allow_tools": ["read_*"]}

// Response
{"status": "loaded", "mcp_server": "filesystem", "tools": ["read_file", "read_directory"]}

hangar_unload {#hangar_unload}

Unload a hot-loaded MCP server. Only works for MCP servers loaded via hangar_load.

Parameters:

ParameterTypeDefaultDescription
mcp_serverstrrequiredMCP Server ID (from hangar_load result)

Side Effects: Stops the MCP server process and removes it from the runtime registry.

Returns:

FieldTypeDescription
statusstr"unloaded" or "not_hot_loaded" or "failed"
mcp_serverstrMCP Server ID
messagestrResult description
lifetime_secondsfloatHow long the MCP server was loaded (success only)

Example:

// Request
{"mcp_server": "filesystem"}

// Response
{"status": "unloaded", "mcp_server": "filesystem", "message": "MCP Server unloaded",
 "lifetime_seconds": 3600.5}

MCP Server

hangar_tools {#hangar_tools}

List the tools available on a MCP server or group. Tool access filtering (allow_list/deny_list) is applied.

Parameters:

ParameterTypeDefaultDescription
mcp_serverstrrequiredMCP Server ID or Group ID

Side Effects: May start a cold MCP server to discover its tools.

Returns:

FieldTypeDescription
mcp_serverstrMCP Server ID
statestrMCP server state
predefinedboolWhether tools are predefined (not discovered at runtime)
toolslist[object]Tools with name, description, inputSchema

For groups, the response includes group: true instead of predefined.

Example:

// Request
{"mcp_server": "math"}

// Response
{
  "mcp_server": "math", "state": "ready", "predefined": false,
  "tools": [
    {"name": "add", "description": "Add two numbers",
     "inputSchema": {"type": "object", "properties": {"a": {"type": "number"}, "b": {"type": "number"}}}}
  ]
}

Errors: ValueError("unknown_mcp_server: <id>"), ValueError("no_healthy_members_in_group: <id>")

hangar_details {#hangar_details}

Detailed information about a MCP server or group, including health tracking, idle time, and tool access policy.

Parameters:

ParameterTypeDefaultDescription
mcp_serverstrrequiredMCP Server ID or Group ID

Side Effects: None (read-only).

Returns:

For a MCP server:

FieldTypeDescription
mcp_serverstrMCP Server ID
statestrCurrent state
modestrMCP Server mode
aliveboolWhether the MCP server process is running
toolslist[object]Tool list with schemas
healthobjectHealth tracking: consecutive_failures, last_check, etc.
idle_timefloat | NoneSeconds since last use
metaobjectMCP Server metadata
tools_policyobjectTool access policy: type, has_allow_list, has_deny_list, filtered_count

For a group:

FieldTypeDescription
group_idstrGroup ID
descriptionstr | NoneGroup description
statestrGroup state
strategystrLoad balancing strategy
min_healthyintMinimum healthy members
healthy_countintCurrent healthy member count
total_membersintTotal member count
is_availableboolWhether the group can accept requests
circuit_openboolWhether the circuit breaker is open
memberslist[object]Members with id, state, in_rotation, weight, priority, consecutive_failures

Example:

// Request
{"mcp_server": "math"}

// Response
{
  "mcp_server": "math", "state": "ready", "mode": "subprocess", "alive": true,
  "tools": [{"name": "add", "description": "Add two numbers"}],
  "health": {"consecutive_failures": 0, "last_check": "2026-01-15T10:30:00Z"},
  "idle_time": 45.2,
  "tools_policy": {"type": "open", "has_allow_list": false, "has_deny_list": false}
}

Errors: ValueError("unknown_mcp_server: <id>")

hangar_warm {#hangar_warm}

Pre-start one or more MCP servers so the first tool call does not incur cold-start latency. Groups are skipped.

Parameters:

ParameterTypeDefaultDescription
mcp_serversstr | NoneNoneComma-separated MCP server IDs. None warms all MCP servers.

Side Effects: Starts specified MCP server processes.

Returns:

FieldTypeDescription
warmedlist[str]Successfully warmed MCP server IDs
already_warmlist[str]MCP servers that were already running
failedlist[object]Failed MCP servers with id and error
summarystrHuman-readable summary

Example:

// Request
{"mcp_servers": "math,filesystem"}

// Response
{
  "warmed": ["math"], "already_warm": ["filesystem"], "failed": [],
  "summary": "1 warmed, 1 already warm, 0 failed"
}

Health

hangar_health {#hangar_health}

System-wide health summary with MCP server state counts and security information.

Parameters: None.

Side Effects: None (read-only).

Returns:

FieldTypeDescription
statusstrOverall system status
mcp_serversobjecttotal and by_state breakdown (cold, ready, degraded, dead)
groupsobjecttotal, by_state, total_members, healthy_members
securityobjectRate limiting info: rate_limiting.active_buckets, rate_limiting.config

Example:

// Request
{}

// Response
{
  "status": "healthy",
  "mcp_servers": {"total": 3, "by_state": {"ready": 2, "cold": 1}},
  "groups": {"total": 1, "by_state": {"healthy": 1}, "total_members": 3, "healthy_members": 3},
  "security": {"rate_limiting": {"active_buckets": 0, "config": {"rps": 10, "burst": 20}}}
}

hangar_metrics {#hangar_metrics}

MCP Server metrics in JSON or Prometheus exposition format.

Parameters:

ParameterTypeDefaultDescription
formatstr"json"Output format: "json" or "prometheus"

Side Effects: None (read-only).

Returns (JSON format):

FieldTypeDescription
mcp_serversdict[str, object]Per-MCP server metrics: state, mode, tools_count, invocations, errors, avg_latency_ms
groupsdict[str, object]Per-group metrics: state, strategy, total_members, healthy_members
tool_callsdict[str, object]Per-tool metrics keyed by MCP server.tool: count, errors
discoveryobjectDiscovery metrics
errorsdict[str, int]Error counts by type
performanceobjectPerformance metrics
summaryobjectTotals: total_mcp_servers, total_groups, total_tool_calls, total_errors

When format is "prometheus", the response contains a single metrics field with Prometheus exposition text.

Example:

// Request
{"format": "json"}

// Response
{
  "mcp_servers": {"math": {"state": "ready", "mode": "subprocess", "tools_count": 4,
                          "invocations": 150, "errors": 2, "avg_latency_ms": 12.3}},
  "groups": {},
  "tool_calls": {"math.add": {"count": 100, "errors": 0}},
  "summary": {"total_mcp_servers": 1, "total_groups": 0, "total_tool_calls": 150, "total_errors": 2}
}

Discovery

hangar_discover (async) {#hangar_discover}

Trigger a discovery scan across all enabled sources. Discovered MCP servers are added to the pending list for approval (unless auto_register is enabled).

Parameters: None.

Side Effects: Scans all enabled discovery sources. Updates the pending MCP server list.

Returns:

FieldTypeDescription
discovered_countintTotal MCP servers discovered
registered_countintMCP servers auto-registered
updated_countintExisting MCP servers updated
deregistered_countintMCP servers deregistered (authoritative mode)
quarantined_countintMCP servers quarantined
error_countintDiscovery errors
duration_msfloatScan duration in milliseconds
source_resultsdict[str, int]Discovered count per source type

Returns {error: "Discovery not configured. Enable discovery in config.yaml"} when discovery is not enabled.

Example:

// Request
{}

// Response
{
  "discovered_count": 5, "registered_count": 3, "updated_count": 1,
  "deregistered_count": 0, "quarantined_count": 1, "error_count": 0,
  "duration_ms": 1250.0, "source_results": {"docker": 3, "filesystem": 2}
}

hangar_discovered {#hangar_discovered}

List MCP servers discovered but not yet registered (pending approval).

Parameters: None.

Side Effects: None (read-only).

Returns:

FieldTypeDescription
pendinglist[object]Pending MCP servers with name, source, mode, discovered_at, fingerprint

Returns {error: ...} when discovery is not configured.

Example:

// Request
{}

// Response
{
  "pending": [
    {"name": "new-api", "source": "docker", "mode": "remote",
     "discovered_at": "2026-01-15T10:30:00Z", "fingerprint": "abc123"}
  ]
}

hangar_quarantine {#hangar_quarantine}

List MCP servers that failed health checks during discovery and were quarantined.

Parameters: None.

Side Effects: None (read-only).

Returns:

FieldTypeDescription
quarantinedlist[object]Quarantined MCP servers with name, source, reason, quarantine_time

Returns {error: ...} when discovery is not configured.

Example:

// Request
{}

// Response
{
  "quarantined": [
    {"name": "broken-api", "source": "docker", "reason": "health_check_failed",
     "quarantine_time": "2026-01-15T10:30:00Z"}
  ]
}

hangar_approve (async) {#hangar_approve}

Approve a pending or quarantined MCP server for registration.

Parameters:

ParameterTypeDefaultDescription
mcp_serverstrrequiredMCP Server name from hangar_discovered or hangar_quarantine output

Side Effects: Registers the MCP server in COLD state. Removes from pending or quarantine list.

Returns:

FieldTypeDescription
approvedboolWhether approval succeeded
mcp_serverstrMCP Server name
statusstr"registered" on success
errorstrError message on failure

Returns {error: ...} when discovery is not configured.

Example:

// Request
{"mcp_server": "new-api"}

// Response
{"approved": true, "mcp_server": "new-api", "status": "registered"}

hangar_sources (async) {#hangar_sources}

List the status of all configured discovery sources.

Parameters: None.

Side Effects: None (read-only).

Returns:

FieldTypeDescription
sourceslist[object]Sources with source_type, mode, is_healthy, is_enabled, last_discovery, mcp_servers_count, error_message

Returns {error: ...} when discovery is not configured.

Example:

// Request
{}

// Response
{
  "sources": [
    {"source_type": "docker", "mode": "additive", "is_healthy": true,
     "is_enabled": true, "last_discovery": "2026-01-15T10:30:00Z",
     "mcp_servers_count": 3, "error_message": null}
  ]
}

Groups

hangar_group_list {#hangar_group_list}

List all MCP server groups with member details, health state, and load balancing configuration.

Parameters: None.

Side Effects: None (read-only).

Returns:

FieldTypeDescription
groupslist[object]Groups with group_id, description, state, strategy, min_healthy, healthy_count, total_members, is_available, circuit_open, members

Each member in the members list contains: id, state, in_rotation, weight, priority, consecutive_failures.

Example:

// Request
{}

// Response
{
  "groups": [
    {
      "group_id": "llm-group", "description": "LLM pool", "state": "healthy",
      "strategy": "round_robin", "min_healthy": 1, "healthy_count": 2,
      "total_members": 2, "is_available": true, "circuit_open": false,
      "members": [
        {"id": "llm-1", "state": "ready", "in_rotation": true, "weight": 50,
         "priority": 1, "consecutive_failures": 0},
        {"id": "llm-2", "state": "ready", "in_rotation": true, "weight": 50,
         "priority": 2, "consecutive_failures": 0}
      ]
    }
  ]
}

hangar_group_rebalance {#hangar_group_rebalance}

Rebalance a group by re-checking all members. Recovered members rejoin rotation, failed members are removed. Resets the circuit breaker.

Parameters:

ParameterTypeDefaultDescription
groupstrrequiredGroup ID

Side Effects: Re-checks all members. Updates rotation membership. Resets circuit breaker.

Returns:

FieldTypeDescription
group_idstrGroup ID
statestrGroup state after rebalance
healthy_countintHealthy member count
total_membersintTotal member count
members_in_rotationlist[str]Member IDs currently in rotation

Example:

// Request
{"group": "llm-group"}

// Response
{
  "group_id": "llm-group", "state": "healthy", "healthy_count": 2,
  "total_members": 2, "members_in_rotation": ["llm-1", "llm-2"]
}

Errors: ValueError("unknown_group: <id>")

Batch and Continuation

hangar_call {#hangar_call}

Invoke tools on MCP servers. Supports single calls and parallel batch execution with two-level concurrency control (per-batch and system-wide).

Parameters:

ParameterTypeDefaultRangeDescription
callslist[object]required1--100 itemsList of {MCP server, tool, arguments, timeout?} objects
max_concurrencyint101--50Parallel workers for this batch
timeoutfloat601--300Batch timeout in seconds
fail_fastboolfalse--Stop batch on first error
max_attemptsint11--10Total attempts per call including retries

Side Effects: May start cold MCP servers. Executes tool calls on MCP servers.

Returns:

FieldTypeDescription
batch_idstrUnique batch identifier
successbooltrue if all calls succeeded
totalintTotal calls in batch
succeededintSuccessful call count
failedintFailed call count
elapsed_msfloatTotal batch execution time
resultslist[object]Per-call results with index, call_id, success, result, error, error_type, elapsed_ms

On validation failure, the response contains validation_errors (list of {index, field, message}) instead of results. Individual results may include truncated: true with a continuation_id for large responses -- use hangar_fetch_continuation to retrieve the full data.

Results with retries include retry_metadata with attempts and retries counts.

Example:

// Request
{
  "calls": [
    {"mcp_server": "math", "tool": "add", "arguments": {"a": 1, "b": 2}},
    {"mcp_server": "math", "tool": "multiply", "arguments": {"a": 3, "b": 4}}
  ],
  "max_concurrency": 5
}

// Response
{
  "batch_id": "batch-abc123", "success": true, "total": 2,
  "succeeded": 2, "failed": 0, "elapsed_ms": 45.2,
  "results": [
    {"index": 0, "call_id": "call-1", "success": true, "result": 3,
     "error": null, "error_type": null, "elapsed_ms": 20.1},
    {"index": 1, "call_id": "call-2", "success": true, "result": 12,
     "error": null, "error_type": null, "elapsed_ms": 22.8}
  ]
}

hangar_fetch_continuation {#hangar_fetch_continuation}

Fetch full data for a truncated batch response. Continuation IDs are returned when individual call results exceed the response size limit.

Parameters:

ParameterTypeDefaultRangeDescription
continuation_idstrrequiredstarts with "cont_"Continuation ID from a truncated result
offsetint0>= 0Byte offset to start reading from
limitint5000001--2000000Maximum bytes to return

Side Effects: None (read-only cache access).

Returns:

FieldTypeDescription
foundboolWhether the continuation data exists
dataanyThe continuation data (when found)
total_size_bytesintTotal size of the cached data
offsetintCurrent read offset
has_moreboolWhether more data is available
completeboolWhether all data has been returned

Returns {found: false, error: "Continuation not found (may have expired)"} when the continuation ID is invalid or expired.

Example:

// Request
{"continuation_id": "cont_abc123", "offset": 0, "limit": 500000}

// Response
{
  "found": true, "data": "...full response content...",
  "total_size_bytes": 250000, "offset": 0, "has_more": false, "complete": true
}

Errors: ValueError if continuation_id is empty, does not start with "cont_", or offset is negative.

hangar_delete_continuation {#hangar_delete_continuation}

Delete cached continuation data to free memory.

Parameters:

ParameterTypeDefaultDescription
continuation_idstrrequiredContinuation ID to delete

Side Effects: Removes the cached response from memory.

Returns:

FieldTypeDescription
deletedboolWhether the data was found and deleted
continuation_idstrThe requested continuation ID

Returns {deleted: false, continuation_id: "..."} when the ID is not found. Returns {deleted: false, continuation_id: "...", error: "..."} when the truncation cache is unavailable.

Example:

// Request
{"continuation_id": "cont_abc123"}

// Response
{"deleted": true, "continuation_id": "cont_abc123"}

Errors: ValueError if continuation_id is empty.