jeevesagent.jeeves.client¶
JeevesGateway — convenience wrapper around the Jeeves MCP gateway.
The class is itself a ToolHost; it
lazy-builds a one-server MCPRegistry on first
use and forwards every protocol method to it. That means three usage
patterns work out of the box:
One-liner — drop straight into
Agent:Agent("...", tools=JeevesGateway.from_env())
Compose with other MCP servers:
MCPRegistry([ JeevesGateway.from_env().as_mcp_server(), MCPServerSpec.stdio("git", "uvx", ["mcp-server-git"]), ])
Build the registry directly for explicit lifecycle management:
gateway = JeevesGateway.from_env() registry = gateway.as_registry() async with registry: ...
Attributes¶
Classes¶
Connection details for the Jeeves Gateway. |
|
ToolHost-shaped wrapper around the Jeeves Gateway. |
Functions¶
|
Return |
Module Contents¶
- class jeevesagent.jeeves.client.JeevesGateway(config: JeevesConfig, *, registry: jeevesagent.mcp.registry.MCPRegistry | None = None)[source]¶
ToolHost-shaped wrapper around the Jeeves Gateway.
- as_mcp_server() jeevesagent.mcp.spec.MCPServerSpec[source]¶
Return the
MCPServerSpecdescribing this gateway.
- as_registry() jeevesagent.mcp.registry.MCPRegistry[source]¶
Return a one-server
MCPRegistryrooted at this gateway.
- async call(tool: str, args: collections.abc.Mapping[str, Any], *, call_id: str = '') jeevesagent.core.types.ToolResult[source]¶
- classmethod from_env(*, env_var: str = JEEVES_API_KEY_ENV, base_url: str | None = None, server_name: str = JEEVES_DEFAULT_SERVER_NAME) JeevesGateway[source]¶
Build a gateway from the
JEEVES_API_KEYenvironment variable.
- property config: JeevesConfig¶
- jeevesagent.jeeves.client.looks_like_jeeves_key(value: str) bool[source]¶
Return
Trueifvaluematches the Jeeves API-key shape.The check is intentionally permissive — it only verifies the well-known
jm_sk_prefix so callers can warn on obviously-wrong inputs without blocking unconventional formats the server may accept.
- jeevesagent.jeeves.client.JEEVES_API_KEY_ENV = 'JEEVES_API_KEY'¶
- jeevesagent.jeeves.client.JEEVES_DEFAULT_BASE_URL = 'https://jeeves.works/mcp'¶
- jeevesagent.jeeves.client.JEEVES_DEFAULT_SERVER_NAME = 'jeeves'¶
- jeevesagent.jeeves.client.JEEVES_TOKEN_PREFIX = 'jm_sk_'¶