Agent-to-Database — CLI and MCP server for AI agents to query databases.
Project description
a2db
Agent-to-Database — query databases from CLI or as an MCP server.
Install
pip install a2db
Install the database driver you need:
pip install psycopg2-binary # PostgreSQL
pip install mysql-connector-python # MySQL
# SQLite is built-in
CLI Usage
# Save a connection
a2db login -p myapp -e prod -d users "postgresql://user:pass@localhost/mydb"
# List connections
a2db connections
# Run a query
a2db query -p myapp -e prod -d users "SELECT * FROM users LIMIT 10"
# JSON output
a2db query -p myapp -e prod -d users -f json "SELECT * FROM users LIMIT 10"
# Explore schema
a2db schema -p myapp -e prod -d users tables
a2db schema -p myapp -e prod -d users columns -t users
a2db schema -p myapp -e prod -d users full
MCP Usage
Add to your MCP client configuration:
{
"mcpServers": {
"a2db": {
"command": "uvx",
"args": ["a2db-mcp"]
}
}
}
Development
make bootstrap # Install deps
make check # Lint + test
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file a2db-0.1.0.tar.gz.
File metadata
- Download URL: a2db-0.1.0.tar.gz
- Upload date:
- Size: 94.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92224cc5f4508fa9546f1555d5bb48dbbe3ee9c74c3a9d5fc066ffd5aac07495
|
|
| MD5 |
c5e847a41c5868b9f73ca014d0a31197
|
|
| BLAKE2b-256 |
0a9cae821ddb627ac1b4861cdd349a73c8db1c946fdf922b098609aeca0e7ded
|
Provenance
The following attestation bundles were made for a2db-0.1.0.tar.gz:
Publisher:
publish.yml on agentic-eng/a2db
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
a2db-0.1.0.tar.gz -
Subject digest:
92224cc5f4508fa9546f1555d5bb48dbbe3ee9c74c3a9d5fc066ffd5aac07495 - Sigstore transparency entry: 1191734248
- Sigstore integration time:
-
Permalink:
agentic-eng/a2db@47176f19581f0260745de84d945770a976a61a32 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/agentic-eng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@47176f19581f0260745de84d945770a976a61a32 -
Trigger Event:
push
-
Statement type:
File details
Details for the file a2db-0.1.0-py3-none-any.whl.
File metadata
- Download URL: a2db-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff7c82471e8bf0ab8b0815580161ef323d98789b7517df5c551337153d783b20
|
|
| MD5 |
e20ed35d192e886a3ad9a076d6b9c4db
|
|
| BLAKE2b-256 |
a5837d21383b036f96a7ae538da91829fe104cd48f9e3a641d2dd6e7856ed1ed
|
Provenance
The following attestation bundles were made for a2db-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on agentic-eng/a2db
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
a2db-0.1.0-py3-none-any.whl -
Subject digest:
ff7c82471e8bf0ab8b0815580161ef323d98789b7517df5c551337153d783b20 - Sigstore transparency entry: 1191734249
- Sigstore integration time:
-
Permalink:
agentic-eng/a2db@47176f19581f0260745de84d945770a976a61a32 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/agentic-eng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@47176f19581f0260745de84d945770a976a61a32 -
Trigger Event:
push
-
Statement type: