spmallette commented on code in PR #3238: URL: https://github.com/apache/tinkerpop/pull/3238#discussion_r2437193273
########## gremlin-mcp/src/main/javascript/README.md: ########## @@ -0,0 +1,512 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> + +# Gremlin MCP Server + +> **Connect AI agents like Claude, Cursor, and Windsurf to your graph databases!** + +An [MCP](https://modelcontextprotocol.io/) (Model Context Protocol) server that enables AI assistants to interact with +any Apache TinkerPop-compatible graph database hosted in [Gremlin Server](https://tinkerpop.apache.org/docs/current/reference/#gremlin-server) +through natural language. Query your data, discover schemas, analyze relationships, and manage graph data using simple +conversations. + +## ✨ What You Can Do + +Talk to your graph database naturally: + +- 🔍 **"What's the structure of my graph?"** - Automatic schema discovery +- 📊 **"Show me all users over 30 and their connections"** - Complex graph queries +- 🔗 **"Find the shortest path between Alice and Bob"** - Relationship analysis +- 📈 **"Give me graph statistics and metrics"** - Data insights +- 📤 **"Export user data as CSV"** - Data extraction +- 🧠 **Smart enum discovery** - AI learns your data's valid values automatically + +## 🛠️ Available Tools + +Your AI assistant gets access to these powerful tools: + +| Tool | Purpose | What It Does | +| --------------------------- | ---------------- | ------------------------------------------------------------ | +| 🔍 **get_graph_status** | Health Check | Verify database connectivity and server status | +| 📋 **get_graph_schema** | Schema Discovery | Get complete graph structure with vertices and edges | +| ⚡ **run_gremlin_query** | Query Execution | Execute any Gremlin traversal query with full syntax support | +| 🔄 **refresh_schema_cache** | Cache Management | Force immediate refresh of cached schema information | +| 📤 **export_subgraph** | Data Export | Extract subgraphs to JSON, GraphSON, or CSV formats | + +## 🚀 Quick Setup + +### Step 1: Install + +```bash +# The npx command will automatically install the package if needed +# No separate installation step required +``` + +#### Alternative: Build from Source + +```bash +# Clone and setup +git clone https://github.com/apache/tinkerpop.git +cd tinkerpop/gremlin-tools/gremlin-mcp Review Comment: yeah, a bit of a side-effect to using maven as the over-aching build system. fixed the "gremlin-tools" part though. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
