KosmoKrator

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_token API token
cli_setup_supported
true
cli_runtime_supported
true
mcp_gateway_supported
true
lua_supported
true
supports_multi_account
true

Quick Links

Dgraph MCP Client Matrix

Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Dgraph.

Dgraph CLI Matrix

Use these pages for direct Dgraph CLI workflows in scripts, CI, cron, and agent wrappers.

Function Catalog

FunctionTypeParametersDescription
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.