bark-mcp-server
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Bark MCP Server

A Model Context Protocol (MCP) server for sending iOS push notifications via Bark.

npm version License: MIT

Features

This MCP server provides tools for AI assistants to send push notifications to iOS devices through Bark. It supports all Bark API features including:

Core Tools

  1. send_bark_notification - Send a single push notification
  2. send_bark_batch_notifications - Send multiple notifications in batch
  3. check_bark_server_health - Check if a Bark server is healthy

Supported Bark Features

  • Basic notifications with title, subtitle, and body
  • URL redirection - Open links when notifications are tapped
  • Notification grouping - Organize notifications by group
  • Custom icons - Use custom notification icons (iOS 15+)
  • Sound customization - Use custom notification sounds
  • Call notifications - Play sound repeatedly for 30 seconds
  • Notification levels:
    • active (default)
    • timeSensitive - Displayed during focus mode
    • passive - Silent notification
    • critical - Overrides silent/do not disturb modes
  • Badge management - Set app icon badge numbers
  • Encryption support - Send encrypted notifications

Installation

Quick Start (Recommended)

npx bark-mcp-server

Global Installation

npm install -g bark-mcp-server
bark-mcp-server

Local Installation

npm install bark-mcp-server
npx bark-mcp-server

Usage

With Claude Code

Add to your MCP server configuration:

{
  "bark": {
    "command": "npx",
    "args": ["-y", "bark-mcp-server"]
  }
}

For detailed Claude Code setup instructions, see CLAUDE.md.

With Claude Desktop

Add the server to your claude_desktop_config.json:

{
  "mcpServers": {
    "bark": {
      "command": "npx",
      "args": ["-y", "bark-mcp-server"]
    }
  }
}

Alternative Configuration Methods

Global Installation:

{
  "bark": {
    "command": "bark-mcp-server"
  }
}

Direct Node.js:

{
  "bark": {
    "command": "node", 
    "args": ["/path/to/bark-mcp-server/build/index.js"]
  }
}

With MCP Inspector

For testing and debugging:

npx @modelcontextprotocol/inspector npx bark-mcp-server

Tool Reference

send_bark_notification

Send a single push notification to an iOS device.

Parameters:

  • server_url (required) - Bark server URL (e.g., https://api.day.app)
  • device_key (required) - Device key from Bark app
  • body (required) - Notification content/message
  • title (optional) - Notification title
  • subtitle (optional) - Notification subtitle
  • url (optional) - URL to open when notification is tapped
  • group (optional) - Group name for organizing notifications
  • icon (optional) - Custom icon URL (iOS 15+)
  • sound (optional) - Custom notification sound name
  • call (optional) - Play sound repeatedly for 30 seconds
  • level (optional) - Notification priority: active, timeSensitive, passive, critical
  • badge (optional) - Badge number on app icon
  • ciphertext (optional) - Encrypted message content

Example:

{
  "server_url": "https://api.day.app",
  "device_key": "your-device-key",
  "title": "Important Alert",
  "body": "This is a test notification",
  "level": "timeSensitive",
  "sound": "alarm"
}

send_bark_batch_notifications

Send multiple notifications in a single batch operation.

Parameters:

  • server_url (required) - Bark server URL
  • notifications (required) - Array of notification objects (same format as single notification)

check_bark_server_health

Check if a Bark server is running and healthy.

Parameters:

  • server_url (required) - Bark server URL to check

Getting Your Device Key

  1. Install Bark app on your iOS device
  2. Open the app and copy your device key from the main screen
  3. Use this key in the device_key parameter

Bark Server Setup

You can use:

  • The official Bark service: https://api.day.app
  • Self-hosted Bark server (see bark-server)

Development

# Watch mode for development
npm run dev

# Build
npm run build

# Start the server
npm start

License

MIT License

Package Sidebar

Install

npm i bark-mcp-server

Weekly Downloads

8

Version

1.0.0

License

MIT

Unpacked Size

35.3 kB

Total Files

7

Last publish

Collaborators

  • metrovoc