一个提供与Farcaster网络(farcaster.xyz)交互工具的MCP服务器,允许AI模型获取、搜索和分析内容。借助此服务器,能便捷地与Farcaster网络进行数据交互,为AI应用提供有力支持。
此服务器提供了多种使用方式,下面为你详细介绍不同场景下的使用方法。
# 克隆仓库
git clone https://github.com/manimohans/farcaster-mcp.git
cd farcaster-mcp
# 安装依赖项
npm install
# 构建项目
npm run build
npm start
npx @modelcontextprotocol/inspector node ./build/index.js
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"farcaster": {
"command": "node",
"args": ["/absolute/path/to/farcaster-mcp/build/index.js"]
}
}
}
此项目包含用于轻松部署的Smithery配置文件:
# 安装Smithery CLI
npm install -g @smithery/cli
# 部署到Smithery(指定客户端,例如claude)
npx @smithery/cli install @manimohans/farcaster-mcp --client claude
可用的客户端选项:claude, cline, windsurf, roo-cline, witsy, enconvo。
通过FID(Farcaster ID)检索特定Farcaster用户的帖子。 参数:
fid
:Farcaster用户ID(数字)limit
(可选):要返回的最大帖子数(默认:10)
示例查询:"Show me the latest casts from FID 6846." → "显示FID 6846用户的最新帖子。"通过用户名检索特定Farcaster用户的帖子。 参数:
username
:Farcaster用户名(字符串)limit
(可选):要返回的最大帖子数(默认:10)
示例查询:"Show me the latest casts from username 'mani'." → "显示用户名'mani'的最新帖子。"通过频道名称或URL检索特定Farcaster频道的帖子。 参数:
channel
:频道名称或URL(字符串)limit
(可选):要返回的最大帖子数(默认:10)
示例查询:"Show me the latest casts from the 'aichannel' channel." → "显示'aichannel'频道的最新帖子。"此仓库包含用于Smithery的所有必要配置文件:
smithery.yaml
:用于Smithery部署的YAML配置。smithery.json
:用于Smithery功能的JSON配置。Dockerfile
:用于Smithery部署的容器配置。此实现使用Farcaster Hubble API来获取数据。
# 在开发模式下运行
npm run dev