{"id":30871696,"url":"https://github.com/thesoulless/usqlmcp","last_synced_at":"2025-09-07T22:28:58.696Z","repository":{"id":288611374,"uuid":"968592628","full_name":"thesoulless/usqlmcp","owner":"thesoulless","description":"A universal SQL MCP (Model Context Protocol).","archived":false,"fork":false,"pushed_at":"2025-08-13T18:24:24.000Z","size":158,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-31T23:58:41.218Z","etag":null,"topics":["mcp","sql"],"latest_commit_sha":null,"homepage":"","language":"Go","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/thesoulless.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}},"created_at":"2025-04-18T11:11:45.000Z","updated_at":"2025-08-13T18:24:20.000Z","dependencies_parsed_at":"2025-05-26T01:02:25.823Z","dependency_job_id":null,"html_url":"https://github.com/thesoulless/usqlmcp","commit_stats":null,"previous_names":["thesoulless/usqlmcp"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/thesoulless/usqlmcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesoulless%2Fusqlmcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesoulless%2Fusqlmcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesoulless%2Fusqlmcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesoulless%2Fusqlmcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thesoulless","download_url":"https://codeload.github.com/thesoulless/usqlmcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesoulless%2Fusqlmcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274106527,"owners_count":25223436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"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":["mcp","sql"],"created_at":"2025-09-07T22:05:24.306Z","updated_at":"2025-09-07T22:28:58.676Z","avatar_url":"https://github.com/thesoulless.png","language":"Go","funding_links":[],"categories":["🗄️ Database"],"sub_categories":[],"readme":"# usqlmcp\n\nA universal SQL MCP (Model Context Protocol).\n\n[releases]: https://github.com/thesoulless/usqlmcp/releases \"Releases\"\n\n## Features\n\n- **Tools**\n  - `read_query`: Execute a `SELECT` query and return the results.\n  - `write_query`: Execute an `INSERT`, `UPDATE`, `DELETE`, or `ALTER` query and return the number of affected rows.\n  - `create_table`: Execute a `CREATE TABLE` query to define new tables in the database.\n  - `describe_table_schema`: Get the JSON schema for a given table, including column names and data types, for all supported databases.\n\n- **Resources**\n  - `usqlmcp://\u003ctable\u003e/schema`: Access table schema as JSON resource for any table in the database.\n  - Individual table schema resources are automatically discovered and registered for each table.\n\n## Installing\n`usqlmcp` is available [via Release][]\n\n[via Release]: #installing-via-release\n\n### Installing via Release\n\n1. [Download a release for your platform][releases]\n2. Extract the `usqlmcp` or `usqlcmp.exe` file from the `.tar.bz2` or `.zip` file\n3. Move the extracted executable to somewhere on your `$PATH` (Linux/macOS) or\n   `%PATH%` (Windows)\n\n# Setup\n\n## MCP Integration in Cursor\n\nAdd the following configuration to your ~/.cursor/mcp.json file or configure via the settings menu in Cursor.\n\n```json\n{\n    \"mcpServers\": {\n        \"usqlmcp\": {\n            \"command\": \"usqlmcp\",\n            \"args\": [\"--dsn\", \"sqlite3:///your/db/dsn/file.db\"]\n        }\n    }\n}\n```\n\n## Other tools\n\n```json\n{\n    \"servers\": {\n        \"usqlmcp\": {\n            \"type\": \"stdio\",\n            \"command\": \"usqlmcp\",\n            \"args\": [\"--dsn\", \"sqlite3:///your/db/dsn/file.db\"]\n        }\n    }\n}\n```\n\n## Docker Usage\n\nYou can configure usqlmcp to run via Docker in Cursor by specifying the appropriate command and arguments in your MCP JSON configuration.\n\n### Example: Postgres (Docker)\n\nAdd the following to your `~/.cursor/mcp.json`:\n\n```json\n{\n    \"mcpServers\": {\n        \"usqlmcp\": {\n            \"command\": \"docker\",\n            \"args\": [\n                \"run\", \"-i\", \"--rm\",\n                \"ghcr.io/thesoulless/usqlmcp:latest\",\n                \"--dsn\", \"postgres://username:password@host.docker.internal:5432/dbname?sslmode=disable\"\n            ]\n        }\n    }\n}\n```\n\nNote: When connecting to a database on your host machine, use `host.docker.internal` instead of `localhost` or `127.0.0.1`.\n\n### Example: SQLite with Volume Mounting (Docker)\n\nTo use a SQLite database file from your local machine, add the following to your `~/.cursor/mcp.json`:\n\n```json\n{\n    \"mcpServers\": {\n        \"usqlmcp\": {\n            \"command\": \"docker\",\n            \"args\": [\n                \"run\", \"-i\", \"--rm\",\n                \"-v\", \"/path/to/local/mydatabase.db:/data/mydatabase.db\",\n                \"ghcr.io/thesoulless/usqlmcp:latest\",\n                \"--dsn\", \"sqlite3:///data/mydatabase.db\"\n            ]\n        }\n    }\n}\n```\n\nThis mounts your local SQLite database file directly into the container, providing access to only what's needed.\n\n## Acknowledgments\n\nThis project depends on [usql](https://github.com/xo/usql), a universal command-line interface for SQL databases.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesoulless%2Fusqlmcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesoulless%2Fusqlmcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesoulless%2Fusqlmcp/lists"}