data
Dgraph MCP Integration for Codex
Connect Dgraph to Codex through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Dgraph to Codex
Use KosmoKrator as a local MCP proxy for Codex so coding sessions can reach selected integrations with explicit write policy.
Register kosmo mcp:serve as a local stdio server and choose the integration allowlist. The gateway is local, scoped to this integration, and starts with
--write=deny so Codex can inspect read-capable tools without receiving write access by default.
Dgraph MCP Config for Codex
Keep write access denied or ask-based unless the workspace is trusted.
{
"mcpServers": {
"kosmokrator-dgraph": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=dgraph",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=dgraph --write=deny Why Use KosmoKrator Here
Expose only Dgraph instead of a broad multi-service tool list.
Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.
Start read-only, then opt into ask or allow for trusted workspaces.
Dgraph Tools Visible to Codex
Codex sees stable MCP tool names generated from the Dgraph integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__dgraph__dgraph_list_schema | dgraph.dgraph_list_schema | Read | List the full GraphQL schema from Dgraph. Returns all types, their fields, and field types. Useful for understanding the overall data model. |
integration__dgraph__dgraph_get_schema | dgraph.dgraph_get_schema | Read | 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. |
integration__dgraph__dgraph_list_types | dgraph.dgraph_list_types | Read | List all types defined in the Dgraph GraphQL schema. Returns type names for all user-defined and system types available in the database. |
integration__dgraph__dgraph_list_indexes | dgraph.dgraph_list_indexes | Read | 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.). |
integration__dgraph__dgraph_get_node | dgraph.dgraph_get_node | Read | 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. |
integration__dgraph__dgraph_mutate | dgraph.dgraph_mutate | Write | 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. |
integration__dgraph__dgraph_drop_mutation | dgraph.dgraph_drop_mutation | Write | 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. |
integration__dgraph__dgraph_query | dgraph.dgraph_query | action | 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. |
integration__dgraph__dgraph_get_current_user | dgraph.dgraph_get_current_user | Read | Get the current authenticated Dgraph user identity. Verifies the configured bearer token and returns the associated user information including ID, name, and email. |