Back to Browse

Graph Explorer MCP Server

Developer ToolsLow Risk9.7MCP RegistryLocal
Free

Server data from the Official MCP Registry

Query graph databases with Cypher over BOLT and see the answer as an interactive graph (MCP Apps)

About

Query graph databases with Cypher over BOLT and see the answer as an interactive graph (MCP Apps)

Security Report

9.7
Low Risk9.7Low Risk

Valid MCP server (4 strong, 2 medium validity signals). No known CVEs in dependencies. ⚠️ Package registry links to a different repository than scanned source. Imported from the Official MCP Registry. 1 finding(s) downgraded by scanner intelligence.

15 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

env_vars

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Bolt addressOptional

Environment variable: GRAPH_URI

Login user, empty for no loginOptional

Environment variable: GRAPH_USER

Login passwordRequired

Environment variable: GRAPH_PASSWORD

Database name, the server default if not setOptional

Environment variable: GRAPH_DATABASE

Database dialectOptional

Environment variable: GRAPH_DIALECT

read, or write to let queries change and delete dataOptional

Environment variable: GRAPH_ACCESS_MODE

Where the selected node id and your last-run query are keptOptional

Environment variable: GRAPH_STATE_DIR

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "mcp-graph-explorer": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-graph-explorer"
      ],
      "env": {
        "GRAPH_URI": "your-graph-uri-here",
        "GRAPH_USER": "your-graph-user-here",
        "GRAPH_DIALECT": "your-graph-dialect-here",
        "GRAPH_DATABASE": "your-graph-database-here",
        "GRAPH_PASSWORD": "your-graph-password-here",
        "GRAPH_STATE_DIR": "your-graph-state-dir-here",
        "GRAPH_ACCESS_MODE": "your-graph-access-mode-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

mcp-graph-explorer

Ask questions about a graph in a chat and see the answer as an interactive graph. It runs on Relate, a graph database embedded in this MCP server: no database to install, no Docker, no settings.

The model writes Cypher, and the server runs it. The answer is shown as a graph, a table or a single value in an MCP Apps view.

It also works with other graph databases over BOLT.

A question about an earlier, smaller example network answered as a graph, then explored with node properties, Cypher, a geographic layout and search

Quick start

Requirements: Node 22 or later and an MCP client. There is nothing to install: the client downloads and starts the server with npx.

Claude Desktop: open Settings → Developer → Edit Config (claude_desktop_config.json) and add the server. If you already have mcpServers, add only graph-explorer to it.

{
  "mcpServers": {
    "graph-explorer": {
      "command": "npx",
      "args": ["-y", "mcp-graph-explorer"]
    }
  }
}

Codex desktop: add to ~/.codex/config.toml:

[mcp_servers.graph_explorer]
command = "npx"
args = ["-y", "mcp-graph-explorer"]

GitHub Copilot in VS Code: add to ~/.copilot/mcp-config.json:

{
  "mcpServers": {
    "graph-explorer": {
      "type": "local",
      "command": "npx",
      "args": ["-y", "mcp-graph-explorer"],
      "tools": ["get_schema", "query_cypher", "show_result", "get_selection", "get_view_query"]
    }
  }
}

Restart the client and ask for example "Which operators call at Göteborg Centralstation?".

With Relate, the view is tested in Claude Desktop. The server runs locally (stdio); other clients with MCP Apps support that can run a local server should work. If a client cannot find npx (common with nvm), use its absolute path as command (which npx).

Query results are sent to the language model.

The default database

With no settings, the server opens an example graph that comes with the package: the train traffic in Sweden on Tuesday 8 December 2026, joined to the track network (data sources). It has 19 operators, 2,949 trips with 28,734 stop times, 1,183 sections of track, with 1,329 stops: 619 from the timetables and 710 that only the track network knows.

(:Agency)-[:HAS_ROUTE]->(:Route)-[:HAS_TRIP]->(:Trip)-[:HAS_STOP_TIME]->(:StopTime)-[:AT]->(:Stop)
(:StopTime)-[:NEXT_STOP]->(:StopTime)
(:Stop)-[:SECTION {km}]->(:Stop)

Try for example:

  • Which operators call at Göteborg Centralstation, and how many trips does each have?
  • Show the track within six sections of Falun (signature FLN).
  • What is the way by track from Falun to Avesta Krylbo (AVKY), and how many kilometres is it?
  • Which trains leave Falun after 08:00, and where do they go?

Stop.signature is the Swedish station signature. Times are text such as 08:28:00, and may pass 24:00:00; departure_minutes and arrival_minutes count from midnight. A trip has no departure at its last stop. pickup_type 1 means that one cannot board there, drop_off_type 1 that one cannot get off. Trip.number is the train number; 84 trips whose number is shared by a whole line have none. The shortest path counts sections, not kilometres.

Known gaps. The timetables and the track network come from different sources and do not match fully:

  • 710 stops are places on the track that match no stop in the timetables. They have a signature and a name but no stop_id: MATCH (s:Stop) WHERE s.stop_id IS NULL RETURN s
  • 217 stops from the timetables have no track (147 of them have trains that day), such as many small halts and the Danish stations: MATCH (s:Stop) WHERE NOT (s)-[:SECTION]-() RETURN s
  • Stockholm's local traffic (SL) is not included.
  • Double-clicking a busy station adds 50 of its neighbors, which are mostly stop times. Ask for the track around it instead.

Your own Relate database

Set GRAPH_STORE to the absolute path of your Relate store:

{
  "mcpServers": {
    "graph-explorer": {
      "command": "npx",
      "args": ["-y", "mcp-graph-explorer"],
      "env": {
        "GRAPH_STORE": "/absolute/path/to/my-graph.rl"
      }
    }
  }
}

Write the whole path: ~ is not expanded, and a relative path is read from the directory the client starts the server in. The server never writes to the store, but while it runs, no other program can open the store for writing, because Relate cannot close it. If another program writes to your store, point GRAPH_STORE to a copy.

Relate mode

The server uses Relate as a single file, opened read-only. The example, data/trains.rl, is one artifact that can be reviewed, committed and shipped in the package, and reading does not change it. In memory would load the data at every start and leave nothing to review. A directory store holds several files, and nothing here needs to write.

Relate runs on macOS and Linux (x64 and arm64) and Windows (x64). Linux x64 needs glibc 2.39 or later, so for example Ubuntu 22.04 and Debian 12 are too old. Tested on macOS arm64 and, for the library and the store, on Linux (Debian 12 arm64, Debian 13 x64).

What you can do

  • Graph, table or value, depending on what the query returns.
  • Cypher shows the query behind the result. Edit it and press Run (⌘↵ / Ctrl↵) to update the view; Reset brings back the model's query and result. The editor suggests keywords as you type; Enter or Tab accepts. The editor only reads, also in write mode. Ask about your result and the model looks the query up with get_view_query.
  • Click a node to see its properties, and double-click it to add its neighbors.
  • Click a relationship to see its type, ends and properties. No tool looks up a selected relationship; the model learns of it only through the model context.
  • Refer to the selection in the chat ("what connects to this one?"). The model looks it up with get_selection.
  • Drag nodes to rearrange them.
  • Choose a layout: force-directed (default), circular, or geographic when nodes have lat/lon, latitude/longitude or a WGS 84 point property. Geographic draws no background map, and places nodes without coordinates between their neighbors.
  • Search nodes and filter by label.
  • Earlier results stay in the chat and can be opened in the panel again.
ToolForDoes
get_schemathe modelLabels with counts, property types and examples, indexes, and what each relationship connects
query_cypherthe modelRuns a query and returns the data; shows nothing
show_resultthe modelRuns answer_query, optionally context_query, and shows the result
get_selectionthe modelThe node you last clicked, with its neighbors
get_view_querythe modelThe query you last ran in the view, with a summary of its result
select_node, expand_node, run_view_query, reset_view_querythe viewNot visible to the model

What the model knows about the view

The view shares your selection and your own queries through MCP Apps' updateModelContext, and the model can also look them up with get_selection and get_view_query. Some hosts accept the update without passing it on (seen in Claude Desktop, ext-apps#852). If so, say "the selected node" or "my query".

Other databases over BOLT

The server also works with databases that speak Cypher over BOLT. It is tested with Neo4j, Memgraph and ArcadeDB; others may work. Setting GRAPH_URI, GRAPH_USER, GRAPH_PASSWORD, GRAPH_DATABASE or GRAPH_DIALECT connects over BOLT instead of using Relate.

Upgrading from 0.1: if you relied on the default address bolt://localhost:7687 and set none of these, set GRAPH_URI. Otherwise you now get the example graph.

Before you connect your database

  • The server is read-only by default and relies on the database to enforce it.
  • ArcadeDB does not fully: schema changes are kept even in read mode (tested: 26.10.2). Use it only with data you can restore.
  • Query results are sent to the language model.

Claude Desktop

In claude_desktop_config.json:

{
  "mcpServers": {
    "graph-explorer": {
      "command": "npx",
      "args": ["-y", "mcp-graph-explorer"],
      "env": {
        "GRAPH_URI": "bolt://localhost:7687",
        "GRAPH_USER": "neo4j",
        "GRAPH_PASSWORD": "your-password",
        "GRAPH_DIALECT": "neo4j"
      }
    }
  }
}

Restart Claude Desktop and ask about your data. Over BOLT, the server is tested with Claude Desktop, Codex desktop and GitHub Copilot in VS Code.

Codex desktop

Add the server to ~/.codex/config.toml:

[mcp_servers.graph_explorer]
command = "npx"
args = ["-y", "mcp-graph-explorer"]

[mcp_servers.graph_explorer.env]
GRAPH_URI = "bolt://localhost:7687"
GRAPH_USER = "neo4j"
GRAPH_PASSWORD = "your-password"
GRAPH_DIALECT = "neo4j"

The graph view and the model context work there.

ChatGPT desktop in Work mode does not pass env to the server (tested 29 November 2026, macOS). Pass the variables as arguments instead:

[mcp_servers.graph_explorer]
command = "/usr/bin/env"
args = ["GRAPH_URI=bolt://localhost:7687", "GRAPH_USER=neo4j", "GRAPH_PASSWORD=your-password", "GRAPH_DIALECT=neo4j", "npx", "-y", "mcp-graph-explorer"]

The password is then visible in the process list.

GitHub Copilot in VS Code

Add the server to ~/.copilot/mcp-config.json:

{
  "mcpServers": {
    "graph-explorer": {
      "type": "local",
      "command": "npx",
      "args": ["-y", "mcp-graph-explorer"],
      "env": {
        "GRAPH_URI": "bolt://localhost:7687",
        "GRAPH_USER": "neo4j",
        "GRAPH_PASSWORD": "your-password",
        "GRAPH_DIALECT": "neo4j"
      },
      "tools": ["get_schema", "query_cypher", "show_result", "get_selection", "get_view_query"]
    }
  }
}

The graph view, expanding a node and your own Cypher queries worked in a short test. Asking about the selected node and the model context are not verified there.

Settings

VariableDefaultMeaning
GRAPH_URIbolt://localhost:7687Bolt address
GRAPH_USER, GRAPH_PASSWORDemptyLogin
GRAPH_DATABASEserver defaultDatabase name
GRAPH_DIALECTneo4jneo4j, memgraph or arcadedb
GRAPH_ACCESS_MODEreadread or write, see Security. Relate is read only
GRAPH_STOREthe example graphRelate only: absolute path to your store. Not with the first four rows' variables
GRAPH_STATE_DIRplatform data directoryWhere the selected node id and your last-run query, with its parameters, are kept

The defaults of the first four apply once one of them is set; with none, the server uses Relate.

The dialect says how nodes are identified and how the schema is read. If you use ArcadeDB with neo4j, switch to arcadedb.

With Neo4j, installing APOC is recommended: get_schema then reads counts, types and connections in one call. Without it the server uses plain Cypher.

Try them with example data

Needs Docker. The data is a smaller railway network, not the default database: 82 operational points and 84 sections of line in Dalarna and Gävle.

(:Station | :Junction)-[:CONNECTS]->(:TrackSection)-[:CONNECTS]->(:Station | :Junction)
mkdir graph-explorer-demo && cd graph-explorer-demo
curl -fsSLO https://raw.githubusercontent.com/abergkvist/mcp-graph-explorer/main/docker/compose.yaml
curl -fsSLO https://raw.githubusercontent.com/abergkvist/mcp-graph-explorer/main/docker/seed.cypher
docker compose up -d neo4j-seed

Use the Neo4j configuration above with "GRAPH_PASSWORD": "graphexplorer". Stop the database with docker compose down.

docker compose up -d also starts the other two databases with the same data:

DatabaseSettings
Memgraph"GRAPH_URI": "bolt://localhost:7688", "GRAPH_DIALECT": "memgraph", no user or password
ArcadeDB"GRAPH_URI": "bolt://localhost:7692", "GRAPH_USER": "root", "GRAPH_PASSWORD": "graphexplorer", "GRAPH_DATABASE": "graph", "GRAPH_DIALECT": "arcadedb"

Security

Read-only by default

The queries are written by a language model. It can misunderstand you, and text stored in your data can influence what it does. Therefore the server is read-only unless you say otherwise.

With Relate the store is opened read-only and the engine rejects every write. Write mode is not supported: the server refuses to start. LOAD CSV is not available, so a query cannot read files or network addresses.

Over BOLT, the server runs every query in a read-mode transaction that is always rolled back, so the database itself rejects writes. ArcadeDB is an exception, see below. The rest of this section is about databases over BOLT, except What is sent to the model.

Memgraph ignores read mode for auto-commit queries. The server uses them only for two fixed statements, SHOW INDEX INFO and SHOW CONSTRAINT INFO, which Memgraph refuses inside a transaction.

ArcadeDB

ArcadeDB (tested: 26.10.2) does not reject writes in read mode. Changes to data are rolled back, but without an error, so the answer can look as if something was written. Schema changes are kept, such as indexes, constraints and new empty types.

Write mode

Setting GRAPH_ACCESS_MODE=write is your decision. Know what it means:

  • The model's query_cypher can create, change and delete data, and it is committed immediately. There is no undo.
  • If you have chosen "Always allow" for query_cypher in Claude Desktop, you are not asked before a write.
  • show_result, the Cypher editor, get_view_query, schema reading, expanding and selection stay read-only.
  • The view does not say that something was written; only the model is told what changed.
  • Use it against data you can restore.

What read mode does not stop

  • LOAD CSV only reads, but it reads from the database server: files in Memgraph, network addresses in Neo4j.
  • Procedures installed in your database may have side effects outside the transaction.
  • Neo4j administration commands that are not writes: with an administrator login, SHOW TRANSACTIONS shows other users' query text and parameters, and TERMINATE TRANSACTIONS stops their queries. Neo4j Community Edition has no restricted users, so do not point the server at a shared instance there.

If your database edition supports users with limited rights, connect with one that can only read.

What is sent to the model

Schema example values (for properties with few values, up to 10 of them), the data returned by query_cypher (up to 100 nodes, 100 relationships and 20,000 characters per call), show_result summaries (including up to 50 table rows), the selected node with its neighbors, and, when the model calls get_view_query, the query you ran with its parameters and a summary of its result are sent to the model. The view also puts the selected node or relationship with its properties, and your own query with its parameters, in the model context (long values are cut). The complete graph of a shown result is part of the tool result, which the client may keep with the conversation (Claude Desktop does).

Limits

At most 1,000 rows, 500 nodes and 2,000 relationships per result, a 30 second query timeout, and a size limit on what the view receives. The model and the view are told how many of how many were loaded; above 1,000 rows the total is a lower bound.

  • Relate holds the whole result of a query in memory before it is cut, so a query that produces millions of rows can use gigabytes. The 30 second timeout is the only bound.
  • With Relate the graph view is tested in Claude Desktop only; over BOLT also in Codex desktop and GitHub Copilot in VS Code. Other clients are untested.
  • In Claude Desktop, the side panel is not available to every organization; the view also works inside the chat.
  • The selected node and your last-run query are shared between chats: the last click or run wins.
  • Expanded nodes, dragged positions, the chosen layout and your edited query are gone if the view is reloaded. The model can still read the query you ran until it shows a new result.
  • Results shown by earlier versions have no Cypher button.

Development

Building from source needs pnpm:

git clone https://github.com/abergkvist/mcp-graph-explorer.git
cd mcp-graph-explorer
pnpm install
pnpm build

To run your build, use these in the configuration, with absolute paths:

"command": "/absolute/path/to/node",
"args": ["/absolute/path/to/mcp-graph-explorer/packages/server/dist/index.js"]
pnpm test               # builds and runs the unit tests, no database server needed
pnpm smoke              # packs, installs and starts the package
node packages/server/scripts/make-store.mjs   # rebuilds data/trains.rl from data/source/
node packages/server/scripts/fetch-source.mjs <GTFS directory>   # refreshes data/source/
pnpm test:integration   # needs the databases from docker compose
pnpm --filter @mcp-graph-explorer/view dev   # the view with example data
PackageContents
packages/normalizerDriver results to a JSON-safe graph and table; no MCP dependencies
packages/serverMCP server, Bolt and Relate runners, dialects, limits
packages/viewThe view, built into one HTML file (React, shadcn/ui, Sigma, CodeMirror)

Adding a dialect

Each database has a file in packages/server/src/dialects/ with its Cypher in plain text. To add or adapt one:

  1. Copy the file closest to your database.
  2. Set name, idExpr, toIdParam and readSchema. readGeneric in generic.ts is a starting point that uses portable Cypher.
  3. Register it in dialects/index.ts.
  4. Add the value to choices for GRAPH_DIALECT in server.json.
  5. Run pnpm build.

Releasing

  1. Set the new version in packages/server/package.json and twice in server.json, and merge.
  2. Tag it and push the tag: git tag vX.Y.Z && git push origin vX.Y.Z. The release.yml workflow checks the versions, builds, tests, stages the package on npm and creates the GitHub release.
  3. Approve the staged version with 2FA, on npmjs.com or with npm stage approve.
  4. When it is live on npm, start the publish-registry.yml workflow.

Design notes are in docs/ (the first version's design and plan are in Swedish).

Data

The default database is built from the files in data/source/:

  • Timetables: GTFS Sverige 2 from Trafiklab, CC0 1.0, cut to the trains of one day.
  • Station signatures: trafikverket_stops.txt from Trafiklab, CC0 1.0.
  • Track: sections of line from the Register of Infrastructure (RINF) of the European Union Agency for Railways. It is used only to connect stops; the direction follows RINF and does not restrict traffic.

fetch-source.mjs takes a directory with the GTFS files, already cut to trains, and downloads the other two; make-store.mjs builds the store from data/source/ without network.

The example network for the BOLT databases (docker/seed.cypher) is a subset of RINF, regenerated with node docker/make-seed.mjs <directory with the RINF CSV exports>.

This project is not affiliated with or endorsed by Trafiklab, Samtrafiken, any operator or the European Union Agency for Railways. The data is example content: it may be outdated or wrong and must not be used for travel or operations.

License

Apache-2.0 for the code. The data is not covered by it: the publisher's terms apply to the RINF data (in docker/seed.cypher, data/source/rinf_sections.csv, data/trains.rl and the npm package's dist/example.rl), and the Trafiklab data is CC0 1.0.

Reviews

No reviews yet

Be the first to review this server!