-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add MCP service gRPC client #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add MCP service client methods to _rpc/client.py - Add mcp_pb2 imports to gen/__init__.py - Update protobuf generated files for MCP service - Add docs/guides/mcp.md guide - Add integration tests for MCP service - Update API reference and mkdocs nav
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds gRPC client support for the MCP (Model Context Protocol) service, enabling Python SDK users to evaluate tool access (RFC-006) and verify server identity (RFC-007).
Changes:
- Added
MCPClientclass tocapiscio_sdk/_rpc/client.pywith methods for tool access evaluation and server identity verification - Added integration tests in
tests/integration/test_mcp_service.pycovering MCP service functionality - Added comprehensive documentation in
docs/guides/mcp.mdand updateddocs/api-reference.md - Updated protobuf imports in
__init__.pyand regenerated existing pb2 files with newer protobuf version (6.33.4)
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
capiscio_sdk/_rpc/client.py |
Added MCPClient class with evaluate_tool_access, verify_server_identity, parse_server_identity_http/jsonrpc, and health methods |
capiscio_sdk/_rpc/gen/capiscio/v1/__init__.py |
Added imports for mcp_pb2 and mcp_pb2_grpc modules |
capiscio_sdk/_rpc/gen/capiscio/v1/*_pb2.py |
Updated protobuf generated files from version 6.33.2 to 6.33.4 |
tests/integration/test_mcp_service.py |
Added comprehensive integration tests for MCP service with 25 test cases covering tool access, server verification, parsing, and error handling |
docs/guides/mcp.md |
Added new MCP security integration guide (521 lines) |
docs/api-reference.md |
Updated API reference to include MCPClient and expanded documentation for other RPC clients |
mkdocs.yml |
Added MCP Security guide to navigation |
- Add Generator return type annotation to start_badge_keeper in badge.py - Add Generator return type annotation to start_keeper in client.py - Fix Google-style docstring format for Yields section - Configure mkdocstrings options for better compatibility
|
✅ Documentation validation passed!
|
These files were ignored by .gitignore but are required for MCP service support.
|
✅ Documentation validation passed!
|
|
✅ All checks passed! Ready for review. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
The test_mcp_service.py tests require capiscio-core gRPC server running on localhost:50051, which is not set up in the Docker Compose integration test environment. These tests are better suited for E2E testing with full infrastructure.
|
✅ Documentation validation passed!
|
|
✅ All checks passed! Ready for review. |
|
✅ Integration tests passed! Server validation, BadgeKeeper, and gRPC tests all working. |
Summary
Adds gRPC client support for the MCP service, enabling Python SDK users to generate server keypairs for MCP server identity.
Changes
gRPC Client (
capiscio_sdk/_rpc/client.py)generate_server_keypair()methodgenerate_server_keypair_sync()for synchronous usageMCPKeypairResponsewith public/private keys and DIDGenerated Protobuf (
capiscio_sdk/_rpc/gen/capiscio/v1/)mcp_pb2importsDocumentation
docs/guides/mcp.md- MCP service usage guidedocs/api-reference.mdwith MCP client methodsmkdocs.ymlnavigationTests
tests/integration/test_mcp_service.pyfor MCP service integration testsTesting
Unit tests: 189 passed, 7 pre-existing failures (same as main)
Note: Pre-existing failures in test_agent_card.py, test_certificate.py, test_pop_badge.py exist on main branch.
Dependencies
Related