BirdNet-Pi MCP Server

by DMontgomery40
Verified

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Used as the web framework for implementing the MCP server's API endpoints for bird detection data.

  • Used for version control and distribution of the MCP server codebase.

  • Hosts the repository for the MCP server code, enabling collaboration and distribution.

BirdNet-Pi MCP 서버

BirdNet-Pi 통합을 위한 Python 기반 모델 컨텍스트 프로토콜(MCP) 서버.

특징

  • 날짜 및 종 필터링을 통한 조류 감지 데이터 검색
  • 탐지 통계 및 분석
  • 오디오 녹음 액세스
  • 일일 활동 패턴
  • 보고서 생성

요구 사항

  • 파이썬 3.8 이상
  • 패스트API
  • 유비콘
  • requirements.txt 에 나열된 기타 종속성

설치

  1. 저장소를 복제합니다.

지엑스피1

  1. 가상 환경을 만들고 활성화하세요.
python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
  1. 종속성 설치:
pip install -r requirements.txt
  1. 데이터 디렉토리를 설정하세요.
mkdir -p data/audio data/reports

구성

서버는 환경 변수를 사용하여 구성할 수 있습니다.

  • BIRDNET_DETECTIONS_FILE : 탐지 JSON 파일 경로(기본값: 'data/detections.json')
  • BIRDNET_AUDIO_DIR : 오디오 파일 디렉토리 경로(기본값: 'data/audio')
  • BIRDNET_REPORT_DIR : 보고서 디렉토리 경로(기본값: 'data/reports')

서버 실행

서버를 시작합니다:

python server.py

서버는 http://localhost:8000 에서 실행됩니다.

API 엔드포인트

  • /functions - 사용 가능한 함수 나열(GET)
  • /invoke - 함수 호출(POST)

사용 가능한 기능

  1. getBirdDetections
    • 날짜 범위 및 종별로 필터링된 새 감지 결과를 받으세요
    • 매개변수: 시작일, 종료일, 종류(선택 사항)
  2. getDetectionStats
    • 특정 기간 동안의 탐지 통계를 가져옵니다.
    • 매개변수: 기간('일', '주', '월', '모두'), minConfidence(선택 사항)
  3. getAudioRecording
    • 탐지를 위한 오디오 녹음을 받으세요
    • 매개변수: 파일 이름, 형식('base64' 또는 '버퍼')
  4. getDailyActivity
    • 특정 날짜의 조류 활동 패턴을 알아보세요
    • 매개변수: 날짜, 종(선택 사항)
  5. generateDetectionReport
    • 탐지 보고서 생성
    • 매개변수: 시작일, 종료일, 형식('html' 또는 'json')

디렉토리 구조

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

모델 컨텍스트 프로토콜을 통해 조류 감지 데이터에 접근하고 분석할 수 있는 Python 기반 서버로, 감지 필터링, 오디오 녹음 접근, 보고서 생성 등의 기능을 제공합니다.

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