MCP server for PuppyGraph

MCP server for PuppyGraph

puppygraph-mcp-server•bypuppygraph

An MCP server that lets AI agents connect PuppyGraph to data sources, build graph schemas, and query graphs with Cypher or Gremlin.

License: Apache 2.0•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Runs Cypher or Gremlin queries and returns rows, query warnings, and error messages on failure.
  • •Returns the graph schema of node and edge labels and attributes, with large schemas reduced to structure only.
  • •Registers data sources such as databases, warehouses, lakes, or DuckDB files as catalogs and tests they are readable.
  • •Validates and uploads graph schemas, and edits individual node or edge types of an installed schema.

BEST FOR

  • •Building a graph schema from an existing relational database or data warehouse through an AI agent.
  • •Querying an existing PuppyGraph graph with Cypher or Gremlin from a chat-based coding assistant.
  • •Restricting an agent to read-only interactions with production graph data.

ABOUT PUPPYGRAPH-MCP-SERVER

MCP server for PuppyGraph is cataloged as an MCP server attributed to puppygraph. An MCP server that lets AI agents connect PuppyGraph to data sources, build graph schemas, and query graphs with Cypher or Gremlin. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Apache 2.0. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP server for PuppyGraph are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Can the server prevent an agent from writing to PuppyGraph?

Yes; enabling read-only mode rejects Cypher and Gremlin write operations before they reach PuppyGraph and withholds the schema-changing tools.

What happens when a schema upload is attempted while a schema is already installed?

The upload is refused unless replace is set to true, and the refusal names the installed version and labels.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 816e45ad55ca · 采集于 2026-11-13 10:25:44 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

PuppyGraph MCP Server

Model Context Protocol (MCP) server for PuppyGraph. It lets AI agents such as Claude Code, Claude Desktop and Cursor connect PuppyGraph to your data, build a graph schema, and query the graph with Cypher or Gremlin.

npx -y @puppygraph/mcp-server

Tools

ToolWhat it does
puppygraph_queryRuns a Cypher or Gremlin query and returns the rows, PuppyGraph's query warnings, and on failure PuppyGraph's error message
puppygraph_schemaReturns the graph schema (node and edge labels, attributes); a large schema comes back as its structure only
puppygraph_statusReports the connection status and whether read-only mode is on

Each of these three tools is also available with an mcp__ prefix (e.g. mcp__puppygraph_query) for compatibility with some LLM platforms.

Setup tools, to go from an empty PuppyGraph to a graph you can query. They match what the PuppyGraph web UI's AI assistant can do:

ToolWhat it does
puppygraph_guideHow to use these tools: the steps to query a graph or build one, and the rules for correct keys, types and edges
puppygraph_catalog_specThe supported catalog types, and one type's connection fields with their exact names
puppygraph_list_catalogsLists the registered data sources (catalogs), credentials masked
puppygraph_create_catalogRegisters a data source (database, warehouse, lake or DuckDB file) as a catalog
puppygraph_test_catalogChecks that PuppyGraph can read data through a catalog
puppygraph_list_tablesLists a catalog's databases, or the tables in one of them
puppygraph_describe_tableLists a table's columns and their PuppyGraph types
puppygraph_sample_tableReturns a few rows of a table
puppygraph_profile_columnProfiles a column: null and distinct counts, whether it can be an id or references another table
puppygraph_table_row_countCounts the rows of a table
puppygraph_check_joinChecks from the data how many values of one column exist in another table's column
puppygraph_schema_templateReturns an annotated example of a 1.x graph schema
puppygraph_validate_schemaDry-runs a schema without changing anything: its structure, that its tables and columns exist, that each type matches the source column, and that edge keys match the ids of the nodes they point at
puppygraph_upload_schemaInstalls a whole schema; replacing an installed schema needs replace: true
puppygraph_search_schemaFinds node and edge types in the installed schema by keyword
puppygraph_get_schema_elementShows one node or edge: ids, attributes, source table, keys, and the relationship label to use in Cypher
puppygraph_add_node, puppygraph_update_node, puppygraph_remove_nodeChanges one node type of the installed schema
puppygraph_add_edge, puppygraph_update_edge, puppygraph_remove_edgeChanges one edge type of the installed schema
puppygraph_add_node_attribute, puppygraph_add_edge_attributeAdds one attribute to a node or edge type
puppygraph_check_edgesChecks the installed graph against its data: for each edge type, how many rows reach an existing source and target node, and whether node ids are unique

puppygraph_create_catalog, puppygraph_upload_schema and the add/update/remove tools change PuppyGraph and are not available in read-only mode. The setup tools need PuppyGraph 1.x and use its HTTP API on port 8081.

Building a schema one element at a time

The add/update/remove tools change one node or edge of the installed schema and leave the rest alone, like the AI assistant in the PuppyGraph web UI. PuppyGraph serves those changes only to its own UI, so the MCP server reads the installed schema, changes the element, checks it (columns, types, keys) and uploads the whole schema. It refuses if the installed schema changed in the meantime, and it changes nothing when the element has a problem.

Checking the graph

A graph can be valid and still wrong: a join on the wrong column, an edge pointing the wrong way, or a non-unique node id all upload without error. puppygraph_check_edges counts, for each edge type, the edge rows and how many of them reach an existing source node and target node, and compares each node type's rows with its distinct ids. It works on every PuppyGraph 1.x and needs no data-probing permission. After an upload, the schema tools also wait a few seconds for new labels to answer, because PuppyGraph can answer the first queries after an upload with 0 rows.

When PuppyGraph can't be reached, the tools return an error. They never return made-up data.

Data probing

puppygraph_sample_table, puppygraph_profile_column, puppygraph_table_row_count and puppygraph_check_join read the source tables, so the agent picks ids and edges from the data rather than from column names alone. They are the same probes the PuppyGraph web UI's AI assistant uses, and they need a PuppyGraph release newer than 1.14. On older versions they return error_type: "NOT_SUPPORTED", and the agent falls back to column names and types and should say that its keys and joins are unverified.

  • Sample rows, sample values and min/max values go into the conversation with the agent's model.
  • The PuppyGraph user needs the DATA:read permission.
  • On a catalog used by a graph with row-level security, only administrators can probe, because probes read the tables without the row filters.
  • A PuppyGraph server can be set to return counts only: puppygraph_sample_table is then refused, and the other probes return counts without values.

They only read, so they stay available in read-only mode.

The same guide is available as the puppygraph_guide tool, as the read-only resource puppygraph://guide and, shortened, as the server's MCP instructions; puppygraph://schema is the current graph schema. Some clients never look at resources or instructions, so the tool descriptions point to puppygraph_guide too.

Connecting data

  • Databases (PostgreSQL, MySQL, SQL Server, Oracle, ...): jdbc_uri, username and password_env. PuppyGraph doesn't ship the MySQL driver: pass driver_url (the tool suggests the official connector on Maven Central). MySQL 8 usually also needs ?allowPublicKeyRetrieval=true&useSSL=false in the URI.
  • Lakes and warehouses (Iceberg, Delta Lake, Hive, Hudi, BigQuery, Snowflake key pair, Databricks, ...): the fields have the names of the PuppyGraph catalog form. puppygraph_catalog_spec lists them per type, and puppygraph_create_catalog checks options against them before connecting. The form definition is bundled from the PuppyGraph source; regenerate it with node scripts/update-catalog-spec.mjs <puppygraph>/frontend/control/chat/catalogform/definition.json.
  • CSV and Parquet files: create tables or views over them in a DuckDB file, mount it into the PuppyGraph container, and register it as type duckdb with jdbc:duckdb:/path/in/container.duckdb. For files on S3, use an Iceberg, Delta Lake or Hive catalog: DuckDB's S3 settings aren't saved in the file, so queries through it fail.
  • Common connection errors come back with a hint (and a suggested_jdbc_uri or suggested_driver_url where there is one). While PuppyGraph is still starting, the tools answer error_type: "STARTING".

