Skip to content

MCP Server - #221

Merged
capn-freako merged 3 commits into
masterfrom
mcp-server
Sep 6, 2026
Merged

MCP Server#221
capn-freako merged 3 commits into
masterfrom
mcp-server

Conversation

@capn-freako

Copy link
Copy Markdown
Owner

I've added an MCP server, for agentic AI use of PyBERT library functionality.

capn-freako and others added 2 commits August 24, 2026 08:52
…221)

Exposes run_simulation, get/set_config, inspect_results_file, and
IBIS-AMI model introspection as MCP tools over stdio via a new
`pybert mcp` subcommand (optional `mcp` extra). Adds a runnable
Python client example under examples/, shipped in both the sdist
and wheel. Bumps major version to 11.0.0 for the new public surface.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- cli.py: the `pybert mcp` ImportError guard never fired because only
  the `build_server` import, not the deferred `mcp` import inside it,
  was wrapped; now the call is inside the try block too.
- server.py: run_simulation now validates config keys the same way
  set_config does (via _apply_config), so a typo'd key fails loudly
  instead of being silently dropped by HasTraits.
- server.py: run_simulation skips Chaco plot construction unless a
  results_file was requested, since metrics are already populated
  before that work happens.
- server.py: removed the unused, misleadingly-documented main().
- test_mcp.py: dropped a no-op pytest.importorskip("asyncio") (stdlib,
  can't ever skip) and added coverage for the two behavior changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@capn-freako
capn-freako requested a review from jdpatt August 24, 2026 16:03
@capn-freako

Copy link
Copy Markdown
Owner Author

@mikelabonte, mentioning you, since you helped recently.
However, please, let me know if this is spam and I'll stop mentioning you.
-db

- examples/mcp_notebook.ipynb: interactive counterpart to mcp_client.py,
  exercising all 7 tools over one MCP session; ships in the wheel/sdist
  alongside the existing example script.
- .mcp.json + .claude/skills/pybert-mcp/SKILL.md: registers the pybert
  MCP server for this repo and teaches Claude how to drive it correctly
  (status-string semantics, config-key validation, IBIS-AMI lookup order).
- .gitignore: carve out .mcp.json and .claude/skills/ from the blanket
  .* rule so these are checked in; .claude/settings.local.json and other
  local Claude state stay ignored.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSNkV1c7sxbP4w7oAW29JR
@capn-freako
capn-freako merged commit 29c89be into master Sep 6, 2026
@capn-freako
capn-freako deleted the mcp-server branch September 6, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant