VOOZH about

URL: https://apify.com/constant_quadruped/database-mcp-server

⇱ Database MCP Server Β· Apify


Pricing

Pay per usage

Go to Apify Store

Database MCP Server

MCP Server for AI database access. Connect to PostgreSQL, MySQL, or SQLite. Query data, inspect schemas, list tables, describe columns, view indexes and foreign keys. 11 tools for complete database intelligence. Works with Claude Desktop and any MCP client.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

πŸ‘ CQ

CQ

Maintained by Community

Actor stats

0

Bookmarked

5

Total users

1

Monthly active users

2 months ago

Last modified

Share

MCP Server for AI database access. Connect to PostgreSQL, MySQL, or SQLite. Query data, inspect schemas, manage tables. 11 tools for complete database intelligence.

Features

  • Multi-database - PostgreSQL, MySQL, SQLite
  • Query execution - SELECT with automatic LIMIT protection
  • Schema inspection - Tables, columns, foreign keys, indexes
  • Safe operations - Separate read (query) and write (execute) tools
  • Cloud-ready - Secure connections via Apify infrastructure

Input Parameters

ParameterTypeDescription
toolstringDatabase tool to execute
dbTypestringpostgresql, mysql, or sqlite
connectionStringstringFull connection URI
hoststringDatabase host
portintegerDatabase port
databasestringDatabase name
userstringUsername
passwordstringPassword (secret)
sslbooleanEnable SSL (default: true)
querystringSQL query to execute
tableNamestringTable for describe/info operations
limitintegerMax rows to return (default: 1000)
timeoutintegerQuery timeout in ms (default: 30000)
sqliteUrlstringURL to SQLite database file
sqliteDatastringBase64-encoded SQLite database

Tools

ToolDescription
db.connectConnect to database
db.disconnectClose connection
db.queryExecute SELECT (read-only)
db.executeExecute INSERT/UPDATE/DELETE/DDL
db.list_tablesList all tables
db.describe_tableGet column definitions
db.get_schemaFull schema (all tables)
db.list_databasesList databases on server
db.table_infoRow count, size statistics
db.foreign_keysForeign key relationships
db.indexesIndex information

Examples

Connect to PostgreSQL

{
"tool":"db.connect",
"dbType":"postgresql",
"connectionString":"postgresql://user:pass@host:5432/dbname"
}

Or with individual parameters:

{
"tool":"db.connect",
"dbType":"postgresql",
"host":"your-host.com",
"port":5432,
"database":"mydb",
"user":"myuser",
"password":"mypassword",
"ssl":true
}

Connect to MySQL

{
"tool":"db.connect",
"dbType":"mysql",
"host":"your-mysql-host.com",
"port":3306,
"database":"mydb",
"user":"myuser",
"password":"mypassword"
}

Connect to SQLite (URL)

{
"tool":"db.connect",
"dbType":"sqlite",
"sqliteUrl":"https://example.com/database.db"
}

Query Data

{
"tool":"db.query",
"dbType":"postgresql",
"connectionString":"postgresql://...",
"query":"SELECT * FROM users WHERE active = true",
"limit":100
}

Get Schema

{
"tool":"db.get_schema",
"dbType":"postgresql",
"connectionString":"postgresql://..."
}

Describe Table

{
"tool":"db.describe_table",
"dbType":"postgresql",
"connectionString":"postgresql://...",
"tableName":"users"
}

Execute Statement

{
"tool":"db.execute",
"dbType":"postgresql",
"connectionString":"postgresql://...",
"query":"INSERT INTO logs (message) VALUES ('Hello World')"
}

Output Schema

FieldTypeDescription
typestringAlways tool_result
toolstringTool that was executed
statusstringsuccess or error
dataobjectResult data (rows, fields)
rowCountintegerNumber of rows returned
executionTimeintegerQuery time in ms
errorstringError message if failed

Success Response

{
"type":"tool_result",
"tool":"db.query",
"status":"success",
"data":{
"rows":[...],
"fields":["column1","column2"]
},
"rowCount":10,
"executionTime":45
}

Error Response

{
"type":"tool_result",
"tool":"db.query",
"status":"error",
"error":"relation \"users\" does not exist"
}

MCP Integration

Claude Desktop

{
"mcpServers":{
"database":{
"command":"npx",
"args":["-y","@anthropic/apify-mcp-client","constant_quadruped/database-mcp-server"]
}
}
}

Apify Client (JavaScript)

import{ ApifyClient }from'apify-client';
const client =newApifyClient({token:'YOUR_TOKEN'});
const run =await client.actor('constant_quadruped/database-mcp-server').call({
tool:'db.query',
dbType:'postgresql',
connectionString:'postgresql://user:pass@host:5432/db',
query:'SELECT * FROM users LIMIT 10'
});
const{ items }=await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Apify Client (Python)

from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("constant_quadruped/database-mcp-server").call(run_input={
"tool":"db.query",
"dbType":"postgresql",
"connectionString":"postgresql://user:pass@host:5432/db",
"query":"SELECT * FROM users LIMIT 10"
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)

Use Cases

  • Data exploration - Understand database structure
  • Report generation - Query data for AI reports
  • Schema documentation - Auto-generate database docs
  • Data migration - Inspect source and target schemas
  • Debugging - Query logs and metrics tables

Security

  • Passwords and connection strings marked as secrets
  • SSL enabled by default for PostgreSQL and MySQL
  • Query results limited to prevent memory issues
  • Separate read (query) and write (execute) operations

License

MIT

You might also like

Lead Generation MCP Server β€” AI Agent Tools

samstorm/lead-gen-mcp-server

MCP server for AI agents. Connect Claude, GPT, or any MCP client to find business leads, hiring companies, building permits, and Amazon product research. One endpoint, 13 lead gen tools.

1

Database Schema Explorer

balathon/database-schema-explorer

This Apify Actor connects to various types of databases (SQLite, PostgreSQL, MySQL, Oracle, Microsoft SQL Server), explores their schemas, provides detailed information about tables and columns, shows row counts, and optionally reads sample data.

πŸ‘ User avatar

Balasai Sigireddy

2

Excel Mcp Server

lovely_radiologist/excel-mcp-server

AI Data Bridge: Multi-Database Connector

the.beast/ai-data-bridge

Stop juggling 7 different database tools. AI DataBridge connects PostgreSQL, MySQL, MongoDB, Airtable, Notion, and Google Sheets through a single MCP interface. Ask questions in plain Englishβ€”get answers from any database instantly. AI database connector, multi-database integration

Better Business Bureu Mcp Server [PPR]

zadexinho/bbb-mcp-server

MCP server for AI agents to access BBB ratings, accreditation, reviews, and complaints. Three tools: get_business for full profiles, search_businesses by query and location, get_complaints with business responses. Connect from Claude Desktop, ChatGPT, Cursor, or any MCP-compatible client.

Sitejabber Mcp Server [PPR]

zadexinho/sitejabber-mcp-server

MCP server for AI agents to query Sitejabber reviews, ratings, and company profiles. Three tools: get_reviews with star/sort/verified filters, get_company_profile for trust data, browse_category for industry discovery. Connect from Claude Desktop, ChatGPT, Cursor, or any MCP-compatible client.

Related articles

Best MCP servers for developers
Read more
Build and deploy MCP servers in minutes with a TypeScript template
Read more
How to use MCP with Apify Actors
Read more