PuppyGraph MCP Serverのロゴ

PuppyGraph MCP Server

組織
puppygraph

Model Context Protocol (MCP) server for PuppyGraph, allowing Claude to query the graph using Gremlin and Cypher through Claude Desktop.

公開者puppygraph
リポジトリpuppygraph-mcp-server
言語TypeScript
フォーク
4
スター
8
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスApache-2.0
リンク
  • ツールをAIワークフローに接続

    PuppyGraph MCP Serverは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 利用可能なツール(0個)

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースプロジェクトの注目度

    リンク先のリポジトリには8件のスターと4件のフォークがあります。

PuppyGraph MCP Server

Model Context Protocol (MCP) server for PuppyGraph, allowing Claude to query the graph using Gremlin and Cypher through Claude Desktop.

Features

  • Connect to PuppyGraph instances using both Neo4j Bolt protocol (for Cypher) and WebSocket (for Gremlin)
  • Query graph data using both Gremlin and Cypher query languages
  • Retrieve graph structure and schema information from multiple endpoints
  • Works with Claude Desktop and other MCP-compatible interfaces
  • Robust fallback mechanisms with multiple connection approaches
  • Graceful degradation with sample data when connections fail

Prerequisites

  • Node.js 18+
  • A running PuppyGraph instance (or fallback mode for testing)

Installation

  1. Clone this repository
  2. Install dependencies:
bash
npm install
  1. Build the project:
bash
npm run build

Usage

Start the server:

bash
npm start

Using environment variables:

bash
# Connect to a specific PuppyGraph instance
PUPPYGRAPH_URL=bolt://your-puppygraph-server:7687 PUPPYGRAPH_USERNAME=neo4j PUPPYGRAPH_PASSWORD=your-password npm start

# Connect to both Neo4j and Gremlin endpoints
PUPPYGRAPH_URL=bolt://your-neo4j-server:7687 PUPPYGRAPH_GREMLIN_URL=ws://your-gremlin-server:8182/gremlin npm start

Claude Desktop Configuration

Note: if you're using Claude Desktop to access the tools, make sure that you don't have the server running in a separate terminal. Claude Desktop will start the server itself based on the commands in the MCP config below.

You can set up the MCP server in your Claude Desktop configuration and OPTIONALLY include environment variables directly in the config:

json
{
  "mcpServers": {
    "puppygraph": {
      "command": "node",
      "args": [
        "/path/to/puppygraph-mcp/build/index.js"
      ],
      "env": {
        "PUPPYGRAPH_URL": "bolt://your-neo4j-server:7687",
        "PUPPYGRAPH_USERNAME": "neo4j",
        "PUPPYGRAPH_PASSWORD": "your-password",
        "PUPPYGRAPH_DATABASE": "your-database",
        "PUPPYGRAPH_GREMLIN_URL": "ws://your-gremlin-server:8182/gremlin",
        "PUPPYGRAPH_GREMLIN_USERNAME": "your-username",
        "PUPPYGRAPH_GREMLIN_PASSWORD": "your-password"
      }
    }
  }
}

Replace the paths and connection details with your specific values. The env section allows you to specify all environment variables directly in the configuration file.

Available Tools

  • puppygraph_query: Execute Gremlin or Cypher queries against PuppyGraph
  • puppygraph_schema: Get schema and structure information about the graph
  • puppygraph_status: Check PuppyGraph connection status

Each tool is also available with an mcp__ prefix (e.g., mcp__puppygraph_query) for compatibility with certain LLM platforms.

Environment Variables

Graph Database Connections

