Skip to main content
Glama
Grips Intelligence MCP Server

Grips Intelligence MCP Server

by alloufj

Grips Intelligence MCPサーバー (v2)

Grips IntelligenceのEコマースデータAPIを、Claude Desktop、Cowork、Claude CodeなどのあらゆるMCPクライアントに公開するModel Context Protocol (MCP) サーバーです。

v2はv1をクリーンに再構築したもので、初日から防御的なデータ処理が組み込まれています。v1.xで実行時のパッチが必要だった「.map is not a function」系のバグを修正しました。データが少ない、または不明なドメインの場合でも、ツール呼び出しがクラッシュするのではなく、クリーンな「データなし」のレスポンスを返すようになります。

含まれるもの

ツール

機能

grips_get_domain_performance

1つ以上のドメインの月次売上 / トランザクション数 / セッション数 / 広告コスト / AOV / CR / CPC

grips_get_daily_performance

日次売上 / トランザクション数 / セッション数 (カバレッジ制限あり)

grips_get_channels

オーガニック / 有料検索 / ダイレクト / リファラル / ソーシャル分析 — 時系列 + 集計

grips_get_adwords

有料メディアの支出、クリック数、CPC — 時系列 + 集計

grips_get_devices

モバイル / デスクトップ / タブレットの売上、セッション数、CR、AOV

grips_compare_domains

リーダーボードランキング付きのドメイン並列取得。ドメインごとのエラーは分離されます

grips_raw_query

エスケープハッチ — 任意のGrips GraphQLクエリを送信

すべてのツールは、読みやすさのためにデフォルトでMarkdown形式で出力します。機械可読な出力が必要な場合は format: "json" を渡してください。

インストール

npm install

prepareスクリプトは、npm installを実行すると自動的に dist/ をビルドします。

設定

MCPクライアントのサーバー設定にGrips APIキーを設定してください。Claude Desktopの場合は ~/Library/Application Support/Claude/claude_desktop_config.json です:

{
  "mcpServers": {
    "grips": {
      "command": "node",
      "args": [
        "/ABSOLUTE/PATH/TO/grips-mcp-server-v2/dist/index.js"
      ],
      "env": {
        "GRIPS_API_KEY": "your-api-key-here",
        "GRIPS_DEFAULT_COUNTRY": "US"
      }
    }
  }
}

必要な環境変数:

  • GRIPS_API_KEY — Grips APIトークン (grips-api-key ヘッダーとして送信されます)。

オプションの環境変数:

  • GRIPS_DEFAULT_COUNTRY — US、GB、または DE。未設定または無効な場合は US がデフォルトとなります。

設定を編集した後、Claude Desktopを完全に終了し(ウィンドウを閉じるだけでなく Cmd+Q で終了)、再起動してください。

v1との違い

v1は特定のAPIレスポンス形式でクラッシュしていました。Gripsがデータ範囲の狭いドメインや不明なドメインを返した際、timeseries フィールドが null や undefined、[] ではなく {} として返されるためです。コードでは (data.timeseries ?? []).map(...) を使用していましたが、これは null/undefined に対してのみ有効で、{} には対応していませんでした。結果として "data.timeseries ?? []).map is not a function" というエラーが発生していました。

v2では、すべてのペイロードフィールドを使用前に toArray<T>() (配列用) または toObject<T>() (デバイスエンドポイントのような辞書形式のレスポンス用) を通すようにしました。配列やオブジェクトではない値は安全な空のデフォルト値にフォールバックされ、ツールは例外を投げる代わりにクリーンな「データなし」のレスポンスを返します。

その他の変更点:

  • 日付の正規化がすべてのツールで一貫しています(すべてUTCの YYYY-MM-DD に変換されるため、UTC以外のタイムゾーンでも日付の境界でデータがずれることはありません)。

  • 通貨 / 整数 / パーセントのフォーマッタは、値が欠落している場合に $NaN や 0.00% ではなく — を表示します。

  • エラーメッセージにアクション可能なヒントが含まれるようになりました(401 → 「APIキーを確認してください」、429 → 「レート制限です、期間を短くしてください」など)。

  • grips_compare_domains におけるドメインごとのエラー分離 — 8ドメインの比較中に1つのドメインでデータが不足していても、他の7つの結果が壊れることはありません。

  • 文字数制限の切り詰め — レスポンスは約200KBでキャップされ、目に見える通知が表示されるため、複数ドメインの取得によってコンテキストウィンドウが溢れることはありません。

開発

npm run dev    # watch mode, rebuilds on change
npm run build  # one-shot build to dist/

