Skip to content

v0.0.1 - Initial MCP server

Choose a tag to compare

@jgstew jgstew released this 03 Aug 20:41

Initial implementation of a minimal, read-only MCP server around besapi.

Tools

Session relevancesession_relevance_query, using besapi's JSON variant so relevance errors surface as real errors rather than in-band "ERROR: ..." strings.

Client fast queryclient_query_submit, client_query_results, and a blocking client_query that polls with progress notifications. besapi has no built-in clientquery support, so this is implemented over the REST API with XML-escaped query text, an int-coerced query ID, and bounded polling that stops on expected-count-reached, results-stable, or timeout.

Read-only helperswhoami, get_server_info, list_sites, get_computer_group (explicit site_path required), get_operator, get_dashboard_variable, and api_get as a GET-only escape hatch.

Design constraints

  • Read-only by construction — no mutating besapi call exists in the package; the registered tool list is the boundary.
  • Explicit site paths — never uses besapi's mutable current-site-path state (set_current_site_path / get_current_site_path), so every tool call is reproducible in isolation.
  • Clean stdout — config reading is re-implemented rather than using besapi's helper, which prints to stdout and would corrupt the MCP stdio transport. All logging goes to stderr.
  • Upstreamable shape — generic BigFix logic takes conn first and imports nothing from fastmcp, so it can move into besapi with a mechanical connself change. See docs/besapi-proposals.md.

Requirements

Python >= 3.10, besapi>=4.1.5, fastmcp==4.0.0b1 (pinned exactly; the 4.0 beta advises exact pinning).

53 tests run entirely offline against a scripted fake connection, including in-memory end-to-end MCP calls.