Quick start

  1. Start PuppyGraph (Docker):

    docker run -d --name puppy --pull=always \
      -p 8081:8081 -p 8182:8182 -p 7687:7687 \
      -e PUPPYGRAPH_PASSWORD=puppygraph123 \
      --add-host=host.docker.internal:host-gateway \
      puppygraph/puppygraph:latest
    
  2. Add the MCP server to your client (below). With PuppyGraph on localhost and the default credentials, no configuration is needed.

  3. Ask your agent to build a graph from your data, for example "Use PuppyGraph to connect to my Postgres at jdbc:postgresql://db:5432/shop and find customers who share a payment card", or, if a schema is already loaded, "What's in my PuppyGraph graph?".

    PuppyGraph connects to your database itself, so the JDBC URI must use an address that the PuppyGraph container can reach (e.g. host.docker.internal for a database on your machine, not localhost; the --add-host flag above makes that name work on Linux). If an agent uses localhost anyway, puppygraph_create_catalog fails with error_type: HOST_UNREACHABLE_FROM_PUPPYGRAPH, a hint and a suggested_jdbc_uri to retry with. You can also connect data and build the schema in the web UI at http://localhost:8081 (sign in as puppygraph / puppygraph123); see the PuppyGraph docs.

Requires Node.js 20 or later.

Client setup

Claude Code

claude mcp add puppygraph -- npx -y @puppygraph/mcp-server

With a remote PuppyGraph or other credentials, pass environment variables with -e:

claude mcp add puppygraph \
  -e PUPPYGRAPH_URL=bolt://puppygraph.example.com:7687 \
  -e PUPPYGRAPH_GREMLIN_URL=ws://puppygraph.example.com:8182/gremlin \
  -e PUPPYGRAPH_SCHEMA_URL=http://puppygraph.example.com:8081/schemajson \
  -e PUPPYGRAPH_PASSWORD=your-password \
  -e PUPPYGRAPH_GREMLIN_PASSWORD=your-password \
  -e PUPPYGRAPH_SCHEMA_PASSWORD=your-password \
  -- npx -y @puppygraph/mcp-server

Add --scope user to make it available in all your projects.

Claude Desktop

Edit claude_desktop_config.json (Settings → Developer → Edit Config) and restart Claude Desktop:

{
  "mcpServers": {
    "puppygraph": {
      "command": "npx",
      "args": ["-y", "@puppygraph/mcp-server"],
      "env": {
        "PUPPYGRAPH_URL": "bolt://localhost:7687"
      }
    }
  }
}

The env block is optional; add any of the environment variables there.

Cursor

Add the server to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

{
  "mcpServers": {
    "puppygraph": {
      "command": "npx",
      "args": ["-y", "@puppygraph/mcp-server"]
    }
  }
}

VS Code (GitHub Copilot)

Add the server to .vscode/mcp.json:

{
  "servers": {
    "puppygraph": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@puppygraph/mcp-server"]
    }
  }
}

Other MCP clients

Any client that launches stdio MCP servers works: the command is npx with arguments -y @puppygraph/mcp-server, and settings go in environment variables. Windsurf, Cline and similar clients use the same mcpServers JSON shape as Claude Desktop.

Configuration

All settings are environment variables. The defaults match a local PuppyGraph container.

VariableDefaultDescription
PUPPYGRAPH_URLbolt://localhost:7687Bolt endpoint for Cypher
PUPPYGRAPH_USERNAMEpuppygraphBolt username
PUPPYGRAPH_PASSWORDpuppygraph123Bolt password
PUPPYGRAPH_DATABASE(empty)Bolt database name
PUPPYGRAPH_GREMLIN_URLws://localhost:8182/gremlinGremlin WebSocket endpoint
PUPPYGRAPH_GREMLIN_USERNAMEpuppygraphGremlin username
PUPPYGRAPH_GREMLIN_PASSWORDpuppygraph123Gremlin password
PUPPYGRAPH_GREMLIN_TRAVERSAL_SOURCEgGremlin traversal source
PUPPYGRAPH_SCHEMA_URLhttp://localhost:8081/schemajsonSchema endpoint
PUPPYGRAPH_SCHEMA_USERNAMEpuppygraphSchema endpoint username
PUPPYGRAPH_SCHEMA_PASSWORDpuppygraph123Schema endpoint password, also used by the setup tools
PUPPYGRAPH_HTTP_URLorigin of PUPPYGRAPH_SCHEMA_URLPuppyGraph HTTP API used by the setup tools
PUPPYGRAPH_MCP_SECRET_ENV_ALLOWLIST(empty)Extra variable names that password_env / secret_env may read (see Data source credentials)
PUPPYGRAPH_READ_ONLYfalseReject write queries (see below)

If you changed the PuppyGraph password, set it for all three endpoints (PUPPYGRAPH_PASSWORD, PUPPYGRAPH_GREMLIN_PASSWORD, PUPPYGRAPH_SCHEMA_PASSWORD).

