Token导航 LogoToken导航TokenDH.com
Activitypub MCP logo
AI代理stdio官方级别未说明来源级核验

Activitypub MCP

MCP Server

activitypub-mcp

基于ActivityPub协议的模型交互服务器,支持LLMs探索和与现有联邦宇宙网络交互,提供标准化的MCP工具、资源和提示。

工具数

53

提示词数

0

GitHub Stars

15

资源数

0
模型交互TypeScriptClaudeClaude DesktopClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

cameronrye

提供方

cameronrye

最后核验

2026/5/17 20:20

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx activitypub-mcp install

详细介绍

ActivityPub MCP Server

Fediverse Client for LLMs

A comprehensive Model Context Protocol (MCP) server that enables LLMs like Claude to explore and interact with the existing Fediverse through standardized MCP tools, resources, and prompts.

______________________________________________________________________

What's New in v1.1.0

The biggest release yet! Now with full write capabilities, multi-account support, and enterprise-ready features.

Post & Interact Create posts, reply, boost, favourite, and bookmark directly from your LLM Multi-Account Manage multiple fediverse accounts with secure credential storage Media & Polls Upload images with alt text, vote on polls, schedule posts

Export Anywhere Export timelines, threads, and accounts to JSON, Markdown, or CSV HTTP Transport Production-ready HTTP/SSE mode for enterprise deployments 53 Tools 21 read-only + 28 authenticated + 4 export tools

See Authenticated Tools | See Export Tools | Full Changelog

______________________________________________________________________

特性

核心能力

  • Fediverse客户端:与现有的ActivityPub服务器(Mastodon、Pleroma、Misskey等)交互
  • WebFinger发现:在联邦快递公司寻找和发现演员
  • MCP协议:使用资源、工具和提示完成MCP服务器
  • LLM优化:专为LLM交互模式而设计
  • TypeScript:完全使用现代TypeScript和ESM
  • 高性能:高效的资源管理和缓存
  • 安全:内置安全功能和输入验证
  • 双重运输:支持stdio(克劳德桌面)和HTTP传输模式

Fediverse交互功能

  • 远程参与者发现:查找任何fediverse实例上的用户
  • 获取时间线:通过分页支持从任何用户的时间线获取帖子
  • 热门内容:访问热门标签和帖子
  • 实例发现:通过实时API查找和探索fediverse实例
  • 实例信息:获取任何服务器的详细信息
  • 搜索功能:跨实例搜索帐户、标签和帖子
  • 帖子主题:获取包含回复的完整对话线程
  • WebFinger支持:解析整个网络中的参与者标识符
  • 多平台支持:适用于Mastodon、Pleroma、Misskey等
  • 关注者/关注列表:获取社交联系
  • 批量操作:在单个请求中获取多个参与者或帖子

MCP功能

  • 资源 (共10个):访问远程ActivityPub数据(参与者、时间线、趋势、实例信息)
  • 工具 (共53个):在fediverse中发现、互动和创建内容

- 21个用于发现和探索的只读工具(包括统一搜索) - 28个经过身份验证的工具,用于发布、交互、投票、媒体和日程安排 - 4个导出工具,用于以JSON、Markdown或CSV格式导出数据

  • 提示 (共11个):fediverse探索、内容策略和社区分析的模板
  • 监控:内置日志记录、审计跟踪和性能指标
  • 健康检查:服务器运行状况监视和诊断

经过身份验证的功能(v1.1.0)

  • 多账户支持:使用安全的凭据存储管理多个fediverse帐户
  • 发布操作:创建、回复和删除帖子
  • 社交互动:增强、收藏、书签、关注、静音和阻止
  • 经过身份验证的时间表:访问主页时间线、通知、书签和收藏夹
  • 内容导出:以多种格式导出时间线、线程和帐户数据

安全与管理

  • 实例阻止列表:按域或通配符模式阻止特定实例
  • 审计日志:全面记录所有工具调用和资源访问
  • 内容警告:尊重并展示帖子中的内容警告
  • 速率限制:通过可配置的速率限制防止滥用

快速开始

