Skip to main content
Glama

BirdNet-Pi MCP Server

BirdNet-Pi MCP Server

A Python-based Model Context Protocol (MCP) server for BirdNet-Pi integration.

Features

  • Bird detection data retrieval with date and species filtering
  • Detection statistics and analysis
  • Audio recording access
  • Daily activity patterns
  • Report generation

Requirements

  • Python 3.8+
  • FastAPI
  • Uvicorn
  • Other dependencies listed in requirements.txt

Installation

  1. Clone the repository:
git clone https://github.com/YourUsername/mcp-server.git cd mcp-server
  1. Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up your data directories:
mkdir -p data/audio data/reports

Configuration

The server can be configured using environment variables:

  • BIRDNET_DETECTIONS_FILE: Path to detections JSON file (default: 'data/detections.json')
  • BIRDNET_AUDIO_DIR: Path to audio files directory (default: 'data/audio')
  • BIRDNET_REPORT_DIR: Path to reports directory (default: 'data/reports')

Running the Server

Start the server:

python server.py

The server will run on http://localhost:8000.

API Endpoints

  • /functions - List available functions (GET)
  • /invoke - Invoke a function (POST)

Available Functions

  1. getBirdDetections
    • Get bird detections filtered by date range and species
    • Parameters: startDate, endDate, species (optional)
  2. getDetectionStats
    • Get detection statistics for a time period
    • Parameters: period ('day', 'week', 'month', 'all'), minConfidence (optional)
  3. getAudioRecording
    • Get audio recording for a detection
    • Parameters: filename, format ('base64' or 'buffer')
  4. getDailyActivity
    • Get bird activity patterns for a specific day
    • Parameters: date, species (optional)
  5. generateDetectionReport
    • Generate a report of detections
    • Parameters: startDate, endDate, format ('html' or 'json')

Directory Structure

mcp-server/ ├── birdnet/ │ ├── __init__.py │ ├── config.py │ ├── functions.py │ └── utils.py ├── data/ │ ├── audio/ │ └── reports/ ├── server.py ├── requirements.txt └── README.md
-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

A Python-based server that enables accessing and analyzing bird detection data through the Model Context Protocol, offering features like filtering detections, accessing audio recordings, and generating reports.

  1. Features
    1. Requirements
      1. Installation
        1. Configuration
          1. Running the Server
            1. API Endpoints
              1. Available Functions
            2. Directory Structure

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that extracts and analyzes Python code structures, focusing on import/export relationships between files to help LLMs understand code context.
                Last updated -
                6
                Python
                MIT License
              • -
                security
                F
                license
                -
                quality
                A Python-based implementation of the Model Context Protocol that enables communication between a model context management server and client through a request-response architecture.
                Last updated -
                Python
                • Linux
                • Apple
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server implementation that connects AI assistants to DuckDB, enabling them to query and analyze data from various sources including CSV, Parquet, JSON, and cloud storage through SQL.
                Last updated -
                7
                Python
                MIT License
                • Apple
              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server that allows AI assistants to access bird observation data, hotspots, and taxonomy information from eBird.
                Last updated -
                7
                1
                JavaScript

              View all related MCP servers

              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/DMontgomery40/mcp-local-server'

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