Skip to main content
Glama
FileMaker MCP Server

FileMaker MCP Server

by ta-toshio

Jaou Ensatsu Kokuryu FileMaker MCP

FileMaker Data API を通じてデータベース分析・メタデータ抽出を行う MCP(Model Context Protocol)サーバーです。

特徴

  • 読み取り専用: データの安全性を確保(作成・更新・削除は非対応)

  • メタデータ集約: レイアウト、フィールド、スクリプト情報を一括取得

  • リレーション推測: フィールド名パターンから関係性を推測(disclaimer付き)

  • グローバル検索: 複数レイアウトを横断したデータ検索

  • セキュリティ重視: パスワードのログ出力禁止、ファイルシステム書き込み禁止

Related MCP server: mcp-dataview

クイックスタート

1. ビルド

pnpm install
pnpm run build

2. MCP 設定

本MCPサーバーは、Claude Code、Cursor、Codex など MCP 対応のAIエディタで使用できます。

Claude Code

方法 A: コマンドラインで追加(推奨)

claude mcp add filemaker \
  --transport stdio \
  --scope project \
  --env FM_SERVER=https://your-server.com \
  --env FM_DATABASE=your-database \
  --env FM_USERNAME=your-username \
  --env FM_PASSWORD=your-password \
  -- node /path/to/jaou-ensatsu-kokuryu-filemaker-mcp/dist/index.js

スコープオプション

説明

--scope user

全プロジェクト共通(~/.claude.json に保存)

--scope project

現在のプロジェクトのみ(.mcp.json に保存、Git管理可能)

方法 B: 設定ファイルを直接編集

~/.claude.json に以下を追加:

{
  "mcpServers": {
    "filemaker": {
      "command": "node",
      "args": ["/path/to/jaou-ensatsu-kokuryu-filemaker-mcp/dist/index.js"],
      "env": {
        "FM_SERVER": "https://your-server.com",
        "FM_DATABASE": "your-database",
        "FM_USERNAME": "your-username",
        "FM_PASSWORD": "your-password"
      }
    }
  }
}

Note: Claude Desktop を使用する場合は ~/Library/Application Support/Claude/claude_desktop_config.json(macOS)に同様の設定を追加してください。

Cursor

~/.cursor/mcp.json(グローバル)または .cursor/mcp.json(プロジェクト)に以下を追加:

{
  "mcpServers": {
    "filemaker": {
      "command": "node",
      "args": ["/path/to/jaou-ensatsu-kokuryu-filemaker-mcp/dist/index.js"],
      "env": {
        "FM_SERVER": "https://your-server.com",
        "FM_DATABASE": "your-database",
        "FM_USERNAME": "your-username",
        "FM_PASSWORD": "your-password"
      }
    }
  }
}

設定後、Cursor の設定画面(File → Preferences → Cursor Settings → MCP)で「Available Tools」に表示されることを確認してください。

Codex (OpenAI)

方法 A: コマンドラインで追加

codex mcp add filemaker \
  --env FM_SERVER=https://your-server.com \
  --env FM_DATABASE=your-database \
  --env FM_USERNAME=your-username \
  --env FM_PASSWORD=your-password \
  -- node /path/to/jaou-ensatsu-kokuryu-filemaker-mcp/dist/index.js

方法 B: 設定ファイルを直接編集

~/.codex/config.toml に以下を追加:

[mcp_servers.filemaker]
command = "node"
args = ["/path/to/jaou-ensatsu-kokuryu-filemaker-mcp/dist/index.js"]

[mcp_servers.filemaker.env]
FM_SERVER = "https://your-server.com"
FM_DATABASE = "your-database"
FM_USERNAME = "your-username"
FM_PASSWORD = "your-password"

Note: Codex は CLI と VSCode 拡張機能で設定ファイルを共有しています。

3. 使用例

MCP設定後、AIエディタを起動すると FileMaker MCP ツールが利用可能になります。

# 使用例(AI への指示)
「FileMaker にログインして、顧客レイアウトのフィールド一覧を取得してください」
「売上データベースのメタデータをエクスポートしてください」
「注文テーブルで"東京"を含むレコードを検索してください」

提供ツール(16ツール)

認証系

ツール

説明

fm_login

FileMaker サーバーへのログイン

fm_logout

セッション終了

fm_validate_session

セッション有効性確認