先决条件

  • Node.js 18+ (推荐LTS)
  • npm纱线 包管理器
  • Git 用于克隆存储库

与跨平台支持

该项目致力于 视窗, macOS,以及 Linux 具有自动平台检测和适当的脚本选择功能。

一键安装

为了获得最快的安装速度,请使用我们的自动安装脚本:

通用(所有平台)

# Install directly with npx (recommended)
npx activitypub-mcp install

# Or clone and run setup
git clone https://github.com/cameronrye/activitypub-mcp.git
cd activitypub-mcp
npm run setup

平台特定安装

Windows(PowerShell):

# Clone and setup
git clone https://github.com/cameronrye/activitypub-mcp.git
cd activitypub-mcp
npm run setup:windows

# Or run PowerShell script directly
.\scripts\setup.ps1

macOS/Linux(Bash):

# Clone and setup
git clone https://github.com/cameronrye/activitypub-mcp.git
cd activitypub-mcp
npm run setup:unix

# Or run bash script directly
bash scripts/setup.sh

手动安装

  1. 克隆并安装依赖项:
git clone https://github.com/cameronrye/activitypub-mcp.git
cd activitypub-mcp
npm install
  1. 配置环境:

窗户:

# Copy environment template
copy .env.example .env

# Edit configuration (optional)
notepad .env

macOS/Linux:

# Copy environment template
cp .env.example .env

# Edit configuration (optional)
nano .env
  1. 启动MCP服务器:
# Start the MCP server (no local ActivityPub server needed)
npm run mcp

测试设置

测试MCP服务器 与MCP检查员:

# Install MCP Inspector
npm install -g @modelcontextprotocol/inspector

# Connect to the MCP server
mcp-inspector

Claude桌面集成

要将此MCP服务器与Claude Desktop一起使用:

  1. 找到您的Claude Desktop配置文件:

- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json - 视窗: %APPDATA%\Claude\claude_desktop_config.json

  1. 添加服务器配置:
{
  "mcpServers": {
    "activitypub": {
      "command": "npx",
      "args": ["-y", "activitypub-mcp"]
    }
  }
}
  1. 重新启动克劳德桌面 加载新服务器。

文档

快速参考

有关详细的使用说明、示例和故障排除,请参阅:

api参考

MCP资源

资源提供对来自任何ActivityPub服务器的fediverse数据的只读访问。除非另有说明,否则所有资源都返回JSON数据。

服务器信息资源

获取ActivityPub MCP服务器的相关信息:

activitypub://server-info

参数:

  • 无需

示例响应:

{
  "name": "activitypub-mcp",
  "version": "1.1.0",
  "description": "A Model Context Protocol server for exploring and interacting with the existing Fediverse",
  "capabilities": {
    "resources": ["server-info", "remote-actor", "remote-timeline", "remote-followers", "remote-following", "instance-info", "trending", "local-timeline", "federated-timeline", "post-thread"],
    "tools": {
      "discovery": ["discover-actor", "discover-instances", "discover-instances-live", "recommend-instances"],
      "content": ["fetch-timeline", "get-post-thread", "search-instance", "search-accounts", "search-hashtags", "search-posts"],
      "timelines": ["get-trending-hashtags", "get-trending-posts", "get-local-timeline", "get-federated-timeline"],
      "utility": ["convert-url", "batch-fetch-actors", "batch-fetch-posts"],
      "system": ["health-check", "performance-metrics"]
    },
    "prompts": ["explore-fediverse", "discover-content", "compare-instances", "compare-accounts", "analyze-user-activity", "find-experts", "summarize-trending"]
  },
  "features": {
    "auditLogging": true,
    "instanceBlocklist": true,
    "contentWarnings": true,
    "batchOperations": true
  }
}

远程参与者资源

获取fediverse中任何演员的信息:

activitypub://remote-actor/{identifier}

参数:

  • identifier (string):演员的fediverse句柄(例如。,user@mastodon.social)

示例响应:

