Skip to content

Conversation

anivar
Copy link

@anivar anivar commented Aug 23, 2025

Adds optional identity support to mcpd using AGNTCY Identity spec.

What it does:

  • Generates Ed25519 keys for MCP servers
  • Creates W3C DIDs: did:agntcy:mcpd:{org}:{server}
  • Stores keys with 0600 permissions
  • Loads identity on startup

What it doesn't do yet:

  • Send identity headers in requests
  • Verify signatures
  • Enforce access control

Usage:

export MCPD_IDENTITY_ENABLED=true
mcpd identity init my-server --org "my-org"
mcpd daemon --dev

Implementation:

  • 4 files, ~300 lines
  • No impact when disabled

This PR adds the identity foundation. Authentication will come later.

Closes #156

@anivar anivar force-pushed the feat/agntcy-identity-support branch 2 times, most recently from 9939910 to 1338d64 Compare August 23, 2025 19:40
- Optional identity verification for MCP servers
- AGNTCY-compatible Verifiable Credentials
- Simple file-based storage for development
- Non-blocking verification on server startup
- Only 132 lines of code across 2 files

Enable with: export MCPD_IDENTITY_ENABLED=true
Initialize: mcpd identity init <server-name>
@anivar anivar force-pushed the feat/agntcy-identity-support branch from 1338d64 to 5dade48 Compare August 23, 2025 19:45
Anivar Aravind added 4 commits August 24, 2025 01:28
- Use proper ResolverMetadata format per spec
- Switch to did:agntcy: DID method
- Include assertionMethod and service endpoints
- Update docs with correct identity format

Spec reference: https://spec.identity.agntcy.org/docs/id/definitions
Use relative path instead - lets resolver determine base URL
- Match mcpd code style with comprehensive godoc comments
- Add helper methods for better maintainability
- Improve error handling with proper context
- Add verbose logging option to CLI
- Follow existing manager patterns from codebase
Remove over-engineered features:
- Remove identity show command
- Remove test file
- Simplify documentation
- Keep only essential init functionality
@anivar anivar changed the title feat: Add AGNTCY Identity support for secure MCP server verification feat: Add optional AGNTCY Identity support for MCP servers Aug 26, 2025
@peteski22 peteski22 self-requested a review August 27, 2025 15:05
@peteski22 peteski22 self-assigned this Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add optional AGNTCY Identity support for MCP servers
2 participants