Skip to main content
Glama

ГxP MDM MCP Server - Claude / ChatGPT / Cursor 向け Cypher ツール

このMCPサーバーは、Computerized System Inventory(コンピュータ化システム台帳)を Knowledge Graph として公開し、Cypherクエリで探索できるようにします。Claude / ChatGPT エージェントは、ハルシネーションを起こすことなく GxP マスタデータをクエリできます。

アーキテクチャ

Claude / ChatGPT / Cursor
        |
        | MCP (stdio)
        v
  mcp_server.py (14 tools)
        |
        | Cypher queries
        v
  Neo4j (or MOCK mode: NetworkX + JSON) <- your MDM golden record

Cypherの理由

  • Blast radius(爆発範囲) はグラフ探索: MATCH (start)-[:SENDS_VIA*1..3]->(downstream) — SQLでは不可能

  • データ・リネージ — ALCOA+ 調査対応

  • 規制のグラント・トゥース — エージェントは Cypher が返す条項だけを引用でき、ハルシネーションを防ぐ

Related MCP server: NOMIK

公開される14のツール

Tool

Cypher

説明

cypher_qu레리

カスタム

探索のための安全なサイレ専用 Cypher

list_all_ys_세스

BYPher

全台提交 — 監査官がまずた理情報

get_system_details

Full subgraph

システム + 機能 + 電子記録 + 提供者 + インターフュース

get_blast_radius

MATCH (start)-[:SENDS_VER*1..$depth]->(ダウンストリーム)

キラーアプリ: 変更が影響する下流Gシステムは?

get_upstream_lineage

逆方向トラバーサル

データはどこから来るのか?

get_applicable_requations

( s)-[:HAS_FUNCTION]->( f)-[:REGULATED_BY]->(reg)

ハルシドーション対策: 引用できるのはこれらの条項のみ

get_system_interfaces

( s)-[flow:SENDS_VIA]->( target)

API/ファイル/手動インターフェース(GxP フЛА)。

find_vale**idation_gaps

#where NOT Validated

未バルーだの GxP Direct システム

find_periodic_review_overdue

WHERE next_review < date()

期限超過の定期レビュー

find_system_interfaces> ...

WHERE is_gxp_critical AND risk=High

電子署名、バッチリリース、力価

get_supplier_risk

( s)-[:SUPPLIED_BY]->(sup)

サプライヤ監査ステータス、SOC2

get_data_lineage

MATCH (s)-[:GENERATES]->( e: Electronic Record)

レコード種のリネージ

get_data_ خط

...

GxP Direct インベント

assess_change_impact

複合

3つのCypherクエリを定向 + GAMP/CSAに基づく影響空設を生成

クイックスタート(Neo4jの not 不要 — Mock Mode)

cd gxp_mdm_mcp_server
pip install -r requirements.txt

# Mock mode: uses JSON + NetworkX, no Neo4j required
python scripts/test_tools.py

# Should show:
# - List 4 systems
# - Veeva QMS details with downstream SAP
# - Blast radius: Veeva -> SAP
# - REJECT for audit trail purge
# - Minor for version upgrade

モックモードは POC と Clo Large testにきわしいです。

DAC / Neo4j を利用 for 本番

# .env - set Neo4j creds
cp .env.example .env
# Edit .env with your Neo4j URI

# Start Neo4j
docker-compose up -d neo4j

# Load sample data + schema
python scripts/load_sample_data.py

# Test with Neo4j
python scripts/test_tools.py

# Start API harness (optional)
uvicorn src.api_server:app --reload --port 8000
# http://localhost:8000/cypher/list_all_systems
# http://localhost:8000/cypher/blast_radius?system_id=SYS-VEEVA-QMS-001

Claude Desktop Configuration

  1. Claude Desktop の設定を算出: ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) か %APPDATA%/Claude/claude_desktop_config.json (Windows)

  2. 追加 (妥当な絶対パスを使):

{
  "mcpServers": {
    "gxp-mdm-cypher": {
      "command": "python",
      "args": ["/absolute/path/to/gxp_mdm_mcp_server/src/mcp_server.py"],
      "env": {
        "NEO4J_URI": "",
        "NEO4J_USERNAME": "neo4j",
        "NEO4J_PASSWORD": "password"
      }
    }
  }
}

モックモードの場合は、 NEO4J_URI に何も設定しない。Neo4j の時は、 bolt://localhost:7687 を設定。

  1. Claude Desktopを再起動。 🔌 の下に 14 ツールが表示される。

  2. プール big:

List all GxP Direct systems in my inventory
> calls list_all_systems(gxp_impact="Direct")

What happens if I change Veeva QMS? Show blast radius
> calls get_blast_radius(system_id="SYS-VEEVA-QMS-001")

Assess this change: Enable audit trail purge after 7 years for Veeva QMS
> calls assess_change_impact -> should REJECT per 21CFR11.10(e)

Assess Veeva upgrade from 24R1 to 24R2 with no e-sig change
> calls assess_change_impact -> should be Minor per CSA low risk

Cursor Configuration

config/cursor_config.json.example を見て、.cursor/mcp.json に追加。

ChatG***PT (MCP support in)

ChatGP T Custom GPT with MCP は、config/chatgp_t_mcp_config.json を参考。ChatGPT が stdio でツール酉呼び出し。

Cypher クエリ — Ground Truth

すべてのクエリは src/cypher_tools.py。主要 ones:

Blast radius (the moat):

MATCH (start:ComputerizedSystem {system_id: $system_id})
MATCH path = (start)-[:SENDS_VIA*1..$depth]->(downstream:ComputerizedSystem)
WHERE downstream.gxp_impact IN ['Direct', 'GxP Relevant']
RETURN downstream.system_id, length(path) as distance

Regulation anti-hallucination:

MATCH (s:ComputerizedSystem {system_id: $system_id})
OPTIONAL MATCH (s)-[:HAS_FUNCTION]->(f)-[:REGULATED_BY]->(reg)
RETURN collect(DISTINCT reg) as regulations

Agent must ONLY cite clause_ids returned here.

From POC to Production

  1. Replace data/*. json will use 実際の Vaevの Vault API + ServiceNow CMDB + Okta

  2. Add write tools (approval /workflow) curation of validation_status

  3. Add vector search tool for regulation RAG (embed GAMP 5 2nd Edition)

  4. Add periodic review agent that calls find_ periodic_review_overdue

Your own everything**: Now you own the layer that every CSV agent will need.

Troubleshooting

  • No module named mcp: pip install mcp

  • Claude / find tools: Check absolute path in config, restart Claude, check logs ~/Library/Logs/Claude/mcp*.log

  • Ne4j connection fails: automatically fallback to mock — see NEO4J_URI

Good luck cornering the market.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Transforms code repositories and development documentation into a queryable Neo4j knowledge graph, enabling AI assistants to perform intelligent code analysis, dependency mapping, impact assessment, and automated documentation generation across 15+ programming languages.
    7
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    AI-native code intelligence graph that builds a persistent knowledge graph of your codebase in Neo4j and exposes it to AI assistants via MCP, enabling contextual code analysis, impact analysis, and dependency tracking.
    23
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to query architecture context, data contracts, and blast radius to prevent cross-repo architectural breakage before merging.
    24
    Apache 2.0