Metadata-Version: 2.4
Name: bark-mcp
Version: 0.1.0
Summary: MCP server talking to Bark notification server for iOS
Author: Bark MCP Contributors
License: MIT License
        
        Copyright (c) 2025 Jie Tong
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/yourusername/bark-mcp
Project-URL: Bug Tracker, https://github.com/yourusername/bark-mcp/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.95.0
Requires-Dist: fastmcp>=0.1.0
Requires-Dist: requests>=2.28.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: uvicorn>=0.21.0
Dynamic: license-file

# bark-mcp

A Model Context Protocol (MCP) server that connects to [Bark](https://github.com/Finb/bark-server), a notification server for iOS. This allows LLM applications to send notifications to iOS devices through the MCP standard.

## Features

- Simple MCP server implementation using FastMCP
- Single tool: `notify` to send notifications to iOS devices
- Configurable via environment variables
- Easy to use command-line interface

## Installation

```bash
# Install from PyPI
pip install bark-mcp

# Or install from source
git clone https://github.com/yourusername/bark-mcp.git
cd bark-mcp
pip install -e .
```

## Configuration

The server requires the following environment variables:

- `BARK_SERVER_URL`: URL of the Bark server (e.g., `https://api.day.app`)
- `BARK_API_KEY`: Your Bark API key/device key

You can set these variables in your environment or create a `.env` file:

```
BARK_SERVER_URL=https://api.day.app
BARK_API_KEY=your_api_key_here
```

### Bark API Format

The server uses the Bark API with the following URL formats:

- `GET /{bark-key}/{title}/{content}?url={url}` (when title and URL are provided)
- `GET /{bark-key}/{title}/{content}` (when only title is provided)
- `GET /{bark-key}/{content}` (when only content is provided)

## Usage

### Command Line

Start the MCP server using either of these commands:

```bash
# Using the standard command (after installing the package)
bark-mcp

# Using uvx (runs without installing the package)
uvx bark-mcp
```

Both commands support the same options:

```bash
# Specify a .env file
bark-mcp --env-file /path/to/.env
# or
uvx bark-mcp --env-file /path/to/.env

# Enable debug logging
bark-mcp --debug
# or
uvx bark-mcp --debug
```

> **Note**: `uvx` is a command from the `uv` package manager that runs Python tools in temporary, isolated environments without installing them permanently. Install it with `pip install uv`.

### Using with MCP Clients

The server provides a single tool:

- `notify`: Send a notification to an iOS device
  - Parameters:
    - `title` (optional): Title of the notification
    - `content` (required): Content of the notification
    - `url` (optional): URL to open when the notification is tapped

Example usage in an MCP client:

```python
# This would be handled by the MCP client
result = await call_tool("notify", {
    "title": "Hello from MCP",
    "content": "This is a notification sent via MCP",
    "url": "https://example.com"
})
```

## Development

### Prerequisites

- Python 3.8+
- FastMCP
- Requests
- Python-dotenv

### Running Tests

```bash
# TODO: Add testing instructions
```

## License

This project is licensed under the MIT License - see the LICENSE file for details.
