feat: Add MCP service for server identity operations#30
Merged
Conversation
- Add mcp.proto defining MCPService with GenerateServerKeypair RPC - Add pkg/mcp package with Ed25519 keypair generation - Add internal/rpc/mcp_service.go gRPC service implementation - Add pkg/pop for Proof of Possession operations - Update proto generation config for new service - Add API reference documentation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive MCP (Model Context Protocol) service implementation to capiscio-core, providing gRPC operations for tool authority (RFC-006) and server identity management (RFC-007).
Changes:
- New proto definition (
proto/capiscio/v1/mcp.proto) with 4 RPCs for tool access evaluation, server identity verification, parsing, and health checks - New
pkg/pop/package for Proof of Possession cryptographic primitives shared between RFC-003 and RFC-007 - New
pkg/mcp/package with complete MCP service implementation including guard, server identity verification, evidence storage, and health checks - gRPC service implementation in
internal/rpc/mcp_service.gowiring the proto to pkg/mcp - Comprehensive test coverage for all new packages
Reviewed changes
Copilot reviewed 28 out of 30 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| proto/capiscio/v1/mcp.proto | MCP service proto with tool access and server identity RPCs |
| proto/buf.gen.yaml | Added Python proto generation for capiscio-mcp-python |
| pkg/rpc/gen/capiscio/v1/*.pb.go | Generated proto code (2 files, 1752 lines) |
| pkg/pop/primitives.go | Shared PoP cryptographic primitives (475 lines) |
| pkg/pop/session_cache.go | Session caching for verified PoP results (223 lines) |
| pkg/pop/*_test.go | Comprehensive tests for pop package (769 lines) |
| pkg/mcp/types.go | Core MCP types and enums (321 lines) |
| pkg/mcp/errors.go | Error definitions and mappings (205 lines) |
| pkg/mcp/guard.go | Tool access evaluation implementation (204 lines) |
| pkg/mcp/server_identity.go | Server identity verification (379 lines) |
| pkg/mcp/evidence_store.go | Evidence storage implementations (435 lines) |
| pkg/mcp/health.go | Health check utilities (133 lines) |
| pkg/mcp/service.go | Service orchestration (101 lines) |
| pkg/mcp/doc.go | Package documentation (20 lines) |
| pkg/mcp/*_test.go | Comprehensive tests for mcp package (1513 lines) |
| internal/rpc/mcp_service.go | gRPC service implementation (342 lines) |
| internal/rpc/server.go | Registered MCP service (3 lines added) |
| Makefile | Added docs generation target (7 lines) |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
- Fix unchecked fmt.Sscanf return in guard.go - Fix empty branch staticcheck warnings in evidence_store.go
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
Adds the MCP (Model Context Protocol) service to capiscio-core, providing gRPC operations for MCP server identity management.
Changes
New Proto (
proto/capiscio/v1/mcp.proto)MCPServicewithGenerateServerKeypairRPCNew Package (
pkg/mcp/)server_identity.goguard.goevidence_store.gohealth.gotypes.goerrors.goservice.goNew Package (
pkg/pop/)primitives.gosession_cache.gogRPC Service (
internal/rpc/mcp_service.go)MCPServicegRPC interfaceDocumentation
docs/reference/api.mdwith MCP service referenceTesting
All tests pass:
RFC Alignment
Related