Skip to main content
Glama
SORACOM Data Reader MCP

SORACOM Data Reader MCP

by leaveanest

SORACOM データ分析 MCP

SORACOM APIを活用したデータ分析向けMCP(Model Context Protocol)サーバーです。

概要

SORACOM Harvest Data、Harvest Files、ソラカメのデータを取得・分析するためのツールを提供します。 認証にはSAMユーザーの認証キーを使用します。

Related MCP server: CMP MCP Server

対象API一覧

1. Harvest Data(センサーデータ)📊

API

説明

モード

GET /v1/data/subscribers/{imsi}

特定SIMのHarvest Dataを取得

harvest

GET /v1/data/resources/{resource_type}/{resource_id}

リソース単位でデータ取得

harvest

2. Harvest Files(ファイルストレージ)📁

API

説明

モード

GET /v1/files/{scope}/{path}

ファイル・ディレクトリ一覧取得

harvest

GET /v1/files/{scope}/{path}

ファイルダウンロード(redirect=true)

harvest

GET /v1/files/{scope}/_info

ストレージ使用状況

harvest

3. ソラカメ - カメラ管理(SoraCam Devices)📹

API

説明

モード

GET /v1/sora_cam/devices

カメラ一覧取得

soracam

GET /v1/sora_cam/devices/{device_id}

カメラ詳細情報取得

soracam

4. ソラカメ - 録画・静止画(SoraCam Videos)🎬

API

説明

モード

GET /v1/sora_cam/devices/{device_id}/videos

録画一覧取得

soracam

POST /v1/sora_cam/devices/{device_id}/videos/exports

録画エクスポート開始

soracam

GET /v1/sora_cam/devices/{device_id}/videos/exports/{export_id}

エクスポート状況確認

soracam

POST /v1/sora_cam/devices/{device_id}/videos/images

静止画取得

soracam

GET /v1/sora_cam/devices/{device_id}/stream

ストリーミングURL取得

soracam

5. ソラカメ - イベント検出(SoraCam Events)🔔

API

説明

モード

GET /v1/sora_cam/devices/{device_id}/events

イベント一覧取得

soracam

GET /v1/sora_cam/devices/{device_id}/events/{event_id}

イベント詳細取得

soracam

6. SIM・統計情報(Subscribers & Stats)📈

API

説明

モード

GET /v1/subscribers

SIM一覧取得

stats

GET /v1/subscribers/{imsi}

特定SIM情報取得

stats

GET /v1/groups

グループ一覧取得

stats

GET /v1/stats/air/subscribers/{imsi}

SIM通信統計(データ使用量)

stats

GET /v1/stats/harvest/{imsi}

Harvest利用統計

stats

認証の設定

このMCPを使用するには、SORACOM SAMユーザーの認証キーを取得する必要があります。

認証キーの取得方法

  1. SORACOMユーザーコンソール にログイン

  2. 右上のアカウントメニュー → 「セキュリティ」を選択

  3. 「SAMユーザー」タブを選択

  4. SAMユーザーを作成(または既存のユーザーを選択)

  5. 「認証キー」を生成

  6. authKeyId と authKey をメモ

必要な権限

SAMユーザーには以下の権限が必要です:

  • harvest:getDataEntry - Harvest Data読み取り

  • files:getObject - Harvest Files読み取り

  • files:listObjects - Harvest Files一覧取得

  • SoraCam:* - ソラカメ操作(必要に応じて絞り込み可)

  • subscriber:getSubscriber - SIM情報読み取り

  • stats:getAirStats - 通信統計読み取り

使い方

インストール

# GitHubから直接インストール
uv tool install git+https://github.com/leaveanest/alt-soracom-data-reader-mcp.git

# 実行
soracom-data-mcp --mode harvest
# または、uvxで一時的に実行(インストール不要)
uvx --from git+https://github.com/leaveanest/alt-soracom-data-reader-mcp.git soracom-data-mcp --mode harvest

モード

モード

説明

harvest

Harvest Data/Files取得

soracam

ソラカメ映像・イベント取得

stats

SIM情報・通信統計取得

all

全ツール(開発用)

環境変数

export SORACOM_AUTH_KEY_ID="keyId-xxx"  # 必須
export SORACOM_AUTH_KEY="secret-xxx"    # 必須
export SORACOM_COVERAGE="jp"            # オプション(デフォルト: jp)

MCP設定例

uv tool installでインストール済みの場合

{
  "mcpServers": {
    "soracom-harvest": {
      "command": "soracom-data-mcp",
      "args": ["--mode", "harvest"],
      "env": {
        "SORACOM_AUTH_KEY_ID": "keyId-xxx",
        "SORACOM_AUTH_KEY": "secret-xxx"
      }
    }
  }
}

