{"id":50213470,"url":"https://github.com/annettedorothea/db2ai","last_synced_at":"2026-07-04T20:00:24.963Z","repository":{"id":359752481,"uuid":"1246053952","full_name":"annettedorothea/db2ai","owner":"annettedorothea","description":"db2ai generates MCP tools from SQL queries. It defines curated database queries with AI-facing metadata such as intent, examples, and column documentation, and validates them against a live database using EXPLAIN.","archived":false,"fork":false,"pushed_at":"2026-06-30T04:43:47.000Z","size":3062,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-30T06:22:16.233Z","etag":null,"topics":["ai-tools","code-generation","database","dsl","langium","mcp","model-context-protocol","query-builder","sql","tool-generation"],"latest_commit_sha":null,"homepage":"https://toolfactory.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/annettedorothea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-21T20:35:04.000Z","updated_at":"2026-06-30T04:43:51.000Z","dependencies_parsed_at":"2026-06-06T13:04:21.955Z","dependency_job_id":null,"html_url":"https://github.com/annettedorothea/db2ai","commit_stats":null,"previous_names":["annettedorothea/db2ai"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/annettedorothea/db2ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annettedorothea%2Fdb2ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annettedorothea%2Fdb2ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annettedorothea%2Fdb2ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annettedorothea%2Fdb2ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/annettedorothea","download_url":"https://codeload.github.com/annettedorothea/db2ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annettedorothea%2Fdb2ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35133834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-tools","code-generation","database","dsl","langium","mcp","model-context-protocol","query-builder","sql","tool-generation"],"created_at":"2026-05-26T07:00:54.349Z","updated_at":"2026-07-04T20:00:24.878Z","avatar_url":"https://github.com/annettedorothea.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# db2ai\n\n\u003e Generate curated MCP tools from relational databases.\n\n\u003e **Pre-release**\n\u003e APIs, the DSL, and generated output may change before v1.0.\n\n## Ecosystem\n\n| Repository                                            | Purpose                                                |\n| ----------------------------------------------------- | ------------------------------------------------------ |\n| [core2ai](https://github.com/annettedorothea/core2ai) | Shared runtime, architecture, and documentation        |\n| [api2ai](https://github.com/annettedorothea/api2ai)   | Generate curated MCP tools from OpenAPI specifications |\n| [db2ai](https://github.com/annettedorothea/db2ai)     | Generate curated MCP tools from relational databases   |\n\nInstead of hand-writing MCP servers, define the SQL queries you want as tools, enrich them in `.db2ai`, and generate executable MCP tooling.\n\nYou curate which queries become tools — not every table or statement is exposed automatically.\n\n---\n\n## Quick Start\n\nThe easiest way to explore `db2ai` is with the VSIX extension and the bundled demo workspace.\n\n### 1. Install the extension\n\nDownload the latest VSIX from the GitHub releases page:\n\nhttps://github.com/annettedorothea/db2ai/releases\n\n### 2. Create a demo workspace\n\nIn Cursor or VS Code, run:\n\n```text\ndb2ai: Create demo workspace (MCP examples)\n```\n\n### 3. Start your first MCP server\n\nOpen the generated [Demo Workspace README](packages/extension/demos/README.md) and follow the Quick Start.\n\nThe demo workspace includes PostgreSQL, MySQL, MariaDB, SQL Server, and Oracle examples.\n\n---\n\n## How it works\n\n```text\nDatabase Schema\n        │\n        ▼\n   select \u0026 enrich\n        │\n        ▼\n     .db2ai\n        │\n        ▼\nGenerated MCP Server\n        │\n        ▼\nCursor • ChatGPT • Claude • Open WebUI\n```\n\nExample:\n\n```text\ndatabase postgres env \"PAGILA_POSTGRESQL_DATABASE_URL\"\n\nauth\n\nSQL {\n    toolName: listFilms\n    access: protected\n    hooks: {\n        prepareToolCall: true\n    }\n    intent: \"list films with pagination\"\n    query: \"SELECT * FROM film LIMIT LEAST(:limit, 100) OFFSET :offset\"\n    params: {\n        limit: { description: \"max rows per page\" example: \"100\" type: integer }\n        offset: { description: \"rows to skip\" example: \"0\" type: integer }\n    }\n}\n```\n\n---\n\n## Documentation\n\nLooking for architecture, authentication, MCP concepts, integrations, or development guides?\n\nSee the shared documentation in [core2ai](https://github.com/annettedorothea/core2ai):\n\n- [Documentation index](https://github.com/annettedorothea/core2ai/blob/main/docs/README.md)\n- [db2ai DSL](https://github.com/annettedorothea/core2ai/blob/main/docs/authoring/db2ai-dsl.md)\n- [Supported SQL patterns](https://github.com/annettedorothea/core2ai/blob/main/docs/authoring/supported-sql.md)\n- [Auth and hooks](https://github.com/annettedorothea/core2ai/blob/main/docs/authoring/auth-and-hooks.md)\n\nSee [CHANGELOG.md](CHANGELOG.md) for version history and upgrade notes.\n\n---\n\n## Related Projects\n\n- [core2ai](https://github.com/annettedorothea/core2ai) — Shared runtime, code generation infrastructure, and documentation.\n- [api2ai](https://github.com/annettedorothea/api2ai) — Generate curated MCP tools from OpenAPI specifications.\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\nQuestions, ideas, bug reports, and feature requests are always welcome through GitHub Discussions or Issues.\n\n---\n\n\u003e _Whatever you do, work heartily, as for the Lord and not for men._\n\u003e\n\u003e **— Colossians 3:23**\n\u003e\n\u003e _Created by Annette Pohl_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fannettedorothea%2Fdb2ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fannettedorothea%2Fdb2ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fannettedorothea%2Fdb2ai/lists"}