{
  "@context": ["https://www.w3.org/ns/activitystreams"],
  "id": "https://mastodon.social/users/alice",
  "type": "Person",
  "preferredUsername": "alice",
  "name": "Alice Smith",
  "summary": "Software developer passionate about decentralized social networks",
  "inbox": "https://mastodon.social/users/alice/inbox",
  "outbox": "https://mastodon.social/users/alice/outbox"
}

远程时间线资源

从联邦快递上访问任何演员的时间线/发件箱:

activitypub://remote-timeline/{identifier}

参数:

  • identifier (string):演员的fediverse句柄(例如。,user@mastodon.social)

示例响应:

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "OrderedCollection",
  "id": "https://mastodon.social/users/alice/outbox",
  "totalItems": 42,
  "orderedItems": [...]
}

实例信息资源

获取有关任何fediverse实例的信息:

activitypub://instance-info/{domain}

参数:

  • domain (string):实例域(例如mastodon.social)

示例响应:

{
  "domain": "mastodon.social",
  "software": "mastodon",
  "version": "4.2.1",
  "description": "The original server operated by the Mastodon gGmbH non-profit",
  "registrations": true,
  "stats": {
    "user_count": 900000,
    "status_count": 50000000
  }
}

远程关注者/关注资源

访问任何参与者的关注者和以下列表:

activitypub://remote-followers/{identifier}
activitypub://remote-following/{identifier}

趋势资源(新)

从实例中获取热门标签和帖子:

activitypub://trending/{domain}

本地时间线资源(新建)

从实例获取本地公共时间线:

activitypub://local-timeline/{domain}

联合时间线资源(新)

从实例获取联邦公共时间线:

activitypub://federated-timeline/{domain}

帖子资源(新)

获取一篇帖子及其完整的对话线索:

activitypub://post-thread/{postUrl}

MCP工具

工具使LLM能够发现fediverse并与之交互。所有工具都返回带有成功/错误信息的结构化响应。

发现演员

发现并获取有关fediverse中任何演员的信息:

{
  "name": "discover-actor",
  "arguments": {
    "identifier": "user@mastodon.social"
  }
}

参数:

  • identifier (string,必填):Fediverse句柄(例如。,user@mastodon.social)

获取时间线

使用分页支持从任何演员的时间线上获取帖子:

{
  "name": "fetch-timeline",
  "arguments": {
    "identifier": "user@mastodon.social",
    "limit": 20,
    "cursor": null,
    "maxId": null
  }
}

参数:

  • identifier (字符串,必填):Fediverse句柄
  • limit (number,可选):要获取的帖子数量(1-50,默认值:20)
  • cursor (字符串,可选):来自上一个响应的分页光标
  • minId (字符串,可选):返回比此ID更新的结果
  • maxId (字符串,可选):返回早于此ID的结果
  • sinceId (string,可选):返回自该ID以来的结果

获取实例信息

获取有关任何fediverse实例的详细信息:

{
  "name": "get-instance-info",
  "arguments": {
    "domain": "mastodon.social"
  }
}

参数:

  • domain (字符串,必填):实例域

搜索实例

在特定fediverse实例上搜索内容:

{
  "name": "search-instance",
  "arguments": {
    "domain": "mastodon.social",
    "query": "typescript",
    "type": "accounts"
  }
}

参数:

  • domain (字符串,必填):要搜索的实例域
  • query (字符串,必填):搜索查询
  • type (字符串,可选):内容类型(“帐户”、“状态”、“标签”)

发现实例

按类别或主题查找热门fediverse实例:

{
  "name": "discover-instances",
  "arguments": {
    "category": "mastodon",
    "topic": "technology",
    "size": "medium"
  }
}

参数:

  • category (字符串,可选):软件类型(“乳齿象”、“pleroma”、“misskey”等)
  • topic (字符串,可选):要搜索的主题或兴趣
  • size (字符串,可选):实例大小(“小”、“中”、“大”)
  • region (字符串,可选):地理区域或语言
  • beginnerFriendly (boolean,可选):仅显示初学者友好的实例

推荐实例

根据兴趣获取个性化实例推荐:

{
  "name": "recommend-instances",
  "arguments": {
    "interests": ["technology", "programming", "open source"]
  }
}

参数:

  • interests (数组,必填):您的兴趣或主题列表