uvxでGitHubから直接実行

{
  "mcpServers": {
    "soracom-harvest": {
      "command": "uvx",
      "args": [
        "--from", "git+https://github.com/leaveanest/alt-soracom-data-reader-mcp.git",
        "soracom-data-mcp", "--mode", "harvest"
      ],
      "env": {
        "SORACOM_AUTH_KEY_ID": "keyId-xxx",
        "SORACOM_AUTH_KEY": "secret-xxx"
      }
    }
  }
}

ローカル開発用

{
  "mcpServers": {
    "soracom-harvest": {
      "command": "uv",
      "args": ["run", "soracom-data-mcp", "--mode", "harvest"],
      "env": {
        "SORACOM_AUTH_KEY_ID": "keyId-xxx",
        "SORACOM_AUTH_KEY": "secret-xxx"
      }
    }
  }
}

注意事項

  • APIにはレート制限があります

  • ソラカメAPIはソラカメ契約が必要です

  • Harvest Data/FilesはHarvest契約が必要です

参考リンク

Available Tools

5 tools
get_harvest_dataA

特定SIMのHarvest Dataを取得します

Args: imsi: SIMのIMSI from_time: 取得開始時刻(UNIXタイムスタンプ・ミリ秒) to_time: 取得終了時刻(UNIXタイムスタンプ・ミリ秒) sort: ソート順(asc: 古い順, desc: 新しい順) limit: 取得件数(最大1000) last_evaluated_key: ページング用キー

Returns: Harvest Dataのリストと次ページのキー

Inputs: imsi (required), from_time, to_time, sort, +2 more. Returns: object

get_harvest_data_by_resourceA

リソースタイプとIDでHarvest Dataを取得します

Args: resource_type: リソースタイプ(subscriber, device など) resource_id: リソースID from_time: 取得開始時刻(UNIXタイムスタンプ・ミリ秒) to_time: 取得終了時刻(UNIXタイムスタンプ・ミリ秒) sort: ソート順(asc: 古い順, desc: 新しい順) limit: 取得件数(最大1000) last_evaluated_key: ページング用キー

Returns: Harvest Dataのリストと次ページのキー

Inputs: resource_type (required), resource_id (required), from_time, to_time, +3 more. Returns: object

get_harvest_file_download_urlC

Harvest Filesのファイルダウンロード用URLを取得します

Args: scope: スコープ(private または operators/{operator_id}) path: ファイルパス

Returns: ダウンロード用URL(リダイレクトURL)

Inputs: scope (required), path (required). Returns: object

get_harvest_file_infoB

Harvest Filesのストレージ使用状況を取得します

Args: scope: スコープ(private または operators/{operator_id})

Returns: ストレージ使用状況(使用量、ファイル数など)

Inputs: scope. Returns: object

list_harvest_filesC

Harvest Filesのファイル・ディレクトリ一覧を取得します

Args: scope: スコープ(private または operators/{operator_id}) path: パス(デフォルト: /) limit: 取得件数 last_evaluated_key: ページング用キー

Returns: ファイル・ディレクトリ一覧

Inputs: scope, path, limit, last_evaluated_key. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap. get_harvest_data retrieves data by SIM IMSI, get_harvest_data_by_resource retrieves data by resource type/ID, get_harvest_file_download_url gets download URLs, get_harvest_file_info gets storage usage, and list_harvest_files lists files/directories. The descriptions make it easy to differentiate between data retrieval methods and file management operations.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with 'get_' or 'list_' prefixes followed by descriptive nouns. The naming is perfectly uniform across all five tools, making them predictable and easy to understand at a glance.

    Tool Count5/5

    Five tools is an ideal number for this server's purpose of reading SORACOM Harvest data and files. Each tool serves a specific, necessary function without redundancy, covering both data retrieval (by SIM and resource) and file management operations in a well-scoped manner.

    Completeness4/5

    The toolset provides comprehensive read-only coverage for Harvest data and files, including multiple query methods, file listing, download URLs, and storage info. The only minor gap is the lack of write/update operations, but as a 'Data Reader' server, this aligns with its stated purpose, and agents can work effectively within this read-only scope.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables access to WeatherXM PRO weather station data, including real-time observations, historical data, and hyperlocal forecasts through station queries, geographic searches, and H3 cell-based weather information.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables integration with CMP (Connectivity Management Platform) API to query and manage SIM card information, including filtering SIM lists and retrieving detailed SIM card usage statistics.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables querying Swarmia's Export API for engineering metrics including pull request analytics, DORA metrics, investment balance, and effort reporting through an MCP interface.
      8
      MIT