@ayushmantripathy/db-mcp
v0.0.4
Published
`db-mcp` is an MCP server that provides tools to interact with a Postgres database. It connects to the database by reading the `DATABASE_URL` from the environment of the project it is run in. It allows you to list tables, read rows, and view table schema
Readme
db-mcp
db-mcp is an MCP server that provides tools to interact with a Postgres database.
It connects to the database by reading the DATABASE_URL from the environment of the project it is run in.
It allows you to list tables, read rows, and view table schemas directly from your agents.
Tools
list-tables: Retrieve a list of all base tables present in the database.read-rows-of-table: Read rows from a specific table, with optional conditions and limits.get-table-schema: Retrieve the schema definition of any database table.
Installation
This project requires Bun to be installed on your system.
The server uses the DATABASE_URL environment variable to connect to your Postgres database.
To install and use this MCP server in your agents, add the following configuration to your .agents/mcp_config.json file:
{
"mcpServers": {
"db-mcp": {
"command": "bunx",
"args": [
"@ayushmantripathy/db-mcp"
],
}
}
}