Add Hy3 API Guardian MCP server#118
Draft
Kanghz87 wants to merge 2 commits into
Draft
Conversation
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.
What changed
This PR adds
mcp_servers/api_guardian, a Python MCP server that packages Hy3 as an OpenAPI governance assistant with three read-only tools:audit_openapi: deterministic security/design checks plus grounded Hy3 analysis.detect_breaking_changes: deterministic OpenAPI compatibility diff plus a Hy3 migration plan.generate_contract_tests: Hy3-generated pytest or Jest contract tests for selected operations.The package runs over local stdio, installs with
pip install .(or runs withuvx --from . hy3-api-guardian), and includes project-level configuration examples for CodeBuddy and Cursor.Why
Issue #3 asks for a reusable Hy3-powered MCP server with at least three tools, environment-based credentials, one-click installation, two-client verification, and a recorded demo. API contract governance is a distinct scenario from the existing general chat, code-review, knowledge-base, and research submissions, while still exercising Hy3 for core reasoning.
Safety and developer impact
HY3_ALLOWED_ROOTafter real-path resolution.$refvalues are resolved where needed, while remote references are never fetched.Validation
python -m ruff check .python -m ruff format --check .python -m pytest tests -p no:cacheprovider— 37 passedpip checkreported no broken requirements.ClientSessionand TokenHub Hy3; all provider requests returned HTTP 200.audit_openapicall in CodeBuddy CLI 2.125.0.detect_breaking_changescall in Cursor 3.12.17.Related to #3.