发现实例实时(新)

通过instances.social API实时发现实例:

{
  "name": "discover-instances-live",
  "arguments": {
    "software": "mastodon",
    "language": "en",
    "minUsers": 1000,
    "openRegistrations": true,
    "limit": 20
  }
}

参数:

  • software (枚举,可选):按软件类型过滤(乳齿象、pleroma、misskey、像素化、lemmy、peertube、任何)
  • language (字符串,可选):按语言代码筛选(例如,“en”、“de”、“ja”)
  • minUsers (number,可选):最小用户数
  • maxUsers (number,可选):最大用户数
  • openRegistrations (boolean,可选):仅显示开放注册的实例
  • sortBy (枚举,可选):按“用户”、“状态”、“连接”或“名称”排序
  • limit (数字,可选):结果数量(默认值:20)

获取热门标签(新)

获取实例上的当前热门标签:

{
  "name": "get-trending-hashtags",
  "arguments": {
    "domain": "mastodon.social",
    "limit": 20
  }
}

获取热门帖子(新)

获取实例上的当前热门帖子:

{
  "name": "get-trending-posts",
  "arguments": {
    "domain": "mastodon.social",
    "limit": 20
  }
}

获取本地时间线(新)

从实例获取本地公共时间线:

{
  "name": "get-local-timeline",
  "arguments": {
    "domain": "mastodon.social",
    "limit": 20
  }
}

获取联合时间线(新)

从实例获取联邦公共时间线:

{
  "name": "get-federated-timeline",
  "arguments": {
    "domain": "mastodon.social",
    "limit": 20
  }
}

获取帖子(新)

获取一篇帖子及其完整的对话主题:

{
  "name": "get-post-thread",
  "arguments": {
    "postUrl": "https://mastodon.social/@user/123456789",
    "depth": 2,
    "maxReplies": 50
  }
}

搜索帐户(新)

在实例上搜索帐户:

{
  "name": "search-accounts",
  "arguments": {
    "domain": "mastodon.social",
    "query": "developer",
    "limit": 20
  }
}

搜索标签(新)

在实例上搜索标签:

{
  "name": "search-hashtags",
  "arguments": {
    "domain": "mastodon.social",
    "query": "programming",
    "limit": 20
  }
}

搜索帖子(新)

搜索实例上的帖子:

{
  "name": "search-posts",
  "arguments": {
    "domain": "mastodon.social",
    "query": "typescript",
    "limit": 20
  }
}

批量提取演员(新)

在单个请求中获取多个参与者:

{
  "name": "batch-fetch-actors",
  "arguments": {
    "identifiers": ["user1@mastodon.social", "user2@fosstodon.org"]
  }
}

批量提取帖子(新)

在一个请求中获取多个帖子:

{
  "name": "batch-fetch-posts",
  "arguments": {
    "urls": ["https://mastodon.social/@user/123", "https://fosstodon.org/@user/456"]
  }
}

健康检查

检查MCP服务器的运行状况:

{
  "name": "health-check",
  "arguments": {}
}

参数:

  • 无需

性能指标

获取MCP服务器的性能指标:

{
  "name": "performance-metrics",
  "arguments": {
    "operation": "discover-actor"
  }
}

参数:

  • operation (字符串,可选):获取以下指标的特定操作

MCP提示

探索Fediverse

{
  "name": "explore-fediverse",
  "arguments": {
    "interests": "technology and programming",
    "instanceType": "mastodon"
  }
}

比较实例

{
  "name": "compare-instances",
  "arguments": {
    "instances": "mastodon.social, fosstodon.org, hachyderm.io",
    "criteria": "community size and focus"
  }
}

发现内容

{
  "name": "discover-content",
  "arguments": {
    "topic": "artificial intelligence",
    "contentType": "people"
  }
}

比较帐户(新)

{
  "name": "compare-accounts",
  "arguments": {
    "accounts": "user1@mastodon.social, user2@fosstodon.org",
    "aspects": "posting frequency, topics, engagement"
  }
}

分析用户活动(新)