Neo4j Connection (Cypher queries)

  • PUPPYGRAPH_URL: URL of the PuppyGraph Neo4j endpoint (default: bolt://localhost:7687)
  • PUPPYGRAPH_USERNAME: Username for PuppyGraph Neo4j authentication (default: neo4j)
  • PUPPYGRAPH_PASSWORD: Password for PuppyGraph Neo4j authentication (default: password)
  • PUPPYGRAPH_DATABASE: Name of the database to connect to (default: "")

Gremlin Connection (Gremlin queries)

  • PUPPYGRAPH_GREMLIN_URL: URL of the PuppyGraph Gremlin endpoint (default: ws://localhost:8182/gremlin)
  • PUPPYGRAPH_GREMLIN_USERNAME: Username for PuppyGraph Gremlin authentication (default: puppygraph)
  • PUPPYGRAPH_GREMLIN_PASSWORD: Password for PuppyGraph Gremlin authentication (default: puppygraph123)
  • PUPPYGRAPH_GREMLIN_TRAVERSAL_SOURCE: Traversal source name (default: g)

Schema API Connection

  • PUPPYGRAPH_SCHEMA_URL: URL of the PuppyGraph schema endpoint (default: http://localhost:8081/schemajson)
  • PUPPYGRAPH_SCHEMA_USERNAME: Username for PuppyGraph schema API authentication (default: puppygraph)
  • PUPPYGRAPH_SCHEMA_PASSWORD: Password for PuppyGraph schema API authentication (default: puppygraph123)

General Settings

  • Note: Fallback mode has been removed. The server will report actual connection errors to provide better transparency.

Connection Troubleshooting

This MCP server includes robust fallback mechanisms for handling various connection issues:

  1. First attempts to connect to PuppyGraph via Neo4j Bolt protocol for Cypher queries
  2. Separately tries to connect via WebSocket for Gremlin queries
  3. For schema information, first attempts the schema endpoint, then falls back to Neo4j queries, then Gremlin queries
  4. If all direct connections fail, clear error messages will be reported

Connection failures in one protocol won't prevent using another - for example, if Neo4j connection fails but Gremlin succeeds, you'll still be able to run Gremlin queries.

Connection Verification

You can verify connections using the following methods:

  1. Check the server startup logs for connection status
  2. Use the puppygraph_status tool in Claude
  3. Test with a simple query:
Use the PuppyGraph tool to execute this Cypher query:
MATCH (n) RETURN count(n)

Troubleshooting

If you're encountering issues with connections:

  • Ensure the remote server is running and accessible from your network
  • Check that firewall rules allow connections to the appropriate ports
  • Verify your authentication credentials are correct
  • Examine the server logs for detailed error information
  • For Gremlin, ensure the WebSocket URL starts with ws:// or wss://

You can check connection status using the puppygraph_status tool at any time.

Testing

The PuppyGraph MCP server includes a comprehensive testing suite that follows best practices for testing MCP servers:

bash
# Run all tests
npm test

# Run tests in watch mode during development
npm run test:watch

# Run tests with coverage report
npm run test:coverage

Test Structure

  • Unit Tests: Located in tests/unit/ directory, these test individual components in isolation with mocks for dependencies
  • Integration Tests: Located in tests/integration/ directory, these test how components work together, including end-to-end tests of the MCP server

Testing Best Practices

  1. Mock External Dependencies: All external services (Neo4j, Gremlin, HTTP endpoints) are mocked to avoid test flakiness
  2. Test MCP Protocol: Tests verify that the server adheres to the Model Context Protocol
  3. Coverage: Aim for high test coverage, especially for critical paths
  4. Error Handling: Tests explicitly verify error handling behavior

License

Apache 2.0

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "puppygraph-puppygraph-mcp-server": {
      "command": "",
      "args": []
    }
  }
}

PuppyGraph MCP ServerのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度PuppyGraph MCP Serverに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」→「詳細設定」→「Model Context Protocol」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「Model Context Protocol」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

PuppyGraph MCP Serverをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. PuppyGraph MCP ServerのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタのステータスが「準備完了」のままか確認するには、画面を更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "puppygraph-puppygraph-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "puppygraph-mcp"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてPuppyGraph MCP ServerのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. PuppyGraph MCP ServerのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
PuppyGraph MCP Serverを使ってこのタスクを手伝ってもらえますか?
PuppyGraph MCP Server
はい、読みました。
PuppyGraph MCP Serverで調べた結果をお伝えします。

よくある質問

PuppyGraph MCP Server MCPサーバーは何に使いますか?

PuppyGraph MCP Serverは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでは、複数のAIモデルでPuppyGraph MCP Server MCPを利用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでPuppyGraph MCP Serverを利用できます。

TypingMindでPuppyGraph MCP Server MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けのトップクラスのフロントエンドです。PuppyGraph MCP Serverを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

PuppyGraph MCP Server MCPをTypingMindに接続するにはどうすればよいですか?

PuppyGraph MCP ServerはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでPuppyGraph MCP Server MCPのどのようなツールを利用できますか?

PuppyGraph MCP ServerはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

PuppyGraph MCP Server MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。PuppyGraph MCP Serverで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