メタデータ取得系

ツール

説明

fm_get_layouts

レイアウト一覧取得

fm_get_layout_metadata

フィールド定義取得

fm_get_scripts

スクリプト一覧取得

fm_list_value_lists

値一覧取得

レコード操作系(読み取りのみ)

ツール

説明

fm_get_records

レコード取得(ページング対応)

fm_get_record_by_id

ID指定でレコード取得

fm_find_records

検索クエリでレコード取得

fm_get_record_count

レコード件数取得

分析系

ツール

説明

fm_export_database_metadata

メタデータ一括エクスポート

fm_infer_relationships

リレーション推測

fm_analyze_portal_data

ポータル構造分析

fm_global_search_data

複数レイアウト横断検索

fm_global_search_fields

フィールド名検索


主要ツールの使用例

fm_login - ログイン

環境変数が設定されている場合、引数なしでログイン可能:

// 入力(環境変数使用)
{}

// 入力(引数指定)
{
  "server": "https://your-server.com",
  "database": "YourDB",
  "username": "admin",
  "password": "password123"
}

// 出力
{
  "success": true,
  "message": "Login successful"
}

fm_get_layout_metadata - レイアウトメタデータ取得

// 入力
{
  "layout": "顧客マスタ"
}

// 出力
{
  "success": true,
  "layout": "顧客マスタ",
  "fields": [
    {
      "name": "顧客ID",
      "type": "normal",
      "result": "number",
      "autoEnter": true
    },
    {
      "name": "顧客名",
      "type": "normal",
      "result": "text"
    }
  ],
  "portalNames": ["注文履歴", "連絡先"]
}

fm_find_records - レコード検索

// 入力
{
  "layout": "注文",
  "query": [
    { "顧客名": "田中*" },
    { "都道府県": "東京都" }
  ],
  "sort": [
    { "fieldName": "注文日", "sortOrder": "descend" }
  ],
  "limit": 50
}

// 出力
{
  "success": true,
  "records": [...],
  "dataInfo": {
    "foundCount": 25,
    "returnedCount": 25,
    "totalRecordCount": 1500
  }
}

fm_export_database_metadata - メタデータエクスポート

// 入力
{
  "includeFields": true,
  "includeScripts": true
}

// 出力
{
  "success": true,
  "database": "SalesDB",
  "exportedAt": "2026-01-03T12:00:00Z",
  "layouts": [...],
  "scripts": [...]
}

環境変数

変数名

必須

デフォルト

説明

FM_SERVER

Yes

-

FileMaker サーバー URL(HTTPS必須)

FM_DATABASE

Yes

-

データベース名

FM_USERNAME

Yes

-

ユーザー名

FM_PASSWORD

Yes

-

パスワード

FM_API_VERSION

No

vLatest

Data API バージョン

FM_SSL_VERIFY

No

true

SSL 証明書検証(開発環境でのみfalse可)

FM_SESSION_TIMEOUT

No

840

セッションタイムアウト(秒)

LOG_LEVEL

No

warn

ログレベル(debug, info, warn, error)


開発

環境構築

pnpm install
cp .env.example .env  # テスト実行用

コマンド

pnpm run build       # ビルド
pnpm test            # テスト実行
pnpm run typecheck   # 型チェック
pnpm run lint        # リント
pnpm run lint:fix    # リント自動修正

制限事項

  • FileMaker Data API の制約により、テーブル一覧やリレーション定義の直接取得は不可

  • レイアウトに配置されたフィールドのみ操作可能

  • fm_infer_relationships の結果は推測であり、実際のリレーション定義と異なる場合あり

  • 読み取り専用(レコードの作成・更新・削除は非対応)


参考プロジェクト

本プロジェクトは以下のオープンソースプロジェクトを参考に設計・実装しました:

プロジェクト

作者

説明

FileMaker-Server-DAPI-MCP

Francesc Sans

FileMaker Data API MCP サーバー(接続管理機能)

filemaker-mcp-server

Max Petrusenko

DDRエクスポート・リレーション分析機能を持つ MCP サーバー

両プロジェクトともMITライセンスで公開されています。


ライセンス

MIT

Available Tools

16 tools
fm_analyze_portal_dataC

指定されたレイアウト内のポータル構造を詳細に分析します。各ポータルのフィールド定義、推測される関連テーブル名、サンプルデータ(オプション)を取得できます。この機能はData APIで完全にサポートされています。

Inputs: layout (required), includeSampleData, sampleLimit.

fm_export_database_metadataA

データベースの構造情報(レイアウト、フィールド、スクリプト、値一覧)を集約してエクスポートします。注意: FileMaker Data APIの制約により、真のDDR(Database Design Report)ではありません。リレーションシップ定義、計算式、スクリプト内容は取得できません。

Inputs: format (required), options.

fm_find_recordsC

検索条件に一致するレコードを検索します。

Inputs: layout (required), query (required), sort, limit, +1 more.

fm_get_layout_metadataC

指定されたレイアウトのフィールド定義、ポータル情報、値一覧を取得します。

Inputs: layout (required).

fm_get_layoutsB

データベース内のすべてのレイアウト一覧を取得します。

Inputs: no named parameters.

fm_get_record_by_idC

指定されたレコードIDのレコードを取得します。

Inputs: layout (required), recordId (required).

fm_get_record_countA

指定されたレイアウトの総レコード数を取得します。レコードデータは取得せず、カウントのみを効率的に返します。

Inputs: layout (required).

fm_get_recordsC

指定されたレイアウトからレコードを取得します(ページング対応)。

Inputs: layout (required), limit, offset.

fm_get_scriptsB

データベース内のすべてのスクリプト一覧を取得します。

Inputs: no named parameters.

fm_global_search_dataA

複数のレイアウトを横断してデータを検索します。各レイアウトのテキストフィールドに対してOR検索を実行し、結果を集約します。注意: 大量のレイアウトを指定するとパフォーマンスに影響します。

Inputs: searchText (required), layouts (required), options.

fm_global_search_fieldsB

全レイアウトを横断してフィールドを検索します。フィールド名のパターンやフィールドタイプでフィルタリングできます。データベース構造の調査やフィールド命名規則の確認に便利です。

Inputs: fieldName, fieldType, options.

fm_infer_relationshipsA

指定されたレイアウトのポータルとフィールド名パターンからリレーションシップを推測します。重要: すべての結果は「推測」であり、実際のFileMakerリレーションシップ定義とは異なる可能性があります。信頼度(confidence)を必ず確認してください。

Inputs: layout (required), depth.

fm_list_value_listsC

指定されたレイアウトで利用可能な値一覧(Value Lists)を取得します。フィールドに設定されたドロップダウン選択肢などを確認できます。

Inputs: layout (required).

fm_loginA

FileMakerサーバーにログインしてセッションを確立します。環境変数から認証情報を読み込む場合はパラメータを省略できます。

Inputs: server, database, username, password.

fm_logoutB

現在のセッションを終了します。

Inputs: no named parameters.

fm_validate_sessionC

セッションが有効かどうかを確認します。

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 16 tools

    Disambiguation4/5

    Most tools have distinct purposes, but there is some overlap between fm_get_layout_metadata and fm_analyze_portal_data (both analyze layout structure), and between fm_find_records and fm_global_search_data (both search records). Descriptions help differentiate them, but an agent might occasionally misselect.

    Naming Consistency5/5

    All tools follow a consistent fm_verb_noun naming pattern, using snake_case throughout. The verbs are clear and descriptive (e.g., get, list, analyze, export), making the set predictable and easy to understand.

    Tool Count4/5

    16 tools is slightly high but reasonable for a FileMaker database management server, covering metadata, data operations, search, and session management. It feels comprehensive without being overwhelming, though some tools could potentially be consolidated.

    Completeness5/5

    The toolset provides complete coverage for FileMaker Data API interactions, including session management (login/logout/validate), metadata retrieval (layouts, fields, scripts, value lists), data operations (CRUD with find/get/count), and advanced analysis (portal data, relationships, global search). No obvious gaps exist for the stated domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables read-only file-management operations from AI assistants, including health checks, connection and folder listings, search, share-link resolution, metadata retrieval, and on-demand document reading.
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables secure, read-only querying of only predefined logical database views through MCP tools and a REST API, using validated SQL and semantic view metadata.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables read-only interaction with a Databricks workspace, exposing catalog metadata and bounded SQL querying while preserving caller identity through OAuth-protected authorization.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables read-only querying of payments and billing data via the full official REST API, covering customers, charges, payment intents, subscriptions, invoices, refunds, and more.
      MIT