MCP Server - #221
Merged
Merged
Conversation
…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>
Owner
Author
|
@mikelabonte, mentioning you, since you helped recently. |
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've added an MCP server, for agentic AI use of PyBERT library functionality.