{
  "name": "analyze-user-activity",
  "arguments": {
    "identifier": "user@mastodon.social",
    "depth": "standard"
  }
}

查找专家(新)

{
  "name": "find-experts",
  "arguments": {
    "topic": "machine learning",
    "instances": "mastodon.social, fosstodon.org"
  }
}

总结趋势(新)

{
  "name": "summarize-trending",
  "arguments": {
    "instances": "mastodon.social",
    "focus": "tech"
  }
}

内容策略(v1.1.0)

根据趋势主题规划您的fediverse内容策略:

{
  "name": "content-strategy",
  "arguments": {
    "topics": "programming, open source",
    "targetAudience": "developers",
    "postingFrequency": "several-per-week"
  }
}

社区健康(v1.1.0)

分析实例审核和社区健康:

{
  "name": "community-health",
  "arguments": {
    "instance": "fosstodon.org",
    "concerns": "moderation, spam"
  }
}

迁移助手(v1.1.0)

获取计划迁移到新fediverse实例的帮助:

{
  "name": "migration-helper",
  "arguments": {
    "currentInstance": "mastodon.social",
    "targetInstance": "fosstodon.org",
    "priorities": "moderation, privacy, community focus"
  }
}

线程编辑器(v1.1.0)

帮助撰写结构良好的螺纹帖子:

{
  "name": "thread-composer",
  "arguments": {
    "topic": "Introduction to the Fediverse",
    "keyPoints": "What is ActivityPub, Popular instances, Getting started",
    "tone": "informative",
    "targetLength": "medium"
  }
}

身份验证写入工具(v1.1.0)

这些工具需要通过环境变量进行身份验证。看 配置 用于设置。

账户管理

  • list-accounts -列出已配置的帐户
  • switch-account -切换活动帐户
  • verify-account -验证帐户凭据

发布操作

{
  "name": "post-status",
  "arguments": {
    "content": "Hello Fediverse!",
    "visibility": "public",
    "contentWarning": "optional CW"
  }
}
  • post-status -创建新帖子
  • reply-to-post -对现有帖子的回复
  • delete-post -删除您自己的帖子

社交互动

  • boost-post / unboost-post -Boost(reblog)帖子
  • favourite-post / unfavourite-post -最喜欢的帖子
  • bookmark-post / unbookmark-post -为帖子添加书签
  • follow-account / unfollow-account -关注/取消关注帐户
  • mute-account / unmute-account -将帐户静音
  • block-account / unblock-account -阻止帐户

经过身份验证的时间表

  • get-home-timeline -您的家庭时间表
  • get-notifications -您的通知
  • get-bookmarks -您的书签帖子
  • get-favourites -你最喜欢的帖子

统一搜索(新)

在单个查询中搜索帐户、帖子和标签:

{
  "name": "search",
  "arguments": {
    "domain": "mastodon.social",
    "query": "typescript programming",
    "type": "all",
    "limit": 20
  }
}

参数:

  • domain (字符串,必填):要搜索的实例域
  • query (字符串,必填):搜索查询
  • type (字符串,可选):“所有”、“帐户”、“帖子”或“标签”(默认值:“全部”)
  • limit (数字,可选):每种类型的结果(1-40,默认值:20)
  • resolve (布尔值,可选):尝试WebFinger查找远程帐户

关系检查(新)

检查您与其他帐户的关系状态:

{
  "name": "get-relationship",
  "arguments": {
    "accountIds": ["12345", "67890"]
  }
}

参数:

  • accountIds (数组,必填):用于检查关系状态的帐户ID

退货: Following、followed_by、阻塞、静音和其他关系状态。

投票表决(新)

在帖子中投票:

{
  "name": "vote-on-poll",
  "arguments": {
    "pollId": "123456",
    "choices": [0, 2]
  }
}

参数:

  • pollId (string,必填):要投票的投票ID
  • choices (数组,必填):选择索引数组(从0开始)

退货: 使用当前结果和可视化条形图更新民意调查。

媒体上传(新增)

上传带有alt文本描述的媒体文件:

