Skip to main content
Glama

超越 MCP 服务器

一个可扩展的模型上下文协议服务器,提供对社交平台数据和链上数据的标准化访问。目前支持 Farcaster(通过 Neynar API),并带有用于 Twitter 集成的占位符。更多类似 Telegram 的平台(包含链上数据)即将添加。

特征

  • 符合 MCP 规范:完全实现模型上下文协议规范

  • 多平台:旨在支持多个社交媒体平台

  • 可扩展:轻松添加新的平台提供商

  • 格式良好:针对 LLM 的使用优化了上下文格式

  • 灵活传输:支持 stdio 和 SSE/HTTP 传输

Related MCP server: MCP Salesforce Connector

支持的平台

  • Farcaster :通过 Neynar API 完全实现

  • Twitter :占位符(未实现)

入门

先决条件

安装

  1. 克隆存储库

git clone https://github.com/yourusername/beyond-mcp-server.git cd beyond-mcp-server
  1. 安装依赖项

npm install
  1. 从模板创建 .env 文件

cp .env.example .env # Edit .env with your API keys
  1. 配置环境变量

    • 必需:在 .env 文件中设置NEYNAR_API_KEY

    • 您可以从https://neynar.com/获取 Neynar API 密钥

    • 如果没有有效的 API 密钥,Farcaster 功能将无法运行

  2. 构建并启动服务器

npm run build npm start # For stdio mode (default) # OR npm run start:http # For HTTP/SSE mode

与 Claude for Desktop 一起使用

  1. 构建服务器

npm run build
  1. 确保你的 .env 文件已正确配置你的 API 密钥

    • 服务器将在以下位置查找 .env:

      • 当前工作目录

      • 项目根目录

      • 父目录(最多 3 级)

    • 您也可以直接在系统中设置环境变量

  2. 将服务器添加到您的 Claude Desktop 配置中:

  • macOS:〜/资源库/应用程序支持/Claude/claude_desktop_config.json

  • Windows:%APPDATA%\Claude\claude_desktop_config.json

{ "mcpServers": { "beyond-social": { "command": "/usr/local/bin/node", "args": [ "/full/path/to/beyond-mcp-server/dist/index.js", "--stdio" ] } } }
  1. 或者,您可以直接在 Claude Desktop 配置中传递 API 密钥和其他环境变量(推荐):

{ "mcpServers": { "beyond-social": { "command": "/usr/local/bin/node", "args": [ "/full/path/to/beyond-mcp-server/dist/index.js", "--stdio" ], "env": { "NEYNAR_API_KEY": "YOUR_API_KEY_HERE", "ENABLE_FARCASTER": "true", "ENABLE_TWITTER": "false" } } } }
  1. 重启 Claude 桌面版

MCP 功能

资源

  • social://{platform}/{query}/search - 在平台上搜索内容

  • social://{platform}/user/{userId}/profile - 获取用户资料

  • social://{platform}/wallet/{walletAddress}/profile - 通过钱包地址获取用户资料(仅限 Farcaster)

  • social://{platform}/user/{userId}/balance - 获取用户钱包余额(仅限 Farcaster)

    • 接受 FID(数字)或用户名

    • 如果提供了用户名,则在获取余额之前自动转换为 FID

  • social://{platform}/wallet/{walletAddress}/profile - 通过钱包地址获取用户资料

  • social://{platform}/user/{userId}/content - 获取用户内容

  • social://{platform}/thread/{threadId} - 获取对话线程

  • social://{platform}/trending - 获取热门话题

  • social://{platform}/trending-feed - 获取具有多提供商支持的热门 feed 内容(仅限 Farcaster)

    • 支持提供商:neynar(默认)、openrank、mbd

    • 参数:timeWindow(1h、6h、12h、24h、7d、30d)、limit

工具

  • search-content - 在社交平台上搜索内容

  • get-user-profile - 获取用户的个人资料信息

  • get-user-profile-by-wallet - 使用钱包地址获取用户资料(仅限 Farcaster)

  • get-user-balance - 获取用户钱包余额(仅限 Farcaster)

    • 接受 FID(数字)或用户名

    • 自动处理用户名到 FID 的转换

  • get-user-content - 从特定用户获取内容

  • get-thread - 获取对话线程

  • get-trending-topics - 获取当前热门话题

  • getTrendingFeed - 获取支持多供应商的热门资讯(仅限 Farcaster)

  • get-wallet-profile - 根据钱包地址获取个人资料

提示

  • analyze-thread - 分析社交媒体线程

  • summarize-user-activity - 总结用户的活动

  • explore-trending-topics - 探索平台上的热门话题

  • analyze-search-results - 分析查询的搜索结果

  • explore-trending-feed - 分析不同提供商的热门 feed 内容

  • get-wallet-profile - 通过钱包地址获取并分析用户资料

  • check-user-balance - 分析用户的钱包余额和持有量

    • 适用于 FID 和用户名输入

    • 处理用户名的自动 FID 解析

通过新的提供商进行扩展

要添加新的社交平台提供商:

  1. src/providers/中创建一个新目录

  2. 实现ContentProvider接口

  3. 在注册表中注册提供商

例子:

import { ContentProvider } from '../interfaces/provider'; export class MyPlatformProvider implements ContentProvider { public name = 'myplatform'; public platform = 'myplatform'; // Implement all required methods }

发展

以开发模式运行

npm run dev # stdio mode npm run dev:http # HTTP mode

测试

npm test

代码检查

npm run lint npm run lint:fix

执照

麻省理工学院

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

变更日志

该项目的所有显著变化都将记录在此文件中。

[1.0.0] - 2025 年 3 月 10 日

额外

  • 初始版本

  • 通过 Neynar API 集成 Farcaster

  • 符合 MCP 的服务器实现

  • 支持 stdio 和 HTTP 模式

[1.0.1] - 2025 年 3 月 19 日

额外

  • 添加了新的工具和资源来获取带有钱包地址的用户资料

  • 添加了新测试

[1.0.2] - 2025 年 3 月 21 日

额外

  • 增加了通过 ID 或用户名检索 Farcaster 用户钱包余额的功能

  • 实现对热门 feed 内容的多提供商支持

  • 增强了 updateUserProfile 功能,添加了更多用户详细信息

  • 增加了全面的测试以确保可靠性和性能

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Beyond-Network-AI/beyond-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server