Skip to main content

一个基于 FastMCP 的消息推送工具,支持 PushDeer、Bark 等多种推送渠道

Project description

消息推送服务 (MCP)

PyPI

这是一个使用 FastMCP 框架构建的消息推送服务集合。它支持 Bark 和 PushDeer。

show

使用

这个包提供了两个主要命令:mcp-barkmcp-pushdeer。你可以使用像 uvxpipx 这样的工具来运行它们。

使用 uvx 的例子:

# 运行 Bark 服务
# 这将启动 Bark 通知的 MCP 服务器
uvx --from notification_mcp mcp-bark

# 运行 PushDeer 服务
# 这将启动 PushDeer 通知的 MCP 服务器
uvx --from notification_mcp mcp-pushdeer

一旦服务启动,你就可以使用 FastMCP 客户端或其他兼容方法来与工具(如 send_message)进行交互。

环境变量

在运行命令之前,请配置以下环境变量:

对于 Bark (mcp-bark):

  • BARK_DEVICE_KEYS: 必需。逗号分隔的 Bark 设备密钥列表(例如 key1,key2)。
  • BARK_SERVER: 可选。自建 Bark 服务器 URL,默认为 https://api.day.app

对于 PushDeer (mcp-pushdeer):

  • PUSHDEER_KEYS: 必需。逗号分隔的 PushDeer 密钥列表(例如 keyA,keyB)。
  • PUSHDEER_SERVER: 可选。自建 PushDeer 服务器 URL,默认为 https://api2.pushdeer.com

功能

Bark 服务 (mcp-bark)

提供以下工具:

  • send_message(title: str, content: str) -> str: 向所有配置的 Bark 设备发送带有指定标题和内容的通知。

PushDeer 服务 (mcp-pushdeer)

提供以下工具:

  • send_message(text: str, desp: Optional[str] = None, type: str = 'text', pushkey: Optional[str] = None) -> str: 发送消息。type 可以是 'text'、'markdown' 或 'image'(其中 text 是图像 URL)。
  • send_markdown(markdown: str, desp: Optional[str] = None, pushkey: Optional[str] = None) -> str: 一个发送 Markdown 消息的便捷工具。
  • send_image(image_url: str, desp: Optional[str] = None, pushkey: Optional[str] = None) -> str: 一个通过 URL 发送图像消息的便捷工具。

许可

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

notification_mcp-0.1.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

notification_mcp-0.1.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file notification_mcp-0.1.3.tar.gz.

File metadata

  • Download URL: notification_mcp-0.1.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.4

File hashes

Hashes for notification_mcp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 59b8a1077928638f0de4802b70fa869fa5f6ec5086229065125b160280b4ce82
MD5 fe5b200dd28350711250b9aa4f6bdbb2
BLAKE2b-256 afae111838d293d0e8676e3b81166e2ffb62dffba311c709b58fad8800b9b581

See more details on using hashes here.

File details

Details for the file notification_mcp-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for notification_mcp-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 28ac203d809a6d454484863fc13c9928310f12834d0d297870b259f2f960bf9f
MD5 15244ecdf1a99494ecf81436fe75e028
BLAKE2b-256 29725805ef65cfe3abed1d8c6ced4969a9e9700b50853d2b94bed5565f12e1aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page