{
  "name": "upload-media",
  "arguments": {
    "filePath": "/path/to/image.jpg",
    "description": "A beautiful sunset over the ocean",
    "focus": "0.0,0.5"
  }
}

参数:

  • filePath (字符串,必填):要上传的本地文件路径或URL
  • description (字符串,可选):用于辅助功能的Alt文本(推荐)
  • focus (字符串,可选):焦点为“x,y”(-1.0到1.0)

支持的类型: 图像(jpg、png、gif、webp)、视频(mp4、webm)、音频(mp3、ogg)

预定帖子(新)

管理预定帖子:

{
  "name": "get-scheduled-posts",
  "arguments": {
    "limit": 20
  }
}
{
  "name": "update-scheduled-post",
  "arguments": {
    "scheduledPostId": "123",
    "scheduledAt": "2026-02-14T18:00:00.000Z"
  }
}
{
  "name": "cancel-scheduled-post",
  "arguments": {
    "scheduledPostId": "123"
  }
}
  • get-scheduled-posts -列出所有待定的预定帖子
  • update-scheduled-post -更改计划时间
  • cancel-scheduled-post -取消已安排的帖子

内容导出工具(v1.1.0)

以多种格式(JSON、Markdown、CSV)导出fediverse内容:

{
  "name": "export-timeline",
  "arguments": {
    "identifier": "user@mastodon.social",
    "format": "markdown",
    "limit": 50
  }
}
  • export-timeline -导出演员时间线
  • export-thread -导出带有回复的帖子
  • export-account-info -综合账户数据导出
  • export-hashtag -导出带有特定标签的帖子

建筑

项目结构

activitypub-mcp/
├── src/                           # Source code
│   ├── mcp-main.ts                # MCP server entry point
│   ├── mcp-server.ts              # MCP server implementation
│   ├── webfinger.ts               # WebFinger discovery client
│   ├── remote-client.ts           # Remote ActivityPub client
│   ├── instance-discovery.ts      # Static instance discovery
│   ├── dynamic-instance-discovery.ts # Live API instance discovery
│   ├── instance-blocklist.ts      # Instance blocklist manager
│   ├── audit-logger.ts            # Audit logging infrastructure
│   ├── health-check.ts            # Health monitoring
│   ├── performance-monitor.ts     # Performance tracking
│   ├── config.ts                  # Configuration constants
│   ├── logging.ts                 # Logging configuration
│   ├── auth/                      # Authentication (v1.1.0)
│   │   ├── account-manager.ts     # Multi-account management
│   │   ├── authenticated-client.ts # Authenticated API client
│   │   └── index.ts               # Auth module exports
│   ├── mcp/                       # MCP handlers
│   │   ├── tools.ts               # Read-only tool implementations
│   │   ├── tools-write.ts         # Write operation tools (v1.1.0)
│   │   ├── tools-export.ts        # Export tools (v1.1.0)
│   │   ├── resources.ts           # Resource implementations
│   │   └── prompts.ts             # Prompt implementations
│   └── server/                    # Server infrastructure
│       ├── http-transport.ts      # HTTP/SSE transport
│       ├── adaptive-rate-limiter.ts # Per-instance rate limiting (v1.1.0)
│       └── rate-limiter.ts        # Rate limiting
├── docs/                          # Documentation
├── scripts/                       # Installation & setup scripts
├── tests/                         # Test files
│   ├── unit/                      # Unit tests
│   └── integration/               # Integration tests
├── dist/                          # Built JavaScript files
├── package.json                   # Dependencies and scripts
└── README.md                      # This file

技术栈

  • WebFinger 的:联邦快递上的演员发现
  • MCP-SDK:模型上下文协议实现
  • 活动Pub:去中心化社交网络协议
  • LogTape:结构化日志记录
  • TypeScript:类型安全开发

通信流

LLM Client ←→ MCP Protocol ←→ Fediverse Client ←→ Remote ActivityPub Servers
                                     ↓
                              WebFinger Discovery
                                     ↓
                              Remote Data Fetching

文档

综合文档可在 docs/ 目录:

请参阅 文档索引 以获得完整的概述。

发展

