Stampchain MCP Server

Stampchain MCP Server

A Model Context Protocol server that enables interaction with Bitcoin Stamps data via the Stampchain API, providing tools for querying stamp information, collections, and blockchain data without requiring authentication.

Category
访问服务器

README

Stampchain MCP Server

A Model Context Protocol (MCP) server for interacting with Bitcoin Stamps data via the Stampchain API. This server provides tools for querying stamp information, collections, and blockchain data without requiring API authentication.

📋 Table of Contents


🎯 What This MCP Server Provides

  • 🖼️ Stamp Query Tools: Search and retrieve information about Bitcoin Stamps
  • 📦 Collection Explorer: Browse and analyze stamp collections
  • 🪙 Token Information: Access SRC-20 token deployment and minting data
  • 🤖 AI-Powered Integration: Generate code and get development assistance
  • 📡 Real-time Data: Access live Stampchain API data through your IDE

🚀 Quick Start

Prerequisites

  • Node.js 18.0 or higher
  • npm or yarn package manager
  • Claude Desktop, Cursor, Windsurf, or Claude Code IDE

Installation

One-Line Install (Recommended)

# Clone and setup in one command
git clone https://github.com/stampchain-io/stampchain-mcp && cd stampchain-mcp && npm run setup

This will:

  1. Install all dependencies
  2. Build the project
  3. Automatically configure Claude Desktop (if installed)

Manual Installation

# Clone the repository
git clone https://github.com/stampchain-io/stampchain-mcp
cd stampchain-mcp

# Install dependencies
npm install

# Build the project
npm run build

# Configure your IDE (see IDE Configuration section below)

For Development

# Run in development mode with hot reload
npm run dev

⚙️ IDE Configuration

The Stampchain MCP server can be configured with various AI-powered IDEs that support the Model Context Protocol. Below are configuration instructions for popular IDEs.

Claude Desktop

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json

{
  "mcpServers": {
    "stampchain": {
      "command": "node",
      "args": ["/absolute/path/to/stampchain-mcp/dist/index.js"],
      "env": {
        "STAMPCHAIN_API_URL": "https://stampchain.io/api/v2",
        "API_TIMEOUT": "30000",
        "DEBUG": "stampchain-mcp:*"
      }
    }
  }
}

Cursor IDE

Add to your Cursor settings (File > Preferences > Settings > Extensions > MCP):

  1. Open Cursor settings (JSON) by pressing Cmd/Ctrl + Shift + P and selecting "Preferences: Open Settings (JSON)"
  2. Add the MCP configuration:
{
  "mcp.servers": {
    "stampchain": {
      "command": "node",
      "args": ["/absolute/path/to/stampchain-mcp/dist/index.js"],
      "env": {
        "STAMPCHAIN_API_URL": "https://stampchain.io/api/v2"
      }
    }
  }
}

Alternatively, create an .mcp/config.json file in your workspace root:

{
  "servers": {
    "stampchain": {
      "command": "node",
      "args": ["./dist/index.js"],
      "env": {
        "STAMPCHAIN_API_URL": "https://stampchain.io/api/v2"
      }
    }
  }
}

Windsurf IDE

Configure MCP in Windsurf by adding to your workspace settings:

  1. Create or edit .windsurf/mcp.json in your workspace:
{
  "mcpServers": {
    "stampchain": {
      "command": "node",
      "args": ["${workspaceFolder}/dist/index.js"],
      "env": {
        "STAMPCHAIN_API_URL": "https://stampchain.io/api/v2",
        "NODE_ENV": "production"
      },
      "capabilities": {
        "tools": true,
        "resources": false,
        "prompts": false
      }
    }
  }
}
  1. Or configure globally in Windsurf settings (Settings > AI Assistant > MCP Servers).

Claude Code (VS Code Extension)

For the Claude Code extension in VS Code:

  1. Open VS Code settings (Cmd/Ctrl + ,)
  2. Search for "Claude Code MCP"
  3. Add server configuration:
{
  "claudeCode.mcpServers": [
    {
      "name": "stampchain",
      "command": "node",
      "args": ["${workspaceFolder}/dist/index.js"],
      "env": {
        "STAMPCHAIN_API_URL": "https://stampchain.io/api/v2"
      }
    }
  ]
}