コマンドラインからのテスト

サーバーがエラーなしで起動することを確認します(stdinからのEOFで終了します):

GRIPS_API_KEY=your-key node dist/index.js < /dev/null

stderrに [grips-mcp] grips-mcp-server v2.0.0 ready (default country: US). と表示され、クラッシュしないことを確認してください。

インタラクティブなテストには @modelcontextprotocol/inspector を使用してください:

npx @modelcontextprotocol/inspector node dist/index.js

APIリファレンス

Gripsは公開スキーマを https://gripsintelligence.com/knowledge-base/api で文書化しています。このサーバーが使用するクエリは、そのページからそのままコピーしたものです。

現在サポートされている国:US、GB、DE。それ以外はAPIでエラーになります。

ライセンス

プライベート — 外部配布不可。

Available Tools

7 tools
grips_compare_domainsCompare multiple domains side-by-sideA
Read-onlyIdempotent

Fetches per-domain performance in parallel and returns a leaderboard ranked by the chosen metric (revenue, sessions, AOV, etc.). Per-domain failures are captured in an errors section — one thin or unknown domain won't block the rest of the comparison.

Inputs: domains (required), date_from (required), date_to (required), country, +2 more.

grips_get_adwordsGet AdWords spend over timeA
Read-onlyIdempotent

Returns paid-media spend, ad clicks, and CPC for one or more domains — monthly timeseries plus an aggregated roll-up. Use this to evaluate paid-spend trends, auction-cost inflation, or total investment in paid search.

Inputs: domains (required), date_from (required), date_to (required), country, +1 more.

grips_get_channelsGet channel breakdown (Organic, Paid, Direct, etc.)A
Read-onlyIdempotent

Returns revenue, sessions, transactions, CR, and AOV broken out by marketing channel (Organic Search, Paid Search, Direct, Referral, Social) for one or more domains. Use this to understand channel mix, evaluate paid-vs-organic balance, or spot a channel shift over time. Response includes both a monthly timeseries and an aggregated roll-up.

Inputs: date_to (required), domains (required), date_from (required), format, +2 more.

grips_get_daily_performanceGet daily performance (revenue / transactions / sessions)A
Read-onlyIdempotent

Returns a daily timeseries of revenue, transactions, and sessions for one or more domains. Useful for spike/dip detection, promo windows, and day-of-week patterns. Note: Grips only offers daily data for a subset of domains — smaller sites often return empty. Defaults to markdown output.

Inputs: domains (required), date_from (required), date_to (required), country, +1 more.

grips_get_devicesGet device mix (mobile / desktop / tablet)A
Read-onlyIdempotent

Returns device-level revenue, sessions, transactions, CR, and AOV for one or more domains aggregated over a date window. Use this to understand where a competitor's traffic and conversions come from — mobile vs desktop split, AOV by device, etc.

Inputs: domains (required), date_from (required), date_to (required), country, +1 more.

grips_get_domain_performanceGet domain performance (monthly)A
Read-onlyIdempotent

Returns a monthly timeseries of revenue, transactions, sessions, ad cost, AOV, CR, and CPC for one or more domains over a date range. Use this for anything like 'how did adidas.com perform in Q1 2024' or 'compare nike.com and puma.com session volume YoY'. Defaults to markdown output; pass format='json' for structured data.

Inputs: domains (required), date_from (required), date_to (required), country, +1 more.

grips_raw_querySend a raw Grips query (escape hatch)A
Read-onlyIdempotent

Sends an arbitrary Grips GraphQL-like query and returns the raw JSON response. Use this only when the purpose-built tools (domain performance, channels, adwords, devices, daily, compare) don't cover what you need. The response is returned verbatim with no formatting — you are responsible for parsing it.

Inputs: query (required), variables.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool targets a distinct data dimension (domain performance, adwords, channels, devices, daily performance, comparison, raw query) with clear separation. No two tools have overlapping purposes.

    Naming Consistency5/5

    All tools follow a consistent `grips_<verb>_<noun>` pattern in snake_case, with verbs like 'get' and 'compare', and a single exception 'raw_query' still fits the pattern. No mixing of conventions.

    Tool Count5/5

    With 7 tools, the set is well-scoped for an analytics server covering multiple metrics and dimensions. Not too few to be limited, not too many to be overwhelming.

    Completeness4/5

    Core analytics needs are covered, and the raw query tool fills potential gaps. Minor missing areas like product-level data exist, but the surface is largely complete for the stated purpose.

    Related MCP Connectors