Shape MCP Server

Shape MCP Server

Provides AI assistants access to Shape's onchain data including gasback distribution, collections analytics, stack users, and network monitoring.

Category
访问服务器

README

Shape MCP Server

Model Context Protocol (MCP) server for Shape, built with xmcp. This server provides AI assistants access to Shape's onchain data: gasback distribution, collections analytics, stack users & more.

Contributions are welcome! Fork and add your own tools, feel free to submit a PR.

Check our docs about how to build AI on Shape: https://docs.shape.network/building-on-shape/ai

Features

Organized by functionality for easy extension:

  • Gasback Analytics - Track creator earnings, top performers, and simulate gasback earned
  • NFT Analysis - Collections and ownership
  • Stack Achievements - Monitor user progress in Shape's Stack ecosystem
  • Network Monitoring - Chain health, metrics, RPC URLs, etc
  • AI Ready - Tools are optimized for agent chaining and automation
  • Caching - Optional Redis for snappier responses & less load on RPCs, no lock-in required

Available Tools

Network Tools (/tools/network/)

getChainStatus

Monitor Shape's network: RPC health, gas prices, block times, etc.

Example prompt: "current shape status? gas prices looking mint-friendly?"

NFT Tools (/tools/nft/)

getCollectionAnalytics

Collection stats: supply, owners, sample NFTs, floors, etc.

Example prompt: "what's the vibe on collection 0x567...abc? floor price and top holders?"

getShapeNft

List NFTs for an address, with metadata.

Example prompt: "what NFTs does 0xabcd...123 hold on shape?"

Gasback Tools (/tools/gasback/)

getShapeCreatorAnalytics

Shape builder/creator deep dive: earnings, tokens, withdrawals, etc.

Example prompt: "analyze creator 0xabcd...123's gasback and compare to top earners. any tips?"

getTopShapeCreators

Top creators by gasback earned & tx.

Example prompt: "who are shape's top 10 gasback earners?"

simulateGasbackRewards

Get gasback rough estimates.

Example prompt: "simulate 50 txs/day at 50k gas—earnings over 3 months? wen lambo?"

🏗️ Stack Tools (/tools/stack/)

getStackAchievements

User medals by tier, total count, etc.

Example prompt: "what's 0xghi...123's stack status? gold medals?"

Quick Test (No Setup Required)

Want to try the MCP server without local setup? Point directly to our deployed instance:

{
  "mcpServers": {
    "shape-mcp": {
      "url": "https://shape-mcp-server.vercel.app/mcp"
    }
  }
}

Note: This deployed version is rate limited and is intended for testing/sandbox use only. For production AI applications, we recommend self-hosting your own instance following the setup instructions above.

Prerequisites

  • Alchemy API key for NFT queries (get one here)
  • MCP client like Cursor IDE, Claude Desktop or your AI client of choice
  • Optional: Redis for caching (speeds up RPC-heavy tools)

Setup

1. Environment Configuration

Copy .env.example to .env and fill in:

ALCHEMY_API_KEY=your_key_here
CHAIN_ID=360  # Mainnet; use 11011 for Sepolia
# Optional caching
REDIS_URL=redis://localhost:6379  # Local, or Upstash for prod

2. Install Dependencies

yarn install

3. Run Locally

yarn dev

Server is now running at http://localhost:3002/mcp

🔌 Client Integration

MCP Settings

Add to your MCP settings in Cursor for eg:

{
  "mcpServers": {
    "shape-mcp": {
      "url": "http://localhost:3002/mcp"
    }
  }
}

Project Structure

src/
├── tools/                  # Modular tools
│   ├── gasback/
│   ├── network/
│   ├── nft/
│   └── stack/
├── abi/                    # Contract interfaces
├── utils/                  # Helpers like cache.ts
├── addresses.ts            # Key contracts addys
├── clients.ts              # RPC/Alchemy/Redis
├── config.ts               # Env-based setup
├── middleware.ts           # Auth/logging if needed
├── types.ts                # Shared outputs
└── xmcp.config.ts          # xmcp server config

Categories keep things modular. Add a tool to /tools/gasback/ and xmcp auto-picks it up. No monolith mess.

Adding New Tools

  1. Pick a category folder (e.g., /tools/gasback/)
  2. New .ts file with schema, metadata, function
  3. Example:
import { z } from 'zod';
import { type InferSchema } from 'xmcp';

export const schema = {
  address: z.string().describe('Wallet to analyze'),
};

export const metadata = {
  name: 'myTool',
  description: 'Custom tool for fun insights',
  annotations: {
    title: 'My Tool',
    readOnlyHint: true,
    destructiveHint: false,
    idempotentHint: true,
    requiresWallet: false,
    category: 'gasback',
    chainableWith: ['getShapeCreatorAnalytics'],
  },
};

export default async function myTool({ address }: InferSchema<typeof schema>) {
  // Logic here
  return {
    content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
  };
}

Caching (Optional)

Redis cuts RPC load for repeat calls. Set REDIS_URL to your instance (Vercel KV or Upstash). Skip it? Tools run direct, no sweat. See cache.ts for the simple get/set logic.

Deploy Your Own

Fork this repo and deploy your personal MCP:

  1. Fork on GitHub
  2. Import to Vercel: New Project
  3. Set env vars: SHAPE_RPC_URL (your node), ALCHEMY_API_KEY, CHAIN_ID (360 for mainnet, or 11011 for testnet), optional REDIS_URL
  4. Deploy—access at your-vercel-url/mcp!

RPC Setup

Use your own Alchemy API key to avoid public RPC limits. Default falls back to Shape’s public node https://mainnet.shape.network and https://sepolia.shape.network.

Resources

Support

Contact @williamhzo or hop into Shape Discord.


MIT LICENSE - See LICENSE

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选