feat: add mcp_check_input and mcp_check_output methods#103
Merged
saurabhjain1592 merged 5 commits intomainfrom Feb 28, 2026
Merged
feat: add mcp_check_input and mcp_check_output methods#103saurabhjain1592 merged 5 commits intomainfrom
saurabhjain1592 merged 5 commits intomainfrom
Conversation
Add standalone policy-check methods for external orchestrators to use AxonFlow as a policy gate. Includes async methods, sync wrappers, and Pydantic request/response types. 403 responses are treated as valid policy-blocked results, not errors. Refs: getaxonflow/axonflow-enterprise#1258
gzak
added a commit
that referenced
this pull request
Mar 6, 2026
Adds a factory method that returns an async MCP tool interceptor ready
for use with MultiServerMCPClient(tool_interceptors=[...]).
The interceptor enforces AxonFlow input and output policies around every
MCP tool call: mcp_check_input → handler() → mcp_check_output. Two
design decisions incorporated:
- Redacted output passthrough: when mcp_check_output returns redacted_data,
the interceptor substitutes it for the original result rather than
discarding it silently.
- Pluggable connector type derivation: accepts an optional connector_type_fn
callable to override the default "{server_name}.{tool_name}" mapping,
allowing callers to match their AxonFlow policy connector type keys.
Closes #107
feat: add mcp_check_input and mcp_check_output methods (#103)
gzak
added a commit
that referenced
this pull request
Mar 6, 2026
Adds a factory method that returns an async MCP tool interceptor ready
for use with MultiServerMCPClient(tool_interceptors=[...]).
The interceptor enforces AxonFlow input and output policies around every
MCP tool call: mcp_check_input → handler() → mcp_check_output. Two
design decisions incorporated:
- Redacted output passthrough: when mcp_check_output returns redacted_data,
the interceptor substitutes it for the original result rather than
discarding it silently.
- Pluggable connector type derivation: accepts an optional connector_type_fn
callable to override the default "{server_name}.{tool_name}" mapping,
allowing callers to match their AxonFlow policy connector type keys.
Closes #107
feat: add mcp_check_input and mcp_check_output methods (#103)
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
mcp_check_inputandmcp_check_outputasync methods + sync wrappersMCPCheckInputRequest,MCPCheckInputResponse,MCPCheckOutputRequest,MCPCheckOutputResponsePydantic typesaxonflow/__init__.pyContext
Standalone policy-check endpoints (getaxonflow/axonflow-enterprise#1258) allow external orchestrators to use AxonFlow as a policy gate.
Test plan
ruff checkpassesmypypasses