Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

test(mcp-kernel-server): add stdio JSON-RPC E2E transport tests#304

Merged
imran-siddique merged 1 commit into
imran-siddique:masterfrom
Ca23187:test/add-stdio-e2e-test
Mar 3, 2026
Merged

test(mcp-kernel-server): add stdio JSON-RPC E2E transport tests#304
imran-siddique merged 1 commit into
imran-siddique:masterfrom
Ca23187:test/add-stdio-e2e-test

Conversation

@Ca23187
Copy link
Copy Markdown
Contributor

@Ca23187 Ca23187 commented Mar 2, 2026

Description

Add end-to-end tests for MCP Kernel Server stdio mode.

These tests start the server with --stdio in a real subprocess and validate
JSON-RPC 2.0 request/response cycles over stdin/stdout. Coverage includes:

  • initialize → tools/list → tools/call roundtrip
  • unknown JSON-RPC method (-32601)
  • unknown MCP tool (MCP-level isError)
  • malformed JSON (-32603)

This ensures transport-level protocol compliance beyond handler-level tests.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 📚 Documentation update
  • 🧪 Test update
  • 🔧 Refactor (no functional changes)

Related Issues

Fixes #286

Checklist

  • I have read the CONTRIBUTING.md guidelines
  • My code follows the project's code style
  • I have added tests that prove my fix/feature works
  • All new and existing tests pass (pytest tests/ -v)
  • I have updated documentation if needed
  • My changes generate no new warnings

Testing

All tests pass on Linux (Ubuntu).
Stdio transport tests are skipped on Windows due to asyncio pipe limitations.

# Commands used to test
pytest modules/mcp-kernel-server/tests/test_stdio_e2e.py

Screenshots (if applicable)

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 2, 2026

@Ca23187 is attempting to deploy a commit to the Imran Siddique's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Owner

@imran-siddique imran-siddique left a comment

Choose a reason for hiding this comment

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

Excellent work @Ca23187! This is exactly the kind of transport-level testing we needed. The stdio E2E tests complement the existing handler-level tests perfectly.

Code review notes:

  • Clean \StdioServer\ abstraction with proper process lifecycle management
  • Good use of \selectors\ for non-blocking reads with timeout
  • Thorough coverage: initialize → tools/list → tools/call roundtrip, unknown method (-32601), unknown tool (MCP isError), malformed JSON (-32603)
  • Correct decision to skip on Windows due to asyncio pipe limitations

Merging — thanks for the contribution! 🎉

@imran-siddique imran-siddique merged commit a7ee6eb into imran-siddique:master Mar 3, 2026
7 of 8 checks passed
@Ca23187 Ca23187 deleted the test/add-stdio-e2e-test branch March 5, 2026 01:48
@imran-siddique
Copy link
Copy Markdown
Owner

ℹ️ This project has moved to microsoft/agent-governance-toolkit. All future development, issues, and PRs should be directed there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP server has no functional integration tests

2 participants