GitHub - ravenwits/mcp-server-arangodb: This is a TypeScript-based MCP server that provides database interaction capabilities through ArangoDB. It implements core database operations and allows seamless integration with ArangoDB through MCP tools. You can use it wih Claude app and also extension for VSCode that works with mcp like Cline! (original) (raw)

MCP Server for ArangoDB

A Model Context Protocol server for ArangoDB

This is a TypeScript-based MCP server that provides database interaction capabilities through ArangoDB. It implements core database operations and allows seamless integration with ArangoDB through MCP tools. You can use it wih Claude app and also extension for VSCode that works with mcp like Cline!

Features

Tools

Installation

Installing via NPM

To install arango-server globally via NPM, run the following command:

npm install -g arango-server

Running via NPX

To run arango-server directly without installation, use the following command:

Configuring for VSCode Agent

To use arango-server with the VSCode Copilot agent, you must have at least VSCode 1.99.0 installed and follow these steps:

  1. Create or edit the MCP configuration file:
    • Workspace-specific configuration: Create or edit the .vscode/mcp.json file in your workspace.
    • User-specific configuration: Optionally, specify the server in the setting(mcp) VS Code user settings to enable the MCP server across all workspaces.
      Tip: You can refer here to the MCP configuration documentation of VSCode for more details on how to set up the configuration file.
  2. Add the following configuration:
    {
    "servers": {
    "arango-mcp": {
    "type": "stdio",
    "command": "npx",
    "args": ["arango-server"],
    "env": {
    "ARANGO_URL": "http://localhost:8529",
    "ARANGO_DB": "your_database_name",
    "ARANGO_USERNAME": "your_username",
    "ARANGO_PASSWORD": "your_password"
    }
    }
    }
    }
  3. Start the MCP server:
    • Open the Command Palette in VSCode (Ctrl+Shift+P or Cmd+Shift+P on Mac).
    • Run the command MCP: Start Server and select arango-mcp from the list.
  4. Verify the server:
    • Open the Chat view in VSCode and switch to Agent mode.
    • Use the Tools button to verify that the arango-server tools are available.

To use with Claude Desktop

Go to: Settings > Developer > Edit Config or

You can check out mcp documentation to set it up too.

To use with Cline VSCode Extension

Go to: Cline Extension > MCP Servers > Edit Configuration or

Add the following configuration to the mcpServers section:

{ "mcpServers": { "arango": { "command": "node", "args": ["/path/to/arango-server/build/index.js"], "env": { "ARANGO_URL": "your_database_url", "ARANGO_DB": "your_database_name", "ARANGO_USERNAME": "your_username", "ARANGO_PASSWORD": "your_password" } } } }

Environment Variables

The server requires the following environment variables:

Usage

You can pretty much provide any meaningful prompt and Claude will try to execute the appropriate function.

Some example propmts:

Usage with Claude App

Demo of using ArangoDB MCP server with Claude App

Uasge with Cline VSCode extension

Demo of using ArangoDB MCP server with Cline VSCode extension

Query all users:

{ "query": "FOR user IN users RETURN user" }

Insert a new document:

{ "collection": "users", "document": { "name": "John Doe", "email": "john@example.com" } }

Update a document:

{ "collection": "users", "key": "123456", "update": { "name": "Jane Doe" } }

Remove a document:

{ "collection": "users", "key": "123456" }

List all collections:

{ } // No parameters required

Backup database collections:

{ "outputDir": "./backup" // Specify an absolute output directory path for the backup files (optional) "collection": "users" // Specify a collection name to backup (optional) If no collection name is provided, all collections will be backed up "docLimit": 1000 // Specify the maximum number of documents to backup per collection (optional), if not provided, all documents will be backed up (not having a limit might cause timeout for large collections) }

Create a new collection:

{ "name": "products", "type": "document", // "document" or "edge" (optional, defaults to "document") "waitForSync": false // Optional, defaults to false }

Note: The server is database-structure agnostic and can work with any collection names or structures as long as they follow ArangoDB's document and edge collection models.

Disclaimer

For Development Use Only

This tool is designed for local development environments only. While technically it could connect to a production database, this would create significant security risks and is explicitly discouraged. We use it exclusively with our development databases to maintain separation of concerns and protect production data.

Development

  1. Clone the repository
  2. Install dependencies:
  3. For development with auto-rebuild:

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. recommended debugging can be done by using MCP Inspector for development:

The Inspector will provide a URL to access debugging tools in your browser.

License

This project is licensed under the MIT License - see the LICENSE file for details.