Uses Alchemy RPC endpoints to interact with blockchain networks for enhanced performance and reliability when executing Hats Protocol operations
Provides comprehensive tools for managing Hats Protocol operations on Ethereum, including role management, permission checking, organizational structures, and analytics
Utilizes GraphQL subgraph endpoints to query indexed Hats Protocol data, enabling efficient searching, filtering, and analytics of organizational structures and role assignments
Facilitates Hats Protocol operations on Optimism, allowing users to manage hierarchical organizational structures and role-based permissions
Enables Hats Protocol role management and organizational operations on the Polygon network, supporting hat creation, minting, burning, and permission verification
Hats Protocol MCP Server
A comprehensive Model Context Protocol (MCP) server for managing Hats Protocol operations including role management, permission checking, organizational structures, and analytics across multiple blockchain networks.
Features
- Hat Management: Create, mint, burn, and transfer hats
- Tree Operations: Manage hierarchical organizational structures
- Permission Checking: Verify wearers, standing, and eligibility
- Metadata Operations: Update hat details and properties
- Query Tools: Search and filter hats using GraphQL subgraph
- Analytics: Generate reports and track activity
- Multi-Chain Support: Works across all Hats Protocol networks
- External Signing: Prepare transactions for hardware wallet signing
Supported Networks
Mainnet
- Ethereum
- Polygon
- Arbitrum One
- Optimism
- Base
- Gnosis Chain
Testnet
- Sepolia
- Base Sepolia
Installation
Configuration
Environment Variables
Copy .env.template
to .env
and configure:
API Key Management
You can also set API keys using the MCP tools:
Usage
Integrating with Claude Code
The easiest way to use this MCP server is to integrate it with Claude Code. After installing the server, add it to your Claude configuration:
Quick Setup
Alternative Setup Methods
Option 1: Local Development (no build required)
Option 2: Global NPM installation (if published)
Option 3: Team/Project Configuration
Managing the Integration
Environment Variables in Claude Code
You can set API keys when adding the server:
Manual Server Usage
If you prefer to run the server manually (for development or standalone use):
Using with Claude Code
Once integrated, you can use the Hats Protocol tools directly in your conversations with Claude:
Example: Check if someone has a role
Example: Create a new organization
Example: Analyze organizational structure
Example: Get role assignment guidance
Claude will automatically use the appropriate Hats Protocol tools and provide intelligent guidance through the built-in prompts and resources.
Available Tools
Hat Management
create-hat
- Create a new hat in the hierarchymint-hat
- Assign a hat to a wearerburn-hat
- Remove a hat from a wearertransfer-hat
- Transfer a hat between wearers
Permission Checking
check-hat-wearer
- Verify if an address wears a specific hatcheck-hat-standing
- Check if a wearer is in good standing
Query Tools
get-hat-details
- Get detailed information about a hatquery-hats-by-wearer
- Get all hats worn by an addressget-tree-structure
- Get hierarchical tree structure
Network Tools
list-networks
- List all supported networksset-api-key
- Configure API keys
Example Commands
Create a Hat
Check Hat Wearer
Development
Project Structure
Running Tests
Code Quality
Architecture
Core Components
- MCP Server: Handles tool registration and request routing
- Hats Client: Wrapper around Hats Protocol SDK
- Subgraph Client: GraphQL client for querying indexed data
- Network Manager: Multi-chain configuration and RPC management
- Tool Implementations: Individual tools for specific operations
Data Flow
- MCP client sends tool request → MCP server
- Server validates input with Zod schemas
- Tool implementation calls appropriate client method
- Client interacts with blockchain or subgraph
- Response formatted and returned to MCP client
Resources
Contributing
- Create a feature branch
- Write tests for new functionality
- Ensure all tests pass
- Submit pull request with detailed description
License
MIT
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables management of decentralized organizational roles and permissions through Hats Protocol across multiple blockchain networks. Supports creating hierarchical role structures, checking permissions, minting/transferring roles, and analyzing organizational structures through natural language.
Related MCP Servers
- AsecurityAlicenseAqualityEnables AI assistants to interact with the Hive blockchain through the Model Context Protocol, allowing for account info retrieval, content reading/creation, cryptocurrency transfers, and cryptographic operations.Last updated -17132ISC License
SettleMintofficial
-securityFlicense-qualityLeverage SettleMint's Model Context Protocol server to seamlessly interact with enterprise blockchain infrastructure. Build, deploy, and manage smart contracts through AI-powered assistants, streamlining your blockchain development workflow for maximum efficiency.Last updated -1,48615- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI agents to interact with 30+ Ethereum-compatible blockchain networks, providing services like token transfers, contract interactions, and ENS resolution through a unified interface.Last updated -282,615315MIT License
- -securityFlicense-qualityA backend service that executes transactions across multiple blockchains, enabling users to manage wallets, transfer tokens, and interact with smart contracts using the Model Context Protocol framework.Last updated -1