Skip to content

feat: add mcp_check_input and mcp_check_output methods#103

Merged
saurabhjain1592 merged 5 commits intomainfrom
feat/mcp-check-endpoints
Feb 28, 2026
Merged

feat: add mcp_check_input and mcp_check_output methods#103
saurabhjain1592 merged 5 commits intomainfrom
feat/mcp-check-endpoints

Conversation

@saurabhjain1592
Copy link
Member

Summary

  • Add mcp_check_input and mcp_check_output async methods + sync wrappers
  • Add MCPCheckInputRequest, MCPCheckInputResponse, MCPCheckOutputRequest, MCPCheckOutputResponse Pydantic types
  • Export new types from axonflow/__init__.py
  • 403 responses treated as valid policy-blocked results, not errors

Context

Standalone policy-check endpoints (getaxonflow/axonflow-enterprise#1258) allow external orchestrators to use AxonFlow as a policy gate.

Test plan

  • ruff check passes
  • mypy passes
  • All 592 existing tests pass
  • CI passes

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
@saurabhjain1592 saurabhjain1592 merged commit cd4626a into main Feb 28, 2026
13 checks passed
@saurabhjain1592 saurabhjain1592 deleted the feat/mcp-check-endpoints branch March 3, 2026 14:08
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)
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