Serveur MCP

mcphost

dev.mcphost/mcphost

Ce que fait ce MCP

Hosts MCP tools over HTTP and provides tenant billing, tool publishing and discovery, agent directories, inter-agent messaging, groups, runs, and scheduling.

billing.plans
The plan catalog (price and quotas per plan) and whether Stripe billing is configured on this host. Anonymous callers get the same answer as tenants.
Schéma d’entrée
{'type': 'object', 'required': [], 'properties': {'tenant_key': {'type': 'string', 'description': 'The key `signup` returned. Optional on the connection that ran signup (or host.redeem): that connection is already bound to the tenant it created, so later calls on it need no tenant_key. Required only when this connection carries no Authorization: Bearer header and never ran signup -- when both a header and this argument are present, the header wins. Omitting it on such a connection returns tenant_key_missing (-32602).'}}, 'additionalProperties': False}
host.quickstart
Return the shortest ordered sequence of calls to a working tool of `kind`, with your namespace and a filled-in example already substituted in, plus the current limits and a try_before_call table naming the one dry-run tool for each case. Read-only. Call this before host.tool_publish if you're not sure what a spec should look like. Unauthenticated callers get the signup step first.
Schéma d’entrée
{'type': 'object', 'required': ['kind'], 'properties': {'kind': {'type': 'string', 'description': 'Which registered kind to return a worked example for, e.g. echo, http, python -- or a job-word alias (webhook, event, cron, ...) for its recipe. Omit to see every kind, alias and recipe name.'}, 'tenant_key': {'type': 'string', 'description': 'The key `signup` returned. Optional on the connection that ran signup (or host.redeem): that connection is already bound to the tenant it created, so later calls on it need no tenant_key. Required only when this connection carries no Authorization: Bearer header and never ran signup -- when both a header and this argument are present, the header wins. Omitting it on such a connection returns tenant_key_missing (-32602).'}}, 'additionalProperties': False}
host.redeem
Exchange a signup(handoff: true) handoff_token for the tenant key it was issued for. Single-use: a second redemption fails with handoff_token_redeemed; past its expiry it fails with handoff_token_expired. Unauthenticated -- the token itself is the proof.
Schéma d’entrée
{'type': 'object', 'required': ['handoff_token'], 'properties': {'tenant_key': {'type': 'string', 'description': 'The key `signup` returned. Optional on the connection that ran signup (or host.redeem): that connection is already bound to the tenant it created, so later calls on it need no tenant_key. Required only when this connection carries no Authorization: Bearer header and never ran signup -- when both a header and this argument are present, the header wins. Omitting it on such a connection returns tenant_key_missing (-32602).'}, 'handoff_token': {'type': 'string', 'description': 'The handoff_token signup(handoff: true) returned.'}}, 'additionalProperties': False}
host.state.get
Read one key from this tenant's key-value state namespace. Returns found: false (not an error) if the key was never set.
Schéma d’entrée
{'type': 'object', 'required': ['key'], 'properties': {'key': {'type': 'string', 'description': "Key to read from this tenant's key-value state namespace."}, 'end_user': {'type': ['string', 'null'], 'description': '"self" for the caller\'s own verified end-user identity, an explicit subject (only when this call carries no end-user identity of its own), or omit/null for the tenant-wide value.'}, 'tenant_key': {'type': 'string', 'description': 'The key `signup` returned. Optional on the connection that ran signup (or host.redeem): that connection is already bound to the tenant it created, so later calls on it need no tenant_key. Required only when this connection carries no Authorization: Bearer header and never ran signup -- when both a header and this argument are present, the header wins. Omitting it on such a connection returns tenant_key_missing (-32602).'}}, 'additionalProperties': False}
host.state.list
List keys (with their current values) in this tenant's key-value state namespace, optionally filtered by prefix.
Schéma d’entrée
{'type': 'object', 'required': [], 'properties': {'limit': {'type': 'integer', 'description': 'Max keys to return; default 100.'}, 'prefix': {'type': 'string', 'description': 'Only list keys starting with this prefix; default: all keys.'}, 'end_user': {'type': ['string', 'null'], 'description': '"self" for the caller\'s own verified end-user identity, an explicit subject (only when this call carries no end-user identity of its own), or omit/null for the tenant-wide value.'}, 'tenant_key': {'type': 'string', 'description': 'The key `signup` returned. Optional on the connection that ran signup (or host.redeem): that connection is already bound to the tenant it created, so later calls on it need no tenant_key. Required only when this connection carries no Authorization: Bearer header and never ran signup -- when both a header and this argument are present, the header wins. Omitting it on such a connection returns tenant_key_missing (-32602).'}}, 'additionalProperties': False}
host.state.set
Write one key in this tenant's key-value state namespace; value may be any JSON value. Overrun of the plan's state_bytes_max quota fails with state_quota_exceeded and writes nothing.
Schéma d’entrée
{'type': 'object', 'required': ['key', 'value'], 'properties': {'key': {'type': 'string', 'description': "Key to write in this tenant's key-value state namespace."}, 'value': {'description': 'Any JSON value to store under key.'}, 'end_user': {'type': ['string', 'null'], 'description': '"self" for the caller\'s own verified end-user identity, an explicit subject (only when this call carries no end-user identity of its own), or omit/null for the tenant-wide value.'}, 'tenant_key': {'type': 'string', 'description': 'The key `signup` returned. Optional on the connection that ran signup (or host.redeem): that connection is already bound to the tenant it created, so later calls on it need no tenant_key. Required only when this connection carries no Authorization: Bearer header and never ran signup -- when both a header and this argument are present, the header wins. Omitting it on such a connection returns tenant_key_missing (-32602).'}}, 'additionalProperties': False}
host.tool_call
Invoke a tool this tenant has already published, by its local name -- the same real, metered call as calling it directly by its namespaced name (<namespace>.<name>), for a session that has no way to see its own namespaced tool name yet. Unlike host.tool_test, this counts toward host.usage and appears in host.tool_logs. Pass async: true for a tool that needs more than the call deadline: returns {run_id, status: "queued"} immediately instead of running inline -- see host.runs.get/wait. Pass version to pin the call to one of host.tool_history's versions instead of whichever is current.
Schéma d’entrée
{'type': 'object', 'required': ['name', 'args'], 'properties': {'args': {'type': 'object', 'description': "Arguments to pass, validated against the tool's own args_schema."}, 'name': {'type': 'string', 'description': 'Local name of the tool to invoke.'}, 'async': {'type': 'boolean', 'description': "Run as a job instead of inline: returns {run_id, status} within ~50ms under the plan's job_max_s deadline; default false."}, 'version': {'type': 'integer', 'description': 'Pin the call to this version instead of whichever is current; see host.tool_history. An unknown version is an argument error.'}, 'tenant_key': {'type': 'string', 'description': 'The key `signup` returned. Optional on the connection that ran signup (or host.redeem): that connection is already bound to the tenant it created, so later calls on it need no tenant_key. Required only when this connection carries no Authorization: Bearer header and never ran signup -- when both a header and this argument are present, the header wins. Omitting it on such a connection returns tenant_key_missing (-32602).'}}, 'x-deprecated': {'sunset': '2026-12-31', 'replaced_by': 'host.tool.call'}, 'additionalProperties': False}
host.tool_publish
Publish a tool of a registered kind (chain, echo, http, python, wasm) under this tenant's namespace. Call host.quickstart(kind) first for a filled-in example spec and the full publish-to-call sequence. Python's sandbox API: import mcphost (mcphost.table, mcphost.state, mcphost.docs). Name must match ^[a-z][a-z0-9_]{1,40}$; a rejection names the failing field and a corrected example. Try host.tool_test before a real call.
Schéma d’entrée
{'type': 'object', 'required': ['name', 'kind', 'spec'], 'properties': {'kind': {'type': 'string', 'description': 'Which registered kind to publish under: chain, echo, http, python, wasm. A job-word alias also resolves here -- event, events, webhook, webhooks, inbound or trigger for an inbound webhook, cron, schedule or scheduled for a timed run -- both resolve to kind http and the descriptor comes back with resolved_from naming the alias you asked for.'}, 'name': {'type': 'string', 'description': 'Local name for the new tool; must match ^[a-z][a-z0-9_]{1,40}$.'}, 'spec': {'type': 'object', 'description': 'The kind-specific spec object; see host.quickstart(kind) for a filled-in example. For python\'s network field: "none", "public", or "egress" -- a tool\'s own code reaches this tenant\'s data with `import mcphost` (mcphost.table, mcphost.state, mcphost.docs, mcphost.lineage) even when network is "none".'}, 'scopes': {'type': 'array', 'items': {'type': 'string'}, 'description': 'OAuth scopes a token must carry (directly, or via mcp) to reach this tool: catalogued names from host.oauth.scopes, or the built-ins read/write. At most 8. Omit (or [] ) to require only mcp -- unaffected by any catalog.'}, 'tenant_key': {'type': 'string', 'description': 'The key `signup` returned. Optional on the connection that ran signup (or host.redeem): that connection is already bound to the tenant it created, so later calls on it need no tenant_key. Required only when this connection carries no Authorization: Bearer header and never ran signup -- when both a header and this argument are present, the header wins. Omitting it on such a connection returns tenant_key_missing (-32602).'}}, 'x-deprecated': {'sunset': '2026-12-31', 'replaced_by': 'host.tool.publish'}, 'additionalProperties': False}
host.tool_share
Share one of this tenant's published tools with everyone (visibility: "public") or with a named group this tenant owns (visibility: "group", group: <name>). The tool keeps running in this tenant's own sandbox with this tenant's own secrets; a caller reaches it as <this tenant's namespace>.<name>.
Schéma d’entrée
{'type': 'object', 'required': ['name', 'visibility'], 'properties': {'name': {'type': 'string', 'description': 'Local name of the tool to share.'}, 'group': {'type': 'string', 'description': 'Required when visibility is "group"; must already exist (host.group.create).'}, 'tenant_key': {'type': 'string', 'description': 'The key `signup` returned. Optional on the connection that ran signup (or host.redeem): that connection is already bound to the tenant it created, so later calls on it need no tenant_key. Required only when this connection carries no Authorization: Bearer header and never ran signup -- when both a header and this argument are present, the header wins. Omitting it on such a connection returns tenant_key_missing (-32602).'}, 'visibility': {'type': 'string', 'description': '"public" or "group".'}, 'description': {'type': 'string', 'description': 'Catalog-facing blurb; shown by host.catalog.search/get.'}, 'expose_spec': {'type': 'boolean', 'description': 'Default false. When true, any tenant this tool is shared with may call host.tool_spec_shared to read its (redacted) spec.'}}, 'x-deprecated': {'sunset': '2026-12-31', 'replaced_by': 'host.tool.share'}, 'additionalProperties': False}
host.tool_test
Dry-run a published tool by name: writes are rolled back and reported under dry_run, nothing delivered; for the other cases see host.quickstart.
Schéma d’entrée
{'type': 'object', 'required': ['name', 'args'], 'properties': {'args': {'type': 'object', 'description': 'Arguments to pass, same shape as a real call.'}, 'name': {'type': 'string', 'description': 'Local name of the already-published tool to dry-run.'}, 'tenant_key': {'type': 'string', 'description': 'The key `signup` returned. Optional on the connection that ran signup (or host.redeem): that connection is already bound to the tenant it created, so later calls on it need no tenant_key. Required only when this connection carries no Authorization: Bearer header and never ran signup -- when both a header and this argument are present, the header wins. Omitting it on such a connection returns tenant_key_missing (-32602).'}}, 'x-deprecated': {'sunset': '2026-12-31', 'replaced_by': 'host.tool.test'}, 'additionalProperties': False}
host.whoami
Return the calling tenant's identity, including key_age_s and key_rotated_at for auditing credential hygiene.
Schéma d’entrée
{'type': 'object', 'required': [], 'properties': {'tenant_key': {'type': 'string', 'description': 'The key `signup` returned. Optional on the connection that ran signup (or host.redeem): that connection is already bound to the tenant it created, so later calls on it need no tenant_key. Required only when this connection carries no Authorization: Bearer header and never ran signup -- when both a header and this argument are present, the header wins. Omitting it on such a connection returns tenant_key_missing (-32602).'}}, 'additionalProperties': False}
signup
Create a tenant and receive a bearer key and namespace. Unauthenticated. Recommended: pass handoff: true to receive a short-lived, single-use handoff_token instead of the raw key -- redeem it once with host.redeem to get the key, so a transcript of this call and the redeem call, if it leaks, carries a dead credential. The raw-key path (handoff omitted) stays fully supported.
Schéma d’entrée
{'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string', 'description': 'display name'}, 'handoff': {'type': 'boolean', 'description': 'Recommended: true to receive a handoff_token (redeem via host.redeem) instead of the raw key. Default false (raw key, unchanged).'}}, 'additionalProperties': False}
Modifié
host.tool_share
5 October 2026 02:44
Modifié
host.state.list
5 October 2026 02:44
Modifié
host.state.get
5 October 2026 02:44
Modifié
host.state.set
5 October 2026 02:44
Modifié
host.tool_test
5 October 2026 02:44
Modifié
host.tool_call
5 October 2026 02:44
Modifié
host.tool_publish
5 October 2026 02:44
Modifié
host.whoami
5 October 2026 02:44
Modifié
billing.plans
5 October 2026 02:44
Modifié
host.redeem
5 October 2026 02:44
Modifié
host.quickstart
5 October 2026 02:44
Modifié
signup
5 October 2026 02:44
Supprimé
host.usage
3 October 2026 02:51
Supprimé
host.trigger.test
3 October 2026 02:51
Supprimé
host.trigger.set
3 October 2026 02:51
Supprimé
host.trigger.resume
3 October 2026 02:51
Supprimé
host.trigger.replay
3 October 2026 02:51
Supprimé
host.trigger.remove
3 October 2026 02:51
Supprimé
host.trigger.pause
3 October 2026 02:51
Supprimé
host.trigger.list
3 October 2026 02:51
Supprimé
host.trigger.get
3 October 2026 02:51
Supprimé
host.trigger.fire
3 October 2026 02:51
Supprimé
host.tool_unshare
3 October 2026 02:51
Supprimé
host.tool_spec_shared
3 October 2026 02:51
Supprimé
host.tool_run
3 October 2026 02:51
Supprimé
host.tool_rollback
3 October 2026 02:51
Supprimé
host.tool_remove
3 October 2026 02:51
Supprimé
host.tool_logs
3 October 2026 02:51
Supprimé
host.tool_list
3 October 2026 02:51
Supprimé
host.tool_history
3 October 2026 02:51