Content
# 🪪 Claim Context Badge — MCP ERC-1155 Logic
This repo provides the full claim logic for minting verifiable ERC-1155 badges based on context metadata and MCP eligibility criteria. Users can claim NFTs tied to their onchain or offchain activity — such as interacting with an AI agent, saving context, or reaching a milestone.
## 🚀 Overview
This module powers the eligibility checks, context validation, and ERC-1155 badge minting flow. It integrates with:
- Model Context Protocol (MCP)
- ERC-1155 badge contract
- Wallet signature or backend-verifiable logic
## 🔧 Features
- 🧠 Eligibility checks: verifies model hash, context CID, user address
- 🖋️ Optional offchain proof verification (agent-signed, snapshot, DB)
- 🏷️ Mints ERC-1155 NFT with metadata linked to MCP data
- ⚙️ Supports single-claim per badge ID or reusable logic
- 🪙 Claim from front-end or script via wallet signature
## 🧩 Example Claim Flow
1. User interacts with agent (context is saved)
2. System generates contextCID and modelHash
3. Eligibility is evaluated (via backend or onchain logic)
4. If eligible, contract mints ERC-1155 badge to user wallet
5. Mint emits VerifiableBadgeMinted with MCP metadata
## 📦 Installation
```bash
npm install
npx hardhat compile
```
## 🛠️ Claim Script
```typescript
await contract.mintBadge(
userAddress,
badgeId,
contextCID,
modelHash
);
```
You can also implement signature-based minting:
```typescript
await contract.claimWithSignature(
signature,
badgeId,
contextCID,
modelHash
);
```
## 🔐 Smart Contract Interfaces
This repo can use or extend the mcp-nft1155-contract.
Function:
```solidity
function mintBadge(
address to,
uint256 badgeId,
string calldata contextCID,
bytes32 modelHash
) external;
```
## 🔍 Badge Metadata Format
Follows ERC-1155 standard with MCP-specific extensions:
```json
{
"name": "Memory Saver",
"description": "Earned by storing context onchain with GPT",
"image": "ipfs://badge-memory.png",
"attributes": [
{ "trait_type": "Context CID", "value": "bafy..." },
{ "trait_type": "Model Hash", "value": "0x..." },
{ "trait_type": "Level", "value": "Bronze" }
]
}
```
Connection Info
You Might Also Like
valuecell
Valuecell is a Python project for efficient data management.
hexstrike-ai
HexStrike AI is an AI-powered MCP cybersecurity automation platform with 150+ tools.
Vibe-Trading
Vibe-Trading: Your Personal Trading Agent
AP2
AP2 provides code samples and demos for the Agent Payments Protocol.
YC-Killer
YC-Killer is an AI agents library by Singularity Research, open-sourcing...
tradingview-mcp
AI-assisted TradingView chart analysis — connect Claude Code to your...