home / mcp / aws labs amazon neptune mcp server

AWS Labs Amazon Neptune MCP Server

Provides MCP-based access to Neptune status, schema, and queries via openCypher and Gremlin for Neptune Database and Analytics.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "akm-2018-tmp_amazon_neptune_mcp_server": {
      "command": "uvx",
      "args": [
        "awslabs.amazon-neptune-mcp-server@latest"
      ],
      "env": {
        "NEPTUNE_ENDPOINT": "<INSERT NEPTUNE ENDPOINT IN FORMAT SPECIFIED BELOW>",
        "FASTMCP_LOG_LEVEL": "INFO"
      }
    }
  }
}

You can run an MCP server for Amazon Neptune that lets you fetch status and schema, and run openCypher and Gremlin queries against Neptune Database or Neptune Analytics. This setup makes it easy to test connectivity, inspect the graph schema, and execute queries directly from your MCP client.

How to use

You connect to the Neptune MCP Server from an MCP client that supports stdio-like servers. You can run the server locally or in a container, and point your client at the provided endpoint configuration to issue queries, fetch the graph schema, or check the current graph status.

How to install

Prerequisites: make sure you have the MCP tooling available on your machine. You will use the standard MCP runtime to launch a Neptune MCP server.

Install the MCP runtime and the Neptune MCP server integration. The Neptune MCP server is available through a runtime command and a package that you run to start the server. You will configure the endpoint you want to connect to using an environment variable.

Install the MCP runner and Neptune MCP server package as shown in the examples. Example commands demonstrate starting the server and setting the Neptune endpoint.

Code examples are provided to illustrate how to configure the MCP client to run the Neptune MCP server. Use the exact command shown in the snippet to start the server in your environment.

Additional sections

Configuration details include how to specify the Neptune endpoint and the formats for Neptune endpoints. The two formats you will use are neptune-db://<Cluster Endpoint> for Neptune Database and neptune-graph://<graph identifier> for Neptune Analytics.

Environment variables you need to configure include FASTMCP_LOG_LEVEL to control logging verbosity and NEPTUNE_ENDPOINT to point to your Neptune instance. The MCP server will accept both mutating and read-only queries based on the permissions granted to the running IAM role.

Example configurations show how to run the server in stdio mode and, alternatively, how to run the server via Docker. The standard approach uses a runtime like uvx to launch the MCP server image, passing the Neptune endpoint as an environment variable.

{
  "mcpServers": {
    "Neptune Query": {
      "command": "uvx",
      "args": ["awslabs.amazon-neptune-mcp-server@latest"],
      "env": {
        "FASTMCP_LOG_LEVEL": "INFO",
        "NEPTUNE_ENDPOINT": "<INSERT NEPTUNE ENDPOINT IN FORMAT SPECIFIED BELOW>"
      }
    }
  }
}
{
  "mcpServers": {
    "awslabs.amazon-neptune-mcp-server": {
        "command": "docker",
        "args": [
          "run",
          "--rm",
          "-i",
          "awslabs/amazon-neptune-mcp-server"
        ],
        "env": {
        "FASTMCP_LOG_LEVEL": "INFO",
        "NEPTUNE_ENDPOINT": "<INSERT NEPTUNE ENDPOINT IN FORMAT SPECIFIED BELOW>"
        },
        "disabled": false,
        "autoApprove": []
    }
  }
}

Available tools

Run Queries

Execute openCypher and Gremlin queries against Neptune Database and openCypher queries against Neptune Analytics to retrieve data or perform mutations as permitted by your IAM permissions.

Get Schema

Fetch the configured graph schema as a text representation, allowing you to inspect the structure of your Neptune graph.

Check Status

Query the graph status to determine if it is Available or Unavailable, helping you verify connectivity and readiness.