mcp-server-arangodb
Health Gecti
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 48 GitHub stars
Code Uyari
- fs module — File system access in package.json
- process.env — Environment variable access in scripts/integration-smoke.mjs
- process.env — Environment variable access in scripts/test-integration-docker.sh
- network request — Outbound network request in scripts/test-integration-docker.sh
- process.env — Environment variable access in src/backupPaths.test.ts
- process.env — Environment variable access in src/backupPaths.ts
- process.env — Environment variable access in src/index.ts
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
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!
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
arango_query- Execute AQL queries- Takes an AQL query string as required parameter
- Optionally accepts bind variables for parameterized queries
- Accepts an optional
limitparameter, capped at 1000 rows - Returns query results as JSON text and structured MCP content
arango_insert- Insert documents into collections- Takes collection name and document object as required parameters
- Automatically generates document key if not provided
- Returns the created document metadata
arango_update- Update existing documents- Takes collection name, document key, and update object as required parameters
- Returns the updated document metadata
arango_remove- Remove documents from collections- Takes collection name and document key as required parameters
- Returns the removed document metadata
arango_backup- Backup all collections to JSON files- Writes only under
ARANGO_BACKUP_ROOTto prevent arbitrary file writes - Accepts only a safe relative
outputDirname, such asnightly_1 - Creates JSON files for each collection with current data and refuses to overwrite existing files
- Useful for data backup and migration purposes
- Writes only under
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- Takes collection name as required parameter
- Optionally specify collection type (document or edge collection)
- Configure waitForSync behavior for write operations
- Returns collection information including name, type, and status
arango_drop_collection- Drop an existing collection from the database- Takes collection name as required parameter
- Requires
confirm: trueto reduce accidental destructive calls - Permanently removes the collection and its documents
- Returns the dropped collection name and status
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:
npx arango-server
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:
Create or edit the MCP configuration file:
Workspace-specific configuration: Create or edit the
.vscode/mcp.jsonfile 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.
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" } } } }Start the MCP server:
- Open the Command Palette in VSCode (
Ctrl+Shift+PorCmd+Shift+Pon Mac). - Run the command
MCP: Start Serverand selectarango-mcpfrom the list.
- Open the Command Palette in VSCode (
Verify the server:
- Open the Chat view in VSCode and switch to Agent mode.
- Use the
Toolsbutton to verify that thearango-servertools are available.
To use with Claude Desktop
Go to: Settings > Developer > Edit Config or
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
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
- MacOS:
~/Library/Application Support/Code/User/globalStorage/cline.cline/config.json - Windows:
%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_DB": "your_database_name",
"ARANGO_USERNAME": "your_username",
"ARANGO_PASSWORD": "your_password"
}
}
}
}
You can also use the above configuration to get this server working with WARP
Environment Variables
The server requires the following environment variables:
ARANGO_URL- ArangoDB server URL (note: 8529 is the default port for ArangoDB for local development)ARANGO_DB- Database nameARANGO_USERNAME- Database userARANGO_PASSWORD- Database passwordARANGO_BACKUP_ROOT- Optional root directory forarango_backupoutput. Defaults to./backups.
Usage
You can pretty much provide any meaningful prompt and Claude will try to execute the appropriate function.
Some example propmts:
- "List all collections in the database"
- "Query all users"
- "Insert a new document with name 'John Doe' and email "[email protected]' to the 'users' collection"
- "Update the document with key '123456' or name 'Jane Doe' to change the age to 48"
- "Create a new collection named 'products'"
Usage with Claude App

Uasge with Cline VSCode extension

Query all users:
{
"query": "FOR user IN users RETURN user",
"limit": 100
}
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": "nightly_1", // Safe subdirectory name under ARANGO_BACKUP_ROOT. Absolute paths and slashes are rejected.
"collection": "users", // Optional. If omitted, all collections are backed up.
"docLimit": 1000 // Optional. Maximum documents per collection. Defaults to 1000 and is capped at 10000.
}
Set ARANGO_BACKUP_ROOT to choose where backups are stored. The server rejects path traversal, absolute paths, symlink escapes, and existing output files to mitigate arbitrary file write risks.
Create a new collection:
{
"name": "products",
"type": "document", // "document" or "edge" (optional, defaults to "document")
"waitForSync": false // Optional, defaults to false
}
Drop a collection:
{
"name": "products",
"confirm": true
}
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
Clone the repository
Install dependencies:
npm run buildFor development with auto-rebuild:
npm run watch
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. recommended debugging can be done by using MCP Inspector for development:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
Testing
npm test
The test suite includes regression coverage for the arango_backup path handling that prevents absolute paths, traversal, and symlink escapes.
To run the integration smoke test with a local Docker ArangoDB instance:
npm run test:integration
The integration test starts a temporary Docker ArangoDB instance, starts the MCP server over stdio, lists tools, verifies outputSchema, creates a temporary collection, inserts documents, queries with limit, verifies backup output stays under ARANGO_BACKUP_ROOT, rejects an absolute backup path, cleans up the collection, and stops the container.
The test container uses host port 18529 by default to avoid conflicting with a local ArangoDB on 8529. Override it with ARANGO_PORT if needed.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi
