@agentcred-ai/mcp-server
v0.1.3
Published
MCP server for AgentCred integration with AI agents
Maintainers
Readme
@agentcred-ai/mcp-server
Cryptographic identity for AI agents. Sign your agent's outputs with Ed25519 signatures tied to your GitHub identity. Prove which human is behind the agent.
Why AgentCred MCP?
Your AI agent can now:
- ✅ Sign outputs with cryptographic proof of human operator
- ✅ Verify signatures from other agents
- ✅ Establish trust in multi-agent workflows
- ✅ Prove accountability for agent actions
Use case: You're using Claude to draft a contract. Sign the output with AgentCred, and your team can cryptographically verify it came from your agent, not a random bot.
Quick Install
One-Click Install (Recommended)
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"agentcred": {
"command": "npx",
"args": ["-y", "@agentcred-ai/mcp-server"]
}
}
}Restart Claude Desktop. Done! 🎉
Config location: ~/.cursor/mcp.json
{
"mcpServers": {
"agentcred": {
"command": "npx",
"args": ["-y", "@agentcred-ai/mcp-server"]
}
}
}Or use the one-click install:
cursor://settings/mcp?server=agentcred&command=npx&args=-y,@agentcred-ai/mcp-serverRestart Cursor. Done! 🎉
Config location: .vscode/mcp.json (workspace) or ~/.vscode/mcp.json (global)
{
"mcpServers": {
"agentcred": {
"command": "npx",
"args": ["-y", "@agentcred-ai/mcp-server"]
}
}
}Restart VS Code. Done! 🎉
Config location: ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"agentcred": {
"command": "npx",
"args": ["-y", "@agentcred-ai/mcp-server"]
}
}
}Restart Windsurf. Done! 🎉
# Add to your shell config (~/.bashrc, ~/.zshrc, etc.)
export MCP_SERVERS='{"agentcred":{"command":"npx","args":["-y","@agentcred-ai/mcp-server"]}}'
# Or use inline:
MCP_SERVERS='{"agentcred":{"command":"npx","args":["-y","@agentcred-ai/mcp-server"]}}' claude-codeDone! 🎉
Config location: ~/.config/zed/settings.json
{
"context_servers": {
"agentcred": {
"command": "npx",
"args": ["-y", "@agentcred-ai/mcp-server"]
}
}
}Restart Zed. Done! 🎉
Authentication
AgentCred uses GitHub OAuth Device Flow by default (opens browser on first use). No manual token setup required!
Option 1: OAuth Device Flow (Recommended)
- Ask your AI agent:
"Initialize AgentCred" - Agent calls
agentcred_init→ browser opens - Authorize on GitHub → Done!
Option 2: Personal Access Token (Optional)
If you prefer manual token setup:
{
"mcpServers": {
"agentcred": {
"command": "npx",
"args": ["-y", "@agentcred-ai/mcp-server"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
}
}Usage Examples
Example 1: Sign a Message
You: "Sign this message with AgentCred: 'Contract approved by legal team'"
Claude:
{
"agentcred": {
"v": "1.0",
"jws": "eyJhbGciOiJFZERTQSIsInR5cCI6ImFnZW50Y3JlZCtqd3QifQ...",
"github": "yourname",
"agent": "claude"
},
"content": "Contract approved by legal team"
}✅ Signed! Anyone can verify this came from your agent.
Example 2: Verify a Signature
You: "Verify this AgentCred envelope: [paste envelope]"
Claude:
{
"verified": true,
"github": {
"username": "yourname",
"id": 12345
},
"agent": "claude",
"timestamp": "2026-02-03T10:30:00Z"
}✅ Verified! Signature is valid.
Example 3: Check Current Identity
You: "What's my AgentCred identity?"
Claude:
{
"github": {
"username": "yourname",
"id": 12345
},
"fingerprint": "SHA256:abc123...",
"registeredAt": "2026-02-03T10:00:00Z"
}Available Tools
| Tool | Description | Parameters |
|------|-------------|------------|
| agentcred_init | Initialize identity (links GitHub to Ed25519 keypair) | github_token (optional) |
| agentcred_sign | Sign content and return verifiable envelope | content (required), agent (optional) |
| agentcred_verify | Verify an AgentCred envelope | envelope (required, JSON string) |
| agentcred_whoami | Check current identity | None |
Tool Details
Purpose: Create or load your AgentCred identity.
Parameters:
github_token(optional): GitHub PAT. If not provided, uses OAuth Device Flow.
Example prompt: "Initialize AgentCred for me"
Returns:
Identity initialized for yourname
Fingerprint: SHA256:abc123...
Registered at: 2026-02-03T10:00:00ZPurpose: Sign any content with your identity.
Parameters:
content(required): The text to signagent(optional): Agent identifier (defaults to "default")
Example prompt: "Sign this message: 'Hello world'"
Returns: AgentCred envelope (JSON)
Purpose: Verify a signed envelope.
Parameters:
envelope(required): JSON string of AgentCredEnvelope
Example prompt: "Verify this envelope: {...}"
Returns: Verification result with username, timestamp, and validity
Purpose: Show your current identity.
Parameters: None
Example prompt: "What's my AgentCred identity?"
Returns: Identity information (username, fingerprint, registration time)
Available Resources
AgentCred MCP provides 2 resources that your AI agent can read:
| Resource URI | Description | MIME Type |
|--------------|-------------|-----------|
| agentcred://identity | Current identity information | application/json |
| agentcred://spec | Link to protocol specification | text/plain |
Example: Your agent can read agentcred://identity to check if you're authenticated before attempting to sign.
Troubleshooting
Cause: You haven't initialized AgentCred yet.
Solution: Ask your agent: "Initialize AgentCred" or "Run agentcred_init"
Cause: Browser didn't open or you missed the authorization step.
Solution: Use Personal Access Token instead:
- Create a GitHub PAT at https://github.com/settings/tokens
- Add to config:
"env": { "GITHUB_TOKEN": "ghp_your_token" } - Restart your MCP client
Checklist:
- ✅ Config file in correct location?
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
- ✅ Valid JSON? (Use a JSON validator)
- ✅ Restarted Claude Desktop?
- ✅ Check logs:
~/Library/Logs/Claude/mcp*.log(macOS)
Common causes:
- Envelope was modified after signing
- Signature expired (>24 hours old)
- Public key not registered
Solution: Re-sign the content or check envelope integrity.
How It Works
sequenceDiagram
participant User
participant Agent
participant AgentCred
participant GitHub
User->>Agent: "Sign this message"
Agent->>AgentCred: agentcred_sign(content)
AgentCred->>GitHub: Verify identity
GitHub-->>AgentCred: ✓ Valid
AgentCred->>AgentCred: Sign with Ed25519
AgentCred-->>Agent: Signed envelope
Agent-->>User: Here's your signed messageProtocol: Ed25519 signatures (EdDSA) + JWS (RFC 7515) + SHA-256 content hashing
Advanced Configuration
Custom Storage Location
By default, keys are stored in memory (lost on restart). For persistent storage, use the CLI or SDK directly.
Multiple Identities
Each MCP server instance manages one identity. To use multiple identities, configure multiple server instances:
{
"mcpServers": {
"agentcred-work": {
"command": "npx",
"args": ["-y", "@agentcred-ai/mcp-server"],
"env": {
"GITHUB_TOKEN": "ghp_work_token"
}
},
"agentcred-personal": {
"command": "npx",
"args": ["-y", "@agentcred-ai/mcp-server"],
"env": {
"GITHUB_TOKEN": "ghp_personal_token"
}
}
}
}Related Packages
| Package | Description |
|---------|-------------|
| agentcred | Core SDK for Node.js/TypeScript |
| @agentcred-ai/cli | Command-line tool |
| @agentcred-ai/vercel | Vercel AI SDK middleware |
| @agentcred-ai/mastra | Mastra framework integration |
Documentation
- Main README: ../../README.md
- Protocol Spec: ../../SPEC.md
- Beginner Guide: ../../guide.md
- Examples: ../../examples/
Contributing
Found a bug? Have a feature request? Open an issue or submit a PR!
See CONTRIBUTING.md for development setup.
Registry Submission
Want to add AgentCred to the official MCP registry?
- Official Registry: Submit to https://github.com/modelcontextprotocol/servers
- Smithery: Add to https://smithery.ai/submit
- GitHub Topics: Add
mcp-server,agentcred,identitytopics to this repo
License
MIT © AgentCred Contributors
Support
- Discord: Join our community (coming soon)
- GitHub Issues: Report bugs
- Docs: agentcred.dev
