Connect Your Databases to AI
Auto-learns your schema. Compiles GraphQL into optimized SQL. Works as an MCP server for any AI assistant.
npx graphjin serveWorks With Your Databases
LLMs struggle with databases, diverse SQL dialects, custom query methods like MongoDB, complex joins.
GraphJin is a compiler that auto-learns your entire schema and generates efficient queries from simple GraphQL.
Even smaller models can describe exactly what data they need, and GraphJin handles the rest. Nothing like this exists for AI, works with Claude Desktop or any MCP client.
AI-Powered Database Queries
Ask questions in plain English. GraphJin + Claude Desktop handles the rest.
who's the top customer?
{ customers { id full_name email purchases { quantity product { price } } } }Based on the purchase data, here are the top customers ranked by total spend:
| Rank | Customer | Orders | Items | Total Spent |
|---|---|---|---|---|
| 🥇 | Antwan Friesen | 20 | 124 | $928.45 |
| 🥈 | Lon Cruickshank | 20 | 94 | $586.50 |
| 🥉 | Susana Schaefer | 20 | 91 | $580.72 |
Antwan Friesen is the top customer with almost $1,000 in purchases — about 60% more than the runner-up.
Simple & Powerful
Write GraphQL, get optimized SQL. Queries, mutations, subscriptions, and aggregations — all in one query.
query {
products(limit: 10, order_by: { price: desc }) {
id
name
price
owner {
full_name
email
}
}
}{
"products": [
{
"id": 104,
"name": "Mechanical Keyboard",
"price": 149.99,
"owner": {
"full_name": "Alice Dev",
"email": "alice@example.com"
}
}
]
}Why GraphJin?
Built for the AI era. No resolvers, no ORMs, no N+1 problems.
SQL Query for Any Complexity
Databases, Same GraphQL
Lines of Resolver Code
Works with Any AI
Production Security
RBAC, JWT auth, row-level security, query allow-lists
Auto Discovery
Introspects tables, columns, relationships automatically
Live Subscriptions
Real-time data with cursor-based pagination
JS Workflows
Chain queries, transform data, add business logic — things a single GraphQL call can't do. Invoke from MCP or REST.
function main(input) {
const top = gj.tools.executeGraphQL({
query: `{
customers(
limit: 3,
order_by: {total_spend: desc}
) {
id full_name total_spend
}
}`
});
return top.map(c => ({
name: c.full_name,
spend: "$" + c.total_spend,
tier: c.total_spend > 500
? "VIP" : "Standard"
}));
} [
{
"name": "Antwan Friesen",
"spend": "$928.45",
"tier": "VIP"
},
{
"name": "Lon Cruickshank",
"spend": "$586.50",
"tier": "VIP"
},
{
"name": "Susana Schaefer",
"spend": "$580.72",
"tier": "VIP"
}
] curl localhost:8080/api/v1/workflows/customer_report
Quick Start
npx graphjin serveUse with Node.js projects
MCP Client Setup
Copy and run one commandGlobal-scoped non-interactive install for Claude Code (default server: http://localhost:8080/)
graphjin mcp install --client claude --scope global --yesGlobal-scoped non-interactive install for OpenAI Codex (default server: http://localhost:8080/)
graphjin mcp install --client codex --scope global --yesPrefer interactive setup? Run: graphjin mcp install
Works on macOS, Windows, and Linux. Supports PostgreSQL, MySQL, SQLite, MongoDB, and more.
Get Started
From zero to queries in minutes.
Point to Your Database
Configure your connection — PostgreSQL, MySQL, SQLite, and more.
Auto-Discover Schema
GraphJin introspects tables, columns, and relationships automatically.
Start Querying
Joins, aggregations, and subscriptions work out of the box.
Point to Your Database
Configure your connection — PostgreSQL, MySQL, SQLite, and more.
Auto-Discover Schema
GraphJin introspects tables, columns, and relationships automatically.
Start Querying
Joins, aggregations, and subscriptions work out of the box.