Read-only mode

Writes are allowed by default. To stop an agent from changing data, for example on a production deployment, turn on read-only mode with PUPPYGRAPH_READ_ONLY=true or the --read-only flag:

claude mcp add puppygraph -- npx -y @puppygraph/mcp-server --read-only

In read-only mode, puppygraph_query rejects Cypher queries that use CREATE, MERGE, DELETE, SET, REMOVE, DROP, LOAD CSV or FOREACH, and Gremlin queries that use addV, addE, mergeV, mergeE, property, drop, io, addVertex, addEdge or remove, before they reach PuppyGraph. The agent gets an error with error_type: "READ_ONLY" that names the operation. Keywords inside strings and comments are ignored. The query tool description and puppygraph_status (read_only: true) tell the agent the mode is on.

In read-only mode, puppygraph_create_catalog, puppygraph_upload_schema and the add/update/remove schema tools are not offered to the agent at all (and refuse if called). The other setup tools only read and stay available.

Read-only mode is a guard for agents, not access control. To enforce read-only access, use PuppyGraph's access control and connect as a user without write permissions.

Data source credentials

The setup tools never return or log data source passwords: responses mask credential fields as ******, and error messages are scrubbed of the passwords that were sent. To keep a password out of the conversation entirely, put it in the MCP server's environment and have the agent pass the variable name instead (password_env, or secret_env for other secrets). The agent chooses the variable name, so to stop it from handing another of the server's secrets to a database, only these variables can be used: names starting with PUPPYGRAPH_SECRET_, and names you list in PUPPYGRAPH_MCP_SECRET_ENV_ALLOWLIST (comma-separated, exact names). Any other name is refused.

claude mcp add puppygraph -e PUPPYGRAPH_SECRET_PG_PASSWORD=... -- npx -y @puppygraph/mcp-server

Then: "Create a PuppyGraph catalog for jdbc:postgresql://db:5432/shop as user app, with the password in PUPPYGRAPH_SECRET_PG_PASSWORD."

Replacing a schema

puppygraph_upload_schema validates the schema first, then asks PuppyGraph to check every mapped table and column before it changes anything, so a failed upload leaves the installed schema as it was. If a schema is already installed, the upload is refused unless the agent passes replace: true; the refusal names the installed version and labels. PuppyGraph keeps earlier versions in its schema history.

Troubleshooting

  • Ask the agent to call puppygraph_status: it shows whether the server is connected and, if not, whether the cause is authentication or the connection.
  • The server logs to stderr (never stdout, which carries the MCP protocol). Claude Desktop writes them to its MCP log files.
  • If PuppyGraph runs on another host or in a container the client can't reach as localhost, set the three URL variables to an address the client can reach.
  • Gremlin URLs must start with ws:// or wss://.
  • Cypher and Gremlin connect separately: if one fails, the other language still works.

Development

git clone https://github.com/puppygraph/puppygraph-mcp-server.git
cd puppygraph-mcp-server
npm install        # also builds build/ through the prepare script
npm test           # unit and integration tests (mocked, no PuppyGraph needed)
npm run build
node build/index.js

To use a local checkout in a client, replace npx -y @puppygraph/mcp-server with node /path/to/puppygraph-mcp-server/build/index.js.

Live tests run the built server against a real PuppyGraph:

PUPPYGRAPH_LIVE_TEST=true npm run test:live

The setup tools have their own live test. It creates a catalog and replaces the installed schema, so run it only against a throwaway PuppyGraph. Load tests/live/fixtures/setup.sql into a PostgreSQL database that PuppyGraph can reach, then:

PUPPYGRAPH_LIVE_SETUP_TEST=true \
PUPPYGRAPH_LIVE_JDBC_URI=jdbc:postgresql://<host>:5432/<db> \
PUPPYGRAPH_LIVE_JDBC_USER=<user> PUPPYGRAPH_LIVE_JDBC_PASSWORD=<password> \
npm run test:live

To test the package as users get it, run npm pack and install the tarball, or publish it to a local registry such as Verdaccio and run npx -y @puppygraph/mcp-server against it.

Publishing

Maintainers publish to npm by hand; see RELEASING.md.

License

Apache 2.0

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP server for PuppyGraph from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/puppygraph-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage