data
Dgraph MCP, CLI, and Lua Integration for AI Agents
Dgraph integration docs for AI agents: MCP gateway setup, Dgraph CLI commands, Lua API reference, credentials, and function schemas.
9 functions 6 read 2 write API token auth
Dgraph for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
dgraph- route_slug
dgraph- package
dgraph- auth_strategy
api_tokenAPI token- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
true
Quick Links
Lua APIAgent-facing namespace and function reference. Dgraph CLIHeadless setup and direct function calls. Dgraph MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
Dgraph MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Dgraph.
Claude Code Dgraph MCP setup for Claude Code. Cursor Dgraph MCP setup for Cursor. Codex Dgraph MCP setup for Codex. OpenAI Agents Dgraph MCP setup for OpenAI Agents SDK. Claude Agent SDK Dgraph MCP setup for Claude Agent SDK. Vercel AI SDK Dgraph MCP setup for Vercel AI SDK. LangChain Dgraph MCP setup for LangChain. LangGraph Dgraph MCP setup for LangGraph. CrewAI Dgraph MCP setup for CrewAI. MCP clients Dgraph MCP setup for Generic MCP Clients.
Dgraph CLI Matrix
Use these pages for direct Dgraph CLI workflows in scripts, CI, cron, and agent wrappers.
CI Dgraph CLI for CI. Cron Jobs Dgraph CLI for cron jobs. Shell Scripts Dgraph CLI for shell scripts. Headless Automation Dgraph CLI for headless automation. Coding Agents Dgraph CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
dgraph.dgraph_list_schema | Read read | 0 | List the full GraphQL schema from Dgraph. Returns all types, their fields, and field types. Useful for understanding the overall data model. |
dgraph.dgraph_get_schema | Read read | 1 | Get the GraphQL schema for a specific type in Dgraph. Returns the type definition including all fields and their types. Provide the type name to inspect. |
dgraph.dgraph_list_types | Read read | 0 | List all types defined in the Dgraph GraphQL schema. Returns type names for all user-defined and system types available in the database. |
dgraph.dgraph_list_indexes | Read read | 0 | List all indexes defined in the Dgraph schema. Returns types with their fields and directives, allowing you to identify indexed fields and their index types (hash, exact, term, fulltext, trigram, etc.). |
dgraph.dgraph_get_node | Read read | 2 | Get a specific node from Dgraph by providing its type and ID. Returns the node data including all populated fields. Use the type name as defined in your GraphQL schema. |
dgraph.dgraph_mutate | Write write | 2 | Execute a GraphQL mutation to add or update data in Dgraph. Provide the full GraphQL mutation string and optional variables. Supports all mutation operations including add, update, and upsert. |
dgraph.dgraph_drop_mutation | Write write | 2 | Execute a GraphQL drop/delete mutation to remove data from Dgraph. Provide the full GraphQL mutation string for deleting nodes and optional variables. Use with caution as this permanently removes data. |
dgraph.dgraph_query | action action | 2 | Execute a custom GraphQL query against Dgraph. Provide the full GraphQL query string and optional variables. Supports all query operations including filtering, pagination, sorting, and nested traversals. |
dgraph.dgraph_get_current_user | Read read | 0 | Get the current authenticated Dgraph user identity. Verifies the configured bearer token and returns the associated user information including ID, name, and email. |