可用脚本

  • npm run mcp -启动MCP服务器
  • npm run mcp:dev -在监视模式下启动MCP服务器
  • npm run test -运行测试
  • npm run build -构建TypeScript

环境变量

创建 .env 文件:

# MCP Server configuration
MCP_SERVER_NAME=activitypub-mcp
MCP_SERVER_VERSION=1.1.0

# Transport configuration (stdio or http)
MCP_TRANSPORT_MODE=stdio
MCP_HTTP_PORT=3000
MCP_HTTP_HOST=127.0.0.1
MCP_HTTP_CORS_ENABLED=false

# Rate limiting
RATE_LIMIT_ENABLED=true
RATE_LIMIT_MAX=100
RATE_LIMIT_WINDOW=900000

# Logging
LOG_LEVEL=info

# Audit logging
AUDIT_LOG_ENABLED=true
AUDIT_LOG_MAX_ENTRIES=10000

# Instance blocklist (comma-separated domains)
BLOCKED_INSTANCES=
INSTANCE_BLOCKING_ENABLED=true

# Dynamic instance discovery
INSTANCES_SOCIAL_TOKEN=
DYNAMIC_INSTANCE_CACHE_TTL=3600000

# Content warnings
RESPECT_CONTENT_WARNINGS=true
SHOW_CONTENT_WARNINGS=true

# Authentication (for write operations - v1.1.0)
ACTIVITYPUB_DEFAULT_INSTANCE=mastodon.social
ACTIVITYPUB_DEFAULT_TOKEN=your-oauth-access-token
ACTIVITYPUB_DEFAULT_USERNAME=your-username

# Multi-account configuration (JSON format)
# ACTIVITYPUB_ACCOUNTS='[{"id":"work","instance":"fosstodon.org","token":"token1","username":"work_account"},{"id":"personal","instance":"mastodon.social","token":"token2","username":"personal_account"}]'

HTTP传输模式

对于生产部署,您可以在HTTP模式下运行服务器:

# Start with HTTP transport
MCP_TRANSPORT_MODE=http MCP_HTTP_PORT=8080 npm run mcp

# The server exposes:
# - /mcp    - MCP protocol endpoint
# - /health - Health check endpoint
# - /metrics - Performance metrics
# - /       - Server info

测试

# Test MCP server with inspector
mcp-inspector

# Test fediverse interactions
npm run test

# Manual testing with specific actors
# Use the discover-actor tool to test WebFinger discovery

跨平台兼容性

该项目旨在跨不同操作系统无缝工作:

支持的平台

  • Windows 10/11 (PowerShell、命令提示符、Git Bash)
  • macOS (Bash,Zsh)
  • Linux (Bash,大多数发行版)

平台特定功能

  • 自动脚本检测:npm脚本会自动为您的平台选择合适的脚本
  • 本机路径处理:每个平台的正确配置路径
  • 外壳兼容性:提供了PowerShell(.ps1)和Bash(.sh)脚本

按平台安装方法

平台推荐方法替代方法
窗户npm run setup.\scripts\setup.ps1npm run setup:windows
macOSnpm run setupbash scripts/setup.shnpm run setup:unix
Linuxnpm run setupbash scripts/setup.shnpm run setup:unix

解决平台问题

Windows PowerShell执行策略:

# If you get execution policy errors, run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Windows Git Bash:

# Git Bash users can use Unix-style commands:
npm run setup:unix

Linux/macOS权限:

# If you get permission errors, make scripts executable:
chmod +x scripts/*.sh

贡献

  1. 克隆该仓库
  2. 创建要素分支: git checkout -b feature/amazing-feature
  3. 提交更改: git commit -m 'Add amazing feature'
  4. 推送到分支: git push origin feature/amazing-feature
  5. 打开拉取请求

许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

致谢

链接

______________________________________________________________________

由以下材料制成❤️ 通过 Cameron Rye

目录标签

目录标签

模型交互TypeScriptClaude联邦宇宙本地部署ActivityPubMCP协议LLM集成

支持客户端

Claude DesktopClaudeCursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

oauth

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

activitypub-mcp

工具数量(toolCount,工具数)

53

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiooauth部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP