Skip to content

feat: Add MCP service for server identity operations#30

Merged
beonde merged 2 commits intomainfrom
feature/mcp-service
Jan 18, 2026
Merged

feat: Add MCP service for server identity operations#30
beonde merged 2 commits intomainfrom
feature/mcp-service

Conversation

@beonde
Copy link
Member

@beonde beonde commented Jan 17, 2026

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)

  • MCPService with GenerateServerKeypair RPC
  • Request/response messages for keypair generation

New Package (pkg/mcp/)

File Purpose
server_identity.go Ed25519 keypair generation
guard.go MCP tool authorization guard
evidence_store.go Authorization decision audit trail
health.go Health check utilities
types.go Core MCP types
errors.go Error definitions
service.go Service orchestration

New Package (pkg/pop/)

File Purpose
primitives.go Proof of Possession cryptographic primitives
session_cache.go Challenge session caching

gRPC Service (internal/rpc/mcp_service.go)

  • Implements MCPService gRPC interface
  • Wires keypair generation to pkg/mcp

Documentation

  • Updated docs/reference/api.md with MCP service reference

Testing

All tests pass:

ok      github.com/capiscio/capiscio-core/v2/pkg/mcp    0.938s
ok      github.com/capiscio/capiscio-core/v2/pkg/pop    (cached)
ok      github.com/capiscio/capiscio-core/v2/internal/rpc       0.694s
... (all other packages pass)

RFC Alignment

  • RFC-006: MCP Tool Authority
  • RFC-007: MCP Server Identity

Related

- 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
Copy link
Contributor

Copilot AI left a 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 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.go wiring 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)

- Fix unchecked fmt.Sscanf return in guard.go
- Fix empty branch staticcheck warnings in evidence_store.go
@beonde beonde merged commit 6b61013 into main Jan 18, 2026
3 checks passed
@beonde beonde deleted the feature/mcp-service branch January 18, 2026 00:50
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