Add Protocol Builder tab for session type protocol design#1224
Open
chrisbartoloburlo wants to merge 2 commits intomodelcontextprotocol:mainfrom
Open
Add Protocol Builder tab for session type protocol design#1224chrisbartoloburlo wants to merge 2 commits intomodelcontextprotocol:mainfrom
chrisbartoloburlo wants to merge 2 commits intomodelcontextprotocol:mainfrom
Conversation
Adds a new "Protocol Builder" tab to the MCP Inspector that lets users visually compose interaction protocols from discovered MCP tools using session type theory. Features: - Discovers tools via tools/list and presents them as clickable blocks - Supports send (!), receive (?), internal/external choice, and recursion - Live DSL output with syntax highlighting - State machine visualization - Generates Python integration code using llmcontract - Export/download protocol as Python file This enables runtime protocol monitoring for LLM agent interactions, ensuring tools are called in the correct order per a defined contract. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…M preview
- Add convert-to-choice buttons on PairCard: convert ! to !{} or ? to ?{}
inline, keeping the partner as a standalone step
- ? to ?{} auto-populates branches with {sendLabel}Result and {sendLabel}Error
- ! to !{} populates branches with available MCP tool names
- Rewrite parseToFSM to correctly model choices as branching from same state
- Update StateMachinePreview to show branching visually with grouped transitions
- Fix recursion (rec X.) not being terminal — only loop-back refs terminate
- Support hyphens in DSL identifiers for MCP tool name compatibility
- Fix nested convert-to-choice crash (wrong variable name in recursive call)
- Fix package name: llmcontract -> llmsessioncontract
- Add example agent using MCP server-everything tools (echo, get-sum)
- Register protocol-builder tab in all validTabs arrays
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
@claude review |
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.
Summary
Features
llmcontractmonitor + middleware integration codeTest plan
rec X. ...X...syntaxnpm run build-client)🤖 Generated with Claude Code