About Graphjin
Graphjin is an MCP server published by dosco in the Data category: deepORG (formerly GraphJin) — one AI agent for your whole organization: databases, APIs, files, and code over MCP. Conduid read 33 tools from its source: apply_database_setup, apply_schema_changes, audit_role_permissions, check_health, discover_databases, execute_graphql and 27 more. No package is published for it, so it installs from a source checkout.
The repository has 3.3K stars and 207 forks, is licensed Apache-2.0, and its last commit was on 2 Dec 2026. The latest release is v3.22.0 (26 Nov 2026): Changelog 7e3f05c1c785332fb5f5a66cd790839e07274854 chore: bump version to v3.22.0 [skip-release] [skip ci] a9d42bbb9710d9f30b08ef1b6b6b88679515d975 feat: two servers in… It follows v3.21.35 (26 Nov 2026), and the 5 most recent releases go back to v3.21.32 (25 Nov 2026). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass Scoped permissions. Its topics include data, database, mssql, mariadb, graphql and cockroachdb.
Install
git clone https://github.com/dosco/deeporgTools (33)
apply_database_setupApply selected database setup to GraphJin config and reload schema. Requires explicit selection. Response includes machine-readable next-step guidance in the `next` field.| Parameter | Type | Description |
|---|---|---|
| allow_unverified_apply | boolean | When false (default), setup is blocked unless candidate auth_status is 'ok'. |
| candidate_id | string | Candidate ID to apply (recommended). |
| candidate_snapshot | object | Optional candidate object from a previous discover/plan call. |
| config | object | Explicit config override: {type, host?, port?, path?, user?, password?, dbname?, connection_string?}. For Snowflake, connection_string is required. |
| create_if_not_exists | boolean | Create database before connect (dev mode only). |
| database_alias | string | Config key for this database. Defaults to dbname or graphjin_dev. |
| discovery_options | object | Optional options used when resolving candidate_id. |
apply_schema_changesApply database schema changes using GraphJin DDL format. Creates or modifies tables by executing the necessary SQL. IMPORTANT: Call preview_schema_changes first to review the SQL before applying. After applying, the schema is automatically reloaded so new tables are immediately queryable.| Parameter | Type | Description |
|---|---|---|
| database * | string | Database name to target (as configured in the databases map). |
| destructive | boolean | Allow DROP TABLE/COLUMN operations. Default: false |
| schema * | string | GraphJin DDL schema definition. Example: type products { id: BigInt! @id name: Text! price: Numeric } |
audit_role_permissionsGet a complete permission matrix for a role (or all roles). Returns per-table operation status (query/insert/update/delete), column restrictions, filters, presets, and row limits. Includes a fix_guide showing how to modify permissions using update_current_config.| Parameter | Type | Description |
|---|---|---|
| role | string | Role name to audit (e.g., 'anon', 'user'). Omit or pass 'all' to audit every role. |
check_healthCheck the health of the database connection. Returns connection status, ping latency, connection pool statistics, schema readiness, and table count. Use to diagnose connectivity issues.discover_databasesScan the local system for running databases. Probes well-known TCP ports on localhost for PostgreSQL, MySQL, MariaDB, MSSQL, Oracle, and MongoDB. Optionally checks Unix domain sockets for PostgreSQL and MySQL when scan_unix_sockets is true. Snowflake is not auto-scanned on localhost; provide it explicitly via connection_string in targets or MCP config flows. Searches for SQLite database files. Detects database Docker containers. Then attempts to connect using default credentials and lists database names inside each instance. If defaults fail, reports auth_failed so you can re-call with user/password. Response includes machine-readable next-step guidance in the `next` field. Use this before configuring GraphJin to find which databases are available. Does NOT require an existing database connection. Note: system databases (postgres, mysql, information_schema, master, etc.) are filtered from the databases list by default. If no user databases exist, use update_current_config with create_if_not_exists: true to create one.| Parameter | Type | Description |
|---|---|---|
| include_system_databases | boolean | Include system databases in discovered database lists (default from mcp.default_db_allowed) |
| password | string | Password to try when probing |
| probe_timeout_ms | number | Probe timeout in milliseconds (default: 500) |
| scan_dir | string | Directory to scan for SQLite files (default: current working directory) |
| scan_local | boolean | Scan localhost ports and sqlite files (default: true) |
| scan_ports | array | Optional custom port list for localhost scanning (default uses known DB ports). |
| scan_unix_sockets | boolean | Scan local Unix sockets for PostgreSQL/MySQL/MongoDB (default: false) |
| skip_docker | boolean | Skip Docker container detection (default: false) |
| skip_probe | boolean | Skip connection probing and database listing (default: false) |
| sqlite_max_depth | number | SQLite file scan depth from scan_dir (default: 1, 0 = only scan_dir) |
| targets | array | Optional explicit targets to probe. Each item: {type?, host?, port?, source_label?, user?, password?, dbname?, connection_string?}. |
| user | string | Username to try when probing (tried before defaults) |
execute_graphqlExecute a GraphJin GraphQL query or mutation against the database. Use query_catalog and query_catalog(id: ...) to learn the DSL syntax first.| Parameter | Type | Description |
|---|---|---|
| namespace | string | Optional namespace for multi-tenant deployments |
| query * | string | The GraphQL query or mutation to execute. Use GraphJin DSL syntax. |
| variables | object | Variables to pass to the query |
execute_saved_queryExecute a pre-defined saved query from the allow-list by name. PREFER this over execute_graphql when a matching saved query exists - saved queries are pre-validated and safer. Use query_catalog to find available saved queries.| Parameter | Type | Description |
|---|---|---|
| name * | string | Name of the saved query to execute |
| namespace | string | Optional namespace for multi-tenant deployments |
| variables | object | Variables to pass to the query |
explain_queryCompile a GraphQL query WITHOUT executing it. Returns the compiled query (SQL for relational databases, aggregation pipeline for MongoDB), parameter bindings, tables touched, join depth, and cache info. For multi-database queries, returns per-database explanations. Use this to debug performance, verify correctness, and understand the query before running it.| Parameter | Type | Description |
|---|---|---|
| query * | string | The GraphQL query to explain |
| role | string | Optional role to compile the query as (e.g., 'user', 'anon'). Defaults to the current session role. |
| variables | object | Optional query variables as a JSON object |
explore_relationshipsMap out the data model neighborhood around a table. Given a table and depth (1-3), returns ALL reachable tables as a graph with nodes and typed edges. Use this to understand how tables connect before writing complex nested queries.| Parameter | Type | Description |
|---|---|---|
| database | string | Optional database name for multi-database deployments |
| depth | number | How many hops to explore (1-3, default 2). Higher depth = more tables but slower. |
| table * | string | Center table name to explore from |
fix_query_errorAnalyze a GraphJin query error as a tool result. Use this when the MCP client does not support prompts well and you need structured repair guidance.| Parameter | Type | Description |
|---|---|---|
| error * | string | The error message received |
| query * | string | The query that produced the error |
get_config_docsReturn annotated example GraphJin configuration files (dev.yml / prod.yml / agentic.yml) with inline comments explaining every option. Use this as a reference when authoring or modifying a GraphJin config — pair with `get_current_config` (dev mode) to see the actual running configuration.| Parameter | Type | Description |
|---|---|---|
| variant | string | Which template to return: 'dev' (annotated, full), 'prod' (production), 'agentic' (agent deployment), or 'both'/'all' (default). |
get_current_configGet current GraphJin configuration. Returns external sources, system/workflow feature overrides, databases, relationships, tables, roles, blocklist, functions, resolvers, and MCP settings. Use this to understand the current configuration before making changes.| Parameter | Type | Description |
|---|---|---|
| section | string | Optional section to retrieve: 'sources', 'system', 'workflows', 'databases', 'relationships', 'metadata', 'tables', 'roles', 'blocklist', 'functions', 'resolvers', 'mcp', or 'all' (default) |
get_fragmentGet full details of a fragment including its definition, the type it applies to, and usage examples showing how to include it in queries.| Parameter | Type | Description |
|---|---|---|
| name * | string | Name of the fragment |
| namespace | string | Optional namespace for fragments stored as <namespace>.<name> |
get_js_runtime_apiGet the machine-readable API for GraphJin's JS workflow runtime. Use this FIRST before generating JavaScript workflows so the LLM can see exactly which `gj.*` globals and functions are available.get_onboarding_statusGet current onboarding status: configured databases, active database, schema readiness and table counts. Response includes machine-readable next-step guidance in the `next` field.get_saved_queryGet full details of a saved query including the query text and variable schema. Use this to understand what variables are needed before calling execute_saved_query.| Parameter | Type | Description |
|---|---|---|
| name * | string | Name of the saved query |
| namespace | string | Optional namespace for saved queries stored as <namespace>.<name> |
get_schema_insightsGet database insights for schema understanding: hub tables (ranked by FK count), relationship paths between hubs, auto-generated query templates (time-series / breakdown / join), duplicate-table warnings, and data-quality flags. Use after list_tables to orient on the data model before writing queries.| Parameter | Type | Description |
|---|---|---|
| database | string | Optional database name. Omit to use the default database. |
graphql_help| Parameter | Type | Description |
|---|---|---|
| for * | string | Help topic. Start with discovery when unsure. |
list_databasesList databases on all configured database servers. Unlike discover_databases (which scans for new servers), this queries EXISTING configured connections for their database lists. Use after initial setup to see what databases are available on each server.list_fragmentsList all available GraphQL fragments. Fragments are reusable field selections that reduce query duplication. Use fragments for commonly-requested field sets.| Parameter | Type | Description |
|---|---|---|
| namespace | string | Optional namespace filter |
list_saved_queriesList all saved queries from the allow-list. Check this BEFORE writing new queries - a saved query may already exist for your need. Saved queries are pre-validated and safer to execute.| Parameter | Type | Description |
|---|---|---|
| namespace | string | Optional namespace filter |
list_workflowsLegacy workflow discovery tool. Prefer query_catalog(where: {kind: {eq: 'workflow'}}). List saved JavaScript workflows in ./workflows/.plan_database_setupPlan database setup without changing config. Returns ranked candidates and required next actions. Response includes machine-readable next-step guidance in the `next` field.| Parameter | Type | Description |
|---|---|---|
| scan_local | boolean | Scan localhost ports and sqlite files (default true). |
| scan_unix_sockets | boolean | Scan local Unix sockets for PostgreSQL/MySQL/MongoDB (default false). |
| targets | array | Optional explicit targets to check. Each item: {type?, host?, port?, user?, password?, dbname?, connection_string?}. |
preview_schema_changesPreview SQL changes needed to create or modify database tables. Takes a GraphJin DDL schema definition and returns the SQL that would be executed, without applying it. Use this to verify changes before calling apply_schema_changes. Example schema: type products { id: BigInt! @id\n name: Text!\n price: Numeric }| Parameter | Type | Description |
|---|---|---|
| database * | string | Database name to target (as configured in the databases map). |
| destructive | boolean | Include DROP TABLE/COLUMN operations. Default: false |
| schema * | string | GraphJin DDL schema definition. Example: type products { id: BigInt! @id name: Text! price: Numeric } |
query_catalog| Parameter | Type | Description |
|---|---|---|
| column | string | Compatibility shorthand for where.column_name.eq. |
| database | string | Compatibility shorthand for where.database_name.eq. |
| explain | boolean | When true and search is present, include score, matched fields, matched terms, and short non-sensitive match reasons. |
| id | string | Optional catalog item id. When set, returns one detailed row with details_json, evidence_json, examples_json, safety_json, and edges_json. |
| ids | array | Optional list of catalog item ids for batched detail rows in one call (max 20). Prefer this over repeated single-id calls. |
| kind | string | Compatibility shorthand for where.kind.eq. Prefer where: {kind: {eq: 'table'}} or where.kind.in for new callers. |
| limit | number | Maximum catalog items to return per call. Defaults to 100, max 500 (payloads are large). When the result's `truncated` field is true there are more matching items — page with `offset`, or narrow with `search`/`where`. |
| offset | number | Number of matching items to skip, for paging past the limit. Use offset = previous offset + limit while the result stays `truncated`. |
| order_by | object | Optional sort object. Use {score: 'desc'} with search, or fields like {title: 'asc'}, {updated_at: 'desc'}, or {created_on: 'asc'}. |
| schema | string | Compatibility shorthand for where.schema_name.eq. |
| search | string | Optional full-text search over catalog identifiers, @directives, relationship intent, analytics intent, summaries, and evidence. |
| table | string | Compatibility shorthand for where.table_name.eq. |
| where | object | Optional GraphJin-style filter object. Supported operators: eq, neq, in, nin, like, ilike, regex, iregex, contains, is_null, and, or, not. Fields include kind, title, database_name, table_name, created_at, and updated_at; created_on/updated_on are accepted aliases. Example: {kind: {in: ['table', 'relationship']}}. |
save_workflowCompatibility tool for the GraphQL control-plane mutation gj_workflow(insert/update/delete). Save a JavaScript workflow to ./workflows/<name>.js. The workflow can then be executed with gj_workflow_execution(insert), or execute_workflow when the legacy MCP tool is enabled. Call get_js_runtime_api FIRST to learn the available gj.tools.* functions. The code MUST define a `function main(input) { ... }` entry point. Declare reusable workflow variables in metadata so callers know what to pass. Use gj.tools.* to call MCP tools (e.g., gj.tools.queryCatalog({where:{kind:{eq:'table'}}}), gj.tools.getCatalogCard({id:'table:...'}), gj.tools.executeSavedQuery({name:'...'})).| Parameter | Type | Description |
|---|---|---|
| code * | string | JavaScript source code. Must define function main(input) { ... }. Use gj.tools.* for database access. Return the result object from main(). |
| description * | string | Human-readable description of what this workflow does. Future queries will match against this to find reusable workflows. |
| name * | string | Workflow name (alphanumeric, hyphens, underscores; max 64 chars). Use descriptive snake_case names like 'order_pnl' or 'customer_lifetime_value'. |
| tags | array | Optional list of tags for discoverability (e.g., ["orders", "finance", "pnl"]) |
| variables | array | Optional workflow input variable metadata. Declare variables here so callers know what execute_workflow must provide. |
search_fragmentsSearch for fragments by name using fuzzy matching. Use this to find reusable field selections for specific tables or features.| Parameter | Type | Description |
|---|---|---|
| limit | number | Maximum number of results to return (default: 10) |
| query * | string | Search term to match against fragment names |
search_saved_queriesSearch for saved queries by name using fuzzy matching. Use this to find queries related to a specific feature or table.| Parameter | Type | Description |
|---|---|---|
| limit | number | Maximum number of results to return (default: 10) |
| query * | string | Search term to match against query names |
test_database_connectionTest one candidate or explicit database config without mutating GraphJin config. Response includes machine-readable next-step guidance in the `next` field.| Parameter | Type | Description |
|---|---|---|
| candidate_id | string | Candidate ID from discover_databases/plan_database_setup. |
| candidate_snapshot | object | Optional candidate object from a previous discover/plan call. |
| config | object | Explicit config: {type, host?, port?, path?, user?, password?, dbname?, connection_string?}. For Snowflake, connection_string is required. |
| discovery_options | object | Optional options used when resolving candidate_id. |
update_current_configCompatibility tool for the GraphQL control-plane mutation gj_config(id: "current", update: ...). Update GraphJin configuration and automatically reload. Legacy config changes are applied in-memory immediately. Source-mode config writes require mode: preview first, then mode: apply with the returned preview_id and the exact same payload. Supports external sources, system/workflows feature settings, databases, relationships, MCP settings, metadata, tables, roles, blocklist, functions, and resolvers. System database names (postgres, mysql, information_schema, master, etc.) are rejected by default — use a user database name instead. Use create_if_not_exists: true to create a new database on the server before connecting (dev mode only). Response classification uses scope (core, serv, or mixed), reload_mode (hot or restart), and reload_strategy (full or source_scoped for core changes). Response includes machine-readable next-step guidance in the `next` field. WARNING: Changes are lost on restart unless persisted separately. Use get_current_config first to understand the current state.| Parameter | Type | Description |
|---|---|---|
| blocklist | array | Array of tables/columns to block globally. Use 'table_name' to block entire table or 'table_name.column_name' to block specific column. |
| create_if_not_exists | boolean | Dev mode only. When true, creates databases on the server if they don't exist before connecting. Works for PostgreSQL, MySQL/MariaDB, MSSQL, and Oracle. SQLite and MongoDB create databases automatically. Snowflake is not supported for create_if_not_exists. |
| databases | object | Map of database configs to add/update. Key is database name, value is DatabaseConfig with type, host, port, dbname, user, password, read_only, infer_db_refs for CodeSQL, etc. NOTE: read_only cannot be changed from true to false at runtime if it was set in the config file. |
| expected_catalog_revision | string | Source mode preview/apply guard. Read gj_config(id: "current") { catalog_revision } immediately before preview/apply and send that value. |
| functions | array | Array of database function configs. Each function has name and return_type. |
| mode | string | Source mode only. Use "preview" to validate and receive preview_id, then "apply" with the same payload plus preview_id. Legacy mode may omit this field. |
| preview_id | string | Source mode apply only. Returned by a successful preview; expires after 10 minutes and requires the exact same patch payload. |
| remove_blocklist_items | array | Array of blocklist entries to remove. |
| remove_databases | array | Array of database names to remove from configuration. |
| remove_functions | array | Array of function names to remove from configuration. |
| remove_resolvers | array | Array of resolver names to remove from configuration. |
| remove_roles | array | Array of role names to remove from configuration. |
| remove_saved_queries | array | Names of saved queries to remove from the config folder. |
| remove_sources | array | Array of source names to remove from configuration. |
| remove_tables | array | Array of table names to remove from configuration. |
| resolvers | array | Array of resolver configs to add/update. Resolvers join DB tables with remote APIs. |
| roles | array | Array of role configs to add/update. Each role has name, match (optional), and tables array with query/insert/update/delete permissions. |
| serv | object | Merge-patch for server-side settings (serv.Config). Writable v1 keys: agent (model, structured_output_mode, response_format [deprecated alias], service_tier, max_steps, timeout_seconds, read_only, return_trace, seed_limit, catalog_default_limit, rate_limit), log_level, log_format, web_ui, http_compress, server_timing, rate_limiter (rate, bucket, ip_header). agent changes are read live; the rest are persisted and take effect on the next restart (automatic when reload_on_config_change is enabled). Secret-bearing sections (auth, redis, uploads) are read-only on gj_config and cannot be patched here. scope reports serv or mixed and reload_mode reports hot or restart. |
| source_patches | array | Source mode patch-by-name updates for external sources. Preserves unmentioned source fields. Supports access read/write/delete, namespace_column, owner_column, missing_namespace_column, and public/admin/blocked table add/remove. |
| sources | array | Replace-all source list. Use update_sources/remove_sources for focused edits that preserve omitted sources. |
| system | object | Merge-patch built-in system capabilities and root_access. Omitted values are preserved; null removes an override and restores the mode default. |
| tables | array | Array of table configs to add/update. Each table has name, database (optional), blocklist (optional), columns (optional), order_by (optional). |
| update_saved_queries | array | Saved queries to add or replace in the config folder (queries/<name>.gql). Each item is {name, query}. Names use letters, numbers, underscores and dashes. |
| update_sources | array | Merge-patch sources by name. Existing source patches require name. New source patches require name and kind. Omitted fields are preserved, null clears fields, arrays replace, nested objects merge. |
| workflows | object | Merge-patch built-in workflow path and execute/read/write capabilities. The JavaScript runtime is fixed to Goja. |
validate_where_clauseValidate a where clause for syntax and type compatibility. Checks that operators match column types and returns detailed error messages with suggestions. Use this to verify your filter logic before including it in a full query.| Parameter | Type | Description |
|---|---|---|
| database | string | Optional database name. Omit to search all databases. |
| table * | string | Table name to validate against |
| where * | object | The where clause object to validate (for example: { price: { gt: 50 } }). Legacy callers may still pass a JSON string. |
write_mutationGenerate a GraphJin mutation guide as a tool result. Use this when the MCP client does not support prompts well and you need an insert/update/upsert/delete starter.| Parameter | Type | Description |
|---|---|---|
| data_intent | string | What data to modify (for example: 'create user with email and name') |
| database | string | Optional database name for multi-database deployments |
| nested | string | Related records to create/connect (for example: 'create order with products') |
| operation * | string | Mutation type: insert, update, upsert, or delete |
| table * | string | Table to modify |
write_queryGenerate a complete GraphJin query guide as a tool result. Use this when the MCP client does not support prompts well and you need a starter query, schema context, and follow-up steps.| Parameter | Type | Description |
|---|---|---|
| database | string | Optional database name for multi-database deployments |
| fields | string | Fields to select (for example: 'id, name, price' or 'all') |
| filter_intent | string | What to filter (for example: 'active products over $50') |
| pagination | string | Pagination style: 'limit' for limit/offset, 'cursor' for cursor-based |
| relationships | string | Related tables to include (for example: 'owner, categories') |
| table * | string | Primary table to query |
Security checks
Static checks derived from the repository 6 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 708 words.
- ✓License declaredThe repository declares the Apache-2.0 license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by package-lock.json and 5 more.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
1 check has not been run yet.
Releases
README
The repository's README runs to about 708 words, fetched 6 days ago. The original in the repository is authoritative.
Read full README