Skip to main content
Glama
al-one

MCP Server for notify to weixin / telegram / bark / lark

bark_send_notify

Send notifications via Bark with customizable title, body, priority levels, and optional URL redirects for iOS device alerts.

Instructions

通过Bark推送通知

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes推送内容
titleNo推送标题
subtitleNo推送副标题
device_keyNo设备key,默认从环境变量获取
urlNo点击推送时,跳转的URL ,支持URL Scheme 和 Universal Link
iconNo自定义图标URL
levelNo推送中断级别。critical: 重要警告, 在静音模式下也会响铃active:默认值,系统会立即亮屏显示通知timeSensitive:时效性通知,可在专注状态下显示通知。passive:仅将通知添加到通知列表,不会亮屏提醒。active
volumeNo重要警告的通知音量(0-10),默认为5

Implementation Reference

  • The bark_send_notify tool handler: sends a push notification to Bark server using requests.post with configurable title, body, subtitle, device_key, url, icon, level, and volume. Retrieves defaults from environment variables.
    @mcp.tool(
        title="Bark推送通知",
        description="通过Bark推送通知",
    )
    def bark_send_notify(
        body: str = Field(description="推送内容"),
        title: str = Field("", description="推送标题"),
        subtitle: str = Field("", description="推送副标题"),
        device_key: str = Field("", description="设备key,默认从环境变量获取"),
        url: str = Field("", description="点击推送时,跳转的URL ,支持URL Scheme 和 Universal Link"),
        icon: str = Field("", description="自定义图标URL"),
        level: str = Field(
            "active",
            description="推送中断级别。"
                        "critical: 重要警告, 在静音模式下也会响铃"
                        "active:默认值,系统会立即亮屏显示通知"
                        "timeSensitive:时效性通知,可在专注状态下显示通知。"
                        "passive:仅将通知添加到通知列表,不会亮屏提醒。",
        ),
        volume: int = Field(5, description="重要警告的通知音量(0-10),默认为5"),
    ):
        """
        https://bark.day.app/#/tutorial
        """
        if not device_key:
            device_key = os.getenv("BARK_DEVICE_KEY", "")
        base = os.getenv("BARK_BASE_URL") or "https://api.day.app"
        res = requests.post(
            f"{base}/{device_key}",
            json={
                "body": body,
                "title": title,
                "subtitle": subtitle,
                "url": url,
                "icon": icon,
                "level": level,
                "volume": volume,
            },
        )
        return res.json()
  • Registers the tools from the other.py module (including bark_send_notify) by calling its add_tools function on the MCP instance.
    other.add_tools(mcp)

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/al-one/mcp-notify'

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