Skip to main content
Glama

MCP Neo4j Server

by da-okazaki

MCP Neo4j サーバー

Neo4j グラフ データベースと Claude Desktop の統合を提供し、自然言語による対話を通じてグラフ データベースの操作を可能にする MCP サーバーです。

クイックスタート

npx を使用してこの MCP サーバーを直接実行できます。

npx @alanse/mcp-neo4j

または、Claude Desktop 構成に追加します。

{ "mcpServers": { "neo4j": { "command": "npx", "args": ["@alanse/mcp-neo4j-server"], "env": { "NEO4J_URI": "bolt://localhost:7687", "NEO4J_USERNAME": "neo4j", "NEO4J_PASSWORD": "your-password" } } } }

特徴

このサーバーは、Neo4j データベースと対話するためのツールを提供します。

ツール

  • execute_query : Neo4j データベースで Cypher クエリを実行する
    • すべてのタイプの Cypher クエリ (READ、CREATE、UPDATE、DELETE) をサポートします
    • クエリ結果を構造化された形式で返します
    • インジェクション攻撃を防ぐためにパラメータを渡すことができる
  • create_node : グラフデータベースに新しいノードを作成する
    • ノードラベルとプロパティを指定する
    • 作成されたノードをその内部IDとともに返します
    • プロパティのすべてのNeo4jデータ型をサポート
  • create_relationship : 既存の2つのノード間に関係を作成する
    • 関係の種類と方向を定義する
    • 関係にプロパティを追加する
    • ソースノードとターゲットノードのノードIDが必要です

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の MCP Neo4j Server を自動的にインストールするには:

npx -y @smithery/cli install @alanse/mcp-neo4j-server --client claude

開発のために

  1. リポジトリをクローンします。
git clone https://github.com/da-okazaki/mcp-neo4j-server.git cd mcp-neo4j-server
  1. 依存関係をインストールします:
npm install
  1. プロジェクトをビルドします。
npm run build

構成

サーバーには次の環境変数が必要です。

  • NEO4J_URI : Neo4j データベース URI (デフォルト: bolt://localhost:7687)
  • NEO4J_USERNAME : Neo4j ユーザー名 (デフォルト: neo4j)
  • NEO4J_PASSWORD : Neo4j パスワード (必須)

使用例

自然言語を使用して Neo4j データベースと対話する方法の例を次に示します。

データのクエリ

次のような質問をすることができます。

  • 「営業部の従業員全員を表示」
  • 「最も年長の顧客上位5人を見つける」
  • 「先月3つ以上の商品を購入した人は誰ですか?」

例:

User: "Show me all employees in the Sales department" Claude: Let me query the database for Sales department employees. [Executes query internally: MATCH (e:Employee)-[:WORKS_IN]->(d:Department {name: 'Sales'}) RETURN e.name, e.position] Result: - John Smith (Sales Manager) - Sarah Johnson (Sales Representative) - Mike Brown (Account Executive)

データの作成

次のような指示を与えることができます:

  • 「30歳のJohn Doeという新しい人物を追加します」
  • 「価格24.99ドルの『プレミアムコーヒー』という商品を作成する」
  • 「『研究開発』という新しい部門を追加する」

例:

User: "Add a new person named John Doe who is 30 years old" Claude: I'll create a new Person node with the provided information. [Creates node internally with label 'Person' and properties {name: 'John Doe', age: 30}] Result: Created new person node with ID: 123

関係を築く

次のような関係をリクエストできます:

  • 「ジョン・ドウをジェーン・スミスと友達にする」
  • 「製品Aを製品Bのコンポーネントとして設定する」
  • 「John Doeを営業部に割り当てる」

例:

User: "Make John Doe friends with Jane Smith" Claude: I'll create a friendship relationship between these two people. [Creates relationship internally: MATCH (a:Person {name: 'John Doe'}), (b:Person {name: 'Jane Smith'}) CREATE (a)-[:FRIENDS_WITH {since: '2024-01-05'}]->(b)] Result: Created friendship relationship between John Doe and Jane Smith

複雑な操作

自然言語を使用すると、より複雑な操作を実行できます。

  • 「ニューヨーク在住の顧客が購入したすべての商品を検索する」
  • 「John Doeの友達の友達を表示」
  • 「各部門の従業員の平均年齢を計算する」

例:

User: "Find all products purchased by customers who live in New York" Claude: I'll query the database for this information. [Executes query internally: MATCH (c:Customer {city: 'New York'})-[:PURCHASED]->(p:Product) RETURN c.name, collect(p.name) as products] Result: - Alice Wilson: [Premium Coffee, Tea Set, Cookies] - Bob Miller: [Premium Coffee, Water Bottle]

テスト

テスト スイートを実行します。

npm test

ライセンス

マサチューセッツ工科大学

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

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

このサーバーは、Neo4j データベースと Claude Desktop 間の相互作用を可能にし、ユーザーが Cypher クエリを実行し、ノードを作成し、データベース内で関係を確立できるようにします。

  1. クイックスタート
    1. 特徴
      1. ツール
    2. インストール
      1. Smithery経由でインストール
      2. 開発のために
    3. 構成
      1. 使用例
        1. データのクエリ
        2. データの作成
        3. 関係を築く
        4. 複雑な操作
      2. テスト
        1. ライセンス

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            This lets you use Claude Desktop, or any MCP Client, to use natural language to accomplish things with Neo4j and your Aura account.
            Last updated -
            421
            Python
            MIT License
          • -
            security
            A
            license
            -
            quality
            Enables interaction with NeoDB, a social book cataloging service, by providing tools to fetch user info, search books, and retrieve detailed book information through its API.
            Last updated -
            2
            Python
            MIT License
            • Apple
          • -
            security
            F
            license
            -
            quality
            A fork of the Neo4j Model Context Protocol server that enables interaction with Neo4j knowledge graphs through environment variable configuration and improved options for remote connections.
            Last updated -
            1
            TypeScript
          • -
            security
            F
            license
            -
            quality
            An MCP server that enables graph database interactions with Neo4j, allowing users to access and manipulate graph data through natural language commands.
            Last updated -
            Python

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/da-okazaki/mcp-neo4j-server'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server