Skip to main content

An Amazon Neptune MCP server that allows for fetching status, schema, and querying using openCypher, Gremlin, and SPARQL for Neptune Database and openCypher for Neptune Analytics.

Project description

AWS Labs Amazon Neptune MCP Server

An Amazon Neptune MCP server that allows for fetching status, schema, and querying using openCypher and Gremlin for Neptune Database and openCypher for Neptune Analytics.

Features

The Amazon Neptune MCP Server provides the following capabilities:

  1. Run Queries: Execute openCypher and/or Gremlin queries against the configured database
  2. Schema: Get the schema in the configured graph as a text string
  3. Status: Find if the graph is "Available" or "Unavailable" to your server. This is useful in helping to ensure that the graph is connected.

AWS Requirements

  1. AWS CLI Configuration: You must have the AWS CLI configured with credentials and an AWS_PROFILE that has access to Amazon Neptune
  2. Amazon Neptune: You must have at least one Amazon Neptune Database or Amazon Neptune Analytics graph.
  3. IAM Permissions: Your IAM role/user must have appropriate permissions to:
    • Access Amazon Neptune
    • Query Amazon Neptune
  4. Access: The location where you are running the server must have access to the Amazon Neptune instance. Neptune Database resides in a private VPC so access into the private VPC. Neptune Analytics can be access either using a public endpoint, if configured, or the access will be needed to the private endpoint.

Note: This server will run any query sent to it, which could include both mutating and read-only actions. Properly configuring the permissions of the role to allow/disallow specific data plane actions as specified here:

Prerequisites

  1. Install uv from Astral or the GitHub README
  2. Install Python using uv python install 3.10

Installation

Cursor VS Code
Install MCP Server Install on VS Code

Below is an example of how to configure your MCP client, although different clients may require a different format.

{
  "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>"
      }
    }
  }
}

Windows Installation

For Windows users, the MCP server configuration format is slightly different:

{
  "mcpServers": {
    "awslabs.amazon-neptune-mcp-server": {
      "disabled": false,
      "timeout": 60,
      "type": "stdio",
      "command": "uv",
      "args": [
        "tool",
        "run",
        "--from",
        "awslabs.amazon-neptune-mcp-server@latest",
        "awslabs.amazon-neptune-mcp-server.exe"
      ],
      "env": {
        "FASTMCP_LOG_LEVEL": "INFO",
        "NEPTUNE_ENDPOINT": "<INSERT NEPTUNE ENDPOINT IN FORMAT SPECIFIED BELOW>"
      }
    }
  }
}

Docker Configuration

After building with docker build -t awslabs/amazon-neptune-mcp-server .:

{
  "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": []
    }
  }
}

When specifying the Neptune Endpoint the following formats are expected:

For Neptune Database: neptune-db://<Cluster Endpoint>

For Neptune Analytics: neptune-graph://<graph identifier>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

awslabs_amazon_neptune_mcp_server-1.0.9.tar.gz (102.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file awslabs_amazon_neptune_mcp_server-1.0.9.tar.gz.

File metadata

File hashes

Hashes for awslabs_amazon_neptune_mcp_server-1.0.9.tar.gz
Algorithm Hash digest
SHA256 4904dd63b5b49038d68a326811037ea41b2b33db75fa01d81280fc6a65e63a2e
MD5 8b65fc06b95670dd2793b5f28fd9df0a
BLAKE2b-256 e2e1f837e58de9ca56c84ed96b1f53d47ae8ef00b0d6baa3ec0c853fee08daa9

See more details on using hashes here.

Provenance

The following attestation bundles were made for awslabs_amazon_neptune_mcp_server-1.0.9.tar.gz:

Publisher: release.yml on awslabs/mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file awslabs_amazon_neptune_mcp_server-1.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for awslabs_amazon_neptune_mcp_server-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 efbdbc89e812bef8b9ea5c83aced62e30819f51f7a84b20feed2edba290051d7
MD5 0f3f0b0193e96482e64cec855335f5a9
BLAKE2b-256 62185fb71931a21bde2788c46f29b8ba9ff3d05a2c61217d8dbd9701311b4213

See more details on using hashes here.

Provenance

The following attestation bundles were made for awslabs_amazon_neptune_mcp_server-1.0.9-py3-none-any.whl:

Publisher: release.yml on awslabs/mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page