pymetrix-assistant¶
A plugin: a separate package
pymetrix-assistant is a first-party plugin, installed on its own:
An AI assistant in the pymetrix desktop app: ask Claude, or serve the open session to your own assistant over MCP.
The names pymetrix_assistant exports (its __all__), with their full documentation. Import them from the plugin: from pymetrix_assistant import .... The plugin's README says more.
Public names¶
AppServer
dataclass
¶
A running server: its address, and stop().
claude_code_command
¶
The command that adds this server to Claude Code.
serve
¶
serve(app: Any, port: int = 0, root: Path | None = None, call: Callable[[Callable[[], Any]], Any] | None = None, on_step: Callable[[str], None] | None = None) -> AppServer
Serve pymetrix's MCP tools over the app's session (app: an AppInterface) on this computer, at
http://127.0.0.1:<port>/mcp/<secret>. Steps run through app.run; every tool call runs through call
(default: on the thread calling serve, the app's main thread). root: the folder files may be read from
(default: the current folder). on_step(code) is told each step the assistant ran.
Plugin plumbing¶
What pymetrix's plugin loader reads (PLUGIN, register) and the plugin's version.
PLUGIN
module-attribute
¶
PLUGIN = PluginInfo(name='pymetrix-assistant', version=__version__, api='1.13', license='BSD-3-Clause', maintainer='Geoffrey Heenan', description='An AI assistant in the desktop app: ask Claude, or serve the open session to your own assistant over MCP', requires={'mcp': '>=2.3', 'uvicorn': '', 'anthropic': '>=2.6', 'keyring': '>=24'}, install='pip install "pymetrix-assistant"')
register
¶
The entry point: register the Assistant panel (once). Qt is imported only when the app builds the panel.