ov.agents.mcp#
Expose ov to non-Claude-Code hosts as an MCP server (via py2mcp).
The host-agent path assumes Claude Code. For any other MCP client (a different
agent runtime, an IDE, a foreign orchestrator) this module turns ov’s coarse,
JSON-shaped facade into MCP tools — the spec’s “optional py2mcp MCP server for
non-Claude-Code hosts” (§9.6 / Phase 4). It deliberately exposes the coarse entry
points (study_url / capture_url), not the page-stateful operate primitives:
MCP tools are stateless calls, and ov.observe already owns its own browser
session internally, so each tool is a clean one-shot.
py2mcp builds the tool schemas by introspecting these functions’ type hints and
docstrings, so they are kept small and well-typed on purpose. The same skill-declared
path also works the coact-native way:
coact realize study-web-app --backend mcp # reads the skill's `coact: mcp:` block
Run the server directly with python -m ov.agents.mcp (or the ov mcp CLI).
Functions
|
Capture a web app (behavioral + static streams) and return a compact summary. |
|
Run the |
|
Build a FastMCP server exposing |
|
The |
|
Study a web app end-to-end (deterministic) and return its synopsis. |
- ov.agents.mcp.capture_url(url, *, mode='reconstruct', authorized=False, crawl_pages=0)[source]#
Capture a web app (behavioral + static streams) and return a compact summary.
Runs only the deterministic capture (no analysis). Use when you want the raw captured facts (technologies, rendering model, step/artifact counts) without the analyzers.
- Parameters:
- Return type:
- Returns:
A summary dict (run id, target, counts, detected technologies, rendering model).
- ov.agents.mcp.main()[source]#
Run the
ovMCP server over stdio (python -m ov.agents.mcp/ov mcp).- Return type:
- ov.agents.mcp.mcp_server(*, name='ov', tools=None, input_trans=None)[source]#
Build a FastMCP server exposing
ovto foreign hosts (viapy2mcp).>>> srv = mcp_server() >>> srv.run() # serve over stdio
- Return type:
- ov.agents.mcp.ov_tools()[source]#
The
ovcallables exposed as MCP tools (coarse, stateless, JSON-shaped).
- ov.agents.mcp.study_url(url, *, mode='reconstruct', authorized=False, crawl_pages=0, lenses='ux,arch')[source]#
Study a web app end-to-end (deterministic) and return its synopsis.
Drives the target, runs the UX + architecture analyzers, and returns the deduplicated
synopsis.jsondocument — the compact, evidence-referenced SSOT a downstream agent acts on. Model-free (no LLM judgment); the host adds narrative.- Parameters:
url (
str) – the target to study.mode (
str) –"reconstruct"(foreign target) or"review"(own target).authorized (
bool) – acknowledge authorization to study a foreign target.crawl_pages (
int) – if > 1, politely crawl that many same-origin pages.lenses (
str) – comma-separated analysis lenses ("ux","arch").
- Return type:
- Returns:
The synopsis document (run id, deduplicated findings, severity histogram).