Skip to content

Normalize MCP lifecycle events#101

Merged
mertsatilmaz merged 1 commit into
OWASP:mainfrom
Genmin:fix/mcp-event-normalization
May 13, 2026
Merged

Normalize MCP lifecycle events#101
mertsatilmaz merged 1 commit into
OWASP:mainfrom
Genmin:fix/mcp-event-normalization

Conversation

@Genmin

@Genmin Genmin commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • adds MCP lifecycle event normalization helpers for resource reads, prompt gets, tool results, and policy decisions
  • wires normalized mcp_events into MCP workflow trace construction while preserving existing events behavior
  • carries server-scoped metadata such as server_id, trust, transport, server identity, protocol version, canonical MCP tool names, and policy decisions
  • documents the normalized event shapes in both the MCP adapter design and trace format docs

Validation

  • python -m pytest tests/test_mcp_adapter.py -q
  • python -m pytest -q
  • python -m compileall -q src/agent_harness/mcp_adapter.py
  • git diff --check

Closes #97.

@mertsatilmaz mertsatilmaz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Welcome to the team.

@mertsatilmaz mertsatilmaz merged commit 89ccc6c into OWASP:main May 13, 2026
1 check passed
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.

Record MCP resource, prompt, tool, and policy lifecycle events

2 participants