Or add to your workspace .vscode/settings.json:

{
  "claudeCode.mcpServers": [
    {
      "name": "stampchain",
      "command": "node",
      "args": ["./dist/index.js"],
      "env": {
        "STAMPCHAIN_API_URL": "https://stampchain.io/api/v2"
      }
    }
  ]
}

Universal MCP Configuration

For IDEs that support standard MCP configuration, create an mcp.json file in your project root:

{
  "version": "1.0",
  "servers": {
    "stampchain": {
      "command": "node",
      "args": ["./dist/index.js"],
      "env": {
        "STAMPCHAIN_API_URL": "https://stampchain.io/api/v2",
        "API_TIMEOUT": "30000"
      },
      "capabilities": {
        "tools": {
          "enabled": true,
          "tools": [
            "get_stamp",
            "search_stamps",
            "get_stamp_collection",
            "get_src20_token",
            "list_stamp_collections"
          ]
        }
      }
    }
  }
}

Configuration Tips

  1. Path Resolution:

    • Use absolute paths for global installations
    • Use ${workspaceFolder} or relative paths for workspace-specific setups
    • On Windows, use forward slashes or escape backslashes
  2. Environment Variables:

    • STAMPCHAIN_API_URL: API endpoint (default: https://stampchain.io/api/v2)
    • API_TIMEOUT: Request timeout in milliseconds (default: 30000)
    • DEBUG: Enable debug logging with stampchain-mcp:*
  3. Development vs Production:

    • For development, point to dist/index.js after building
    • For production, consider using the npm-installed version
  4. Verification:

    • After configuration, restart your IDE
    • Check the MCP server status in your IDE's output/console
    • Test with a simple query like "get stamp 0"

👨‍💻 Developer Use Cases

The Stampchain MCP server enables developers to quickly integrate Bitcoin Stamps data into their applications through AI assistance. Here are common developer scenarios:

🔍 Data Integration Tasks

Ask Claude to help you:

Fetch All Stamps for Your App:

  • "Help me integrate the Stampchain API to fetch all stamps and display them in a React component"
  • "Create a Python script to retrieve stamps and save them to a PostgreSQL database"
  • "Build a Vue.js gallery component that shows the latest 50 stamps with pagination"

SRC-20 Token Integration:

  • "Generate code to display SRC-20 tokens on my website based on my Next.js codebase"
  • "Create an API endpoint that fetches token balances for a given Bitcoin address"
  • "Build a token dashboard component showing supply, holders, and recent transfers"

Collection Analytics:

  • "Help me build a collections analytics page showing volume and floor prices"
  • "Create a collection ranking system based on holder count and activity"
  • "Generate a chart component displaying collection trends over time"

🛠 Code Generation Examples

The MCP server can help generate production-ready code for:

Frontend Components:

"Create a stamp gallery component for my React app that shows:
- Stamp image thumbnails
- Creator information
- Rarity indicators
- Click to view full details
Use TypeScript and Tailwind CSS to match my existing codebase"

Backend Services:

"Build a Node.js Express API that:
- Caches stamp data in Redis
- Provides search endpoints
- Handles rate limiting
- Returns paginated results
Include proper error handling and TypeScript types"

Database Integration:

"Create database schemas and migration scripts for:
- Storing stamp metadata
- Tracking collection statistics
- Indexing for fast searches
Use my existing PostgreSQL setup"

📊 Analytics & Monitoring

Real-time Data Processing:

  • "Help me set up WebSocket connections to monitor new stamp creations"
  • "Create a data pipeline that processes stamp transactions and updates analytics"
  • "Build alerting for specific stamp activities or price movements"

Custom Dashboards:

  • "Generate a trading dashboard showing stamp market activity"
  • "Create admin panels for managing stamp collections"
  • "Build user portfolio pages showing owned stamps and values"

🎯 Integration Patterns

E-commerce Integration:

"I'm building an NFT marketplace. Help me:
1. Integrate stamp listings with buy/sell functionality
2. Handle Bitcoin payments and transfers
3. Create user profiles with stamp collections
4. Add stamp search and filtering capabilities"

Portfolio Tracking:

"For my crypto portfolio app, help me:
1. Track user's stamp holdings
2. Calculate portfolio values
3. Show performance metrics
4. Generate tax reports for stamp transactions"

Social Features:

"Add social features to my app:
1. User profiles showing stamp collections
2. Following/followers for collectors
3. Activity feeds for stamp trading
4. Comments and ratings on stamps"

🚀 Quick Start Queries

Once you have the MCP server configured, try these developer-focused prompts:

Getting Started:

  • "Show me how to fetch the 10 most recent stamps and explain the data structure"
  • "What's the best way to integrate stamp data into a JavaScript application?"
  • "Help me understand the SRC-20 token API endpoints and response formats"

Code Review & Optimization:

  • "Review my stamp fetching code and suggest performance improvements"
  • "Help me add error handling to my Stampchain API integration"
  • "Optimize my database queries for stamp search functionality"

Architecture Planning:

  • "Design a scalable architecture for a stamp trading platform"
  • "What's the best caching strategy for stamp metadata?"
  • "Help me plan a microservices architecture for stamp analytics"

📚 API Reference & Testing

Postman Collection: Explore the complete Stampchain API with our comprehensive Postman collection:

  • Collection Link: Stampchain OpenAPI 3.0
  • Test all endpoints interactively
  • View request/response examples
  • Copy code snippets for your preferred language
  • Understand API parameters and data structures

Using with the MCP Server:

"I want to build a stamp search feature. Show me:
1. How to use the Postman collection to test the search API
2. Generate TypeScript interfaces based on the API responses
3. Create a React component that implements the search functionality
4. Add proper error handling and loading states"

💡 Pro Tips for Developers

  1. Start with Postman: Test API endpoints in the Postman collection before coding
  2. Specify Your Tech Stack: Mention your framework, database, and tools for tailored code generation
  3. Include Context: Share relevant parts of your existing codebase for better integration
  4. Reference API Docs: Point Claude to specific Postman endpoints when asking for help
  5. Ask for Testing: Request unit tests and integration tests along with your code
  6. Request Documentation: Ask for API documentation and code comments
  7. Iterate and Refine: Build incrementally - start simple and add features

🔧 Development

Development Workflow

  1. Run in development mode:

    npm run dev
    
  2. Run tests:

    npm test
    
  3. Build for production:

    npm run build
    

Architecture Overview

The system follows a Model Context Protocol (MCP) server architecture with:

  • Protocol: MCP SDK for tool exposure
  • Language: TypeScript/Node.js
  • API Client: Axios for Stampchain API communication
  • Authentication: None required (public API)
  • Deployment: Local via Claude Desktop or standalone Node.js

For detailed architecture documentation, see architecture/README.md.

📚 Documentation

API Documentation

The project exposes MCP tools for Stampchain data access. For complete API documentation, see:

Stampchain API Base URLs

  • Main API: https://stampchain.io/api/v2
  • Public endpoints (no authentication required)

Testing

The project uses Jest for testing. For testing documentation, see:

Running Tests

# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

# Run tests with coverage
npm run test:coverage

Deployment

For deployment instructions, see:

Environment Configuration

The project requires minimal configuration:

# Stampchain API (no authentication required)
STAMPCHAIN_API_URL=https://stampchain.io/api/v2

# Optional: Request timeout (milliseconds)
API_TIMEOUT=30000

# Optional: Enable debug logging
DEBUG=stampchain-mcp:*

🤝 Contributing

  1. Documentation: Update documentation for any changes
  2. Testing: Ensure all tests pass before submitting changes
  3. Code Quality: Follow the established linting and formatting rules
  4. MCP Standards: Follow MCP SDK best practices for tool implementation

Development Guidelines

  • Follow TypeScript best practices
  • Use the established project structure
  • Write tests for new functionality
  • Update documentation for API changes
  • Use the delegation templates for complex tasks

📞 Support and Resources

  • Stampchain API: https://stampchain.io/api/v2
  • MCP SDK Documentation: https://modelcontextprotocol.io
  • Documentation: This docs directory contains all project documentation
  • Issue Tracking: GitHub Issues
  • Bitcoin Stamps Info: https://stampchain.io

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Project Version: 0.1.0
Last Updated: 2025-01-19
Documentation Version: 1.0

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选