mcp server arangodb
A TypeScript-based server to interact with ArangoDB using the Model Context Protocol, enabling database operations and integration with tools like Claude and VSCode extensions for streamlined data management.
A TypeScript-based server to interact with ArangoDB using the Model Context Protocol, enabling database operations and integration with tools like Claude and VSCode extensions for streamlined data management.
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!
arango_query
- Execute AQL queriesReturns query results as JSON
arango_insert
- Insert documents into collections
Returns the created document metadata
arango_update
- Update existing documents
Returns the updated document metadata
arango_remove
- Remove documents from collections
Returns the removed document metadata
arango_backup
- Backup all collections to JSON files
Useful for data backup and migration purposes
arango_list_collections
- List all collections in the database
Returns array of collection information including names, IDs, and types
arango_create_collection
- Create a new collection in the database
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.
Install dependencies:
npm run build
For development with auto-rebuild:
npm run watch
To install ArangoDB for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @ravenwits/mcp-server-arangodb --client claude
To use with Claude Desktop, add the server config:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
To use with Cline VSCode Extension, add the server config:
~/Library/Application Support/Code/User/globalStorage/cline.cline/config.json
%APPDATA%/Code/User/globalStorage/cline.cline/config.json
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_DATABASE": "your_database_name",
"ARANGO_USERNAME": "your_username",
"ARANGO_PASSWORD": "your_password"
}
}
}
}
The server requires the following environment variables:
ARANGO_URL
- ArangoDB server URL (note: 8529 is the default port for ArangoDB for local development)ARANGO_DATABASE
- Database nameARANGO_USERNAME
- Database userARANGO_PASSWORD
- Database passwordYou can pretty much provide any meaningful prompt and Claude will try to execute the appropriate function.
Some example propmts:
Query all users:
{
"query": "FOR user IN users RETURN user"
}
Insert a new document:
{
"collection": "users",
"document": {
"name": "John Doe",
"email": "[email protected]"
}
}
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": 2, // 2 for document collection, 3 for edge collection (optional, defaults to document collection)
"waitForSync": false // Optional, defaults to false
}
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector for development:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
This project is licensed under the MIT License - see the LICENSE file for details.
[
{
"description": "Execute an AQL query",
"inputSchema": {
"properties": {
"bindVars": {
"additionalProperties": true,
"description": "Query bind variables",
"type": "object"
},
"query": {
"description": "AQL query string",
"type": "string"
}
},
"required": [
"query"
],
"type": "object"
},
"name": "arango_query"
},
{
"description": "Insert a document into a collection",
"inputSchema": {
"properties": {
"collection": {
"description": "Collection name",
"type": "string"
},
"document": {
"additionalProperties": true,
"description": "Document to insert",
"type": "object"
}
},
"required": [
"collection",
"document"
],
"type": "object"
},
"name": "arango_insert"
},
{
"description": "Update a document in a collection",
"inputSchema": {
"properties": {
"collection": {
"description": "Collection name",
"type": "string"
},
"key": {
"description": "Document key",
"type": "string"
},
"update": {
"additionalProperties": true,
"description": "Update object",
"type": "object"
}
},
"required": [
"collection",
"key",
"update"
],
"type": "object"
},
"name": "arango_update"
},
{
"description": "Remove a document from a collection",
"inputSchema": {
"properties": {
"collection": {
"description": "Collection name",
"type": "string"
},
"key": {
"description": "Document key",
"type": "string"
}
},
"required": [
"collection",
"key"
],
"type": "object"
},
"name": "arango_remove"
},
{
"description": "Backup collections to JSON files.",
"inputSchema": {
"properties": {
"collection": {
"description": "Collection name to backup. If not provided, backs up all collections.",
"optional": true,
"type": "string"
},
"docLimit": {
"description": "Limit the number of documents to backup. If not provided, backs up all documents.",
"optional": true,
"type": "integer"
},
"outputDir": {
"default": "./backup",
"description": "An absolute directory path to store backup files",
"optional": true,
"type": "string"
}
},
"required": [
"outputDir"
],
"type": "object"
},
"name": "arango_backup"
},
{
"description": "List all collections in the database",
"inputSchema": {
"properties": {},
"type": "object"
},
"name": "arango_list_collections"
},
{
"description": "Create a new collection in the database",
"inputSchema": {
"properties": {
"name": {
"description": "Name of the collection to create",
"type": "string"
},
"type": {
"default": 2,
"description": "Type of collection to create",
"type": {
"2": "DOCUMENT_COLLECTION",
"3": "EDGE_COLLECTION",
"DOCUMENT_COLLECTION": 2,
"EDGE_COLLECTION": 3
}
},
"waitForSync": {
"default": false,
"description": "If true, wait for data to be synchronized to disk before returning",
"type": "boolean"
}
},
"required": [
"name"
],
"type": "object"
},
"name": "arango_create_collection"
}
]