v0.2.0 — MCP client
What's new
MCP client (#14, #19) — integration with external Model Context
Protocol servers. The ember agent can now
execute tools from any MCP server alongside local functions — the server stays
a separate process and doesn't know about the client.
New ember.mcp subpackage:
MCPClient— synchronous client for a single MCP server: a thin wrapper
around the async MCP SDK (background thread with an event loop, blocking
methods).- Two connection factories:
MCPClient.stdio(command, args, ...)— server as a child process (stdio
transport);MCPClient.http(url, ...)— server over streamable HTTP.
- Context manager:
with MCPClient.stdio(...) as mcp:— connect/disconnect
handled automatically. mcp.list_tools()— returns the server's tools (tools/list) as
regularFunctionTools: the JSON Schema is preserved, andfuncproxies
calls back to the server. The list can be passed toAgentalongside local
tools.mcp.call_tool(name, arguments)— direct tool invocation
(tools/call).MCPError— a single error type for transport and protocol failures
(modeled afterProviderError), no dependency on MCP SDK internals.
Example
from ember import Agent, MCPClient
with MCPClient.stdio(command="python", args=["server.py"]) as mcp:
agent = Agent(provider=provider, tools=mcp.list_tools())
print(agent.run("Call the ping tool")) A runnable example without API keys: examples/mcp_client.py (includes a --serve
mode that starts a local stdio server with a ping tool).
Installation
pip install "emberio-labs-ember[mcp]"
Full Changelog: v0.1.0...v0.2.0
PyPI: https://pypi.org/project/emberio-labs-ember/0.2.0/