mcp-server-db
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| logging | {} |
| completions | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| db_statusA | List the live connection state of every configured database (postgres/redis/elasticsearch), including state, readOnly mode, last error, and next retry time. |
| db_reload_configA | Reload the databases.config.yml configuration file from disk, recreate connections, and reconnect. |
| pg_queryA | Run a read-only SELECT query against a configured Postgres connection. |
| pg_execute_sqlA | Run any SQL statement (INSERT/UPDATE/DELETE/DDL) against a configured Postgres connection. Blocked when that connection's own readOnly mode is enabled. |
| pg_list_tablesB | List all tables in the specified schema of a configured Postgres connection. |
| pg_describe_tableA | Describe the columns of a table in the specified schema of a configured Postgres connection. |
| pg_list_schemasB | List all database schemas. |
| pg_list_viewsB | List all views in the specified schema. |
| pg_list_indexesB | List all indexes for a given table in the specified schema. |
| pg_list_triggersB | List all triggers in the specified schema. |
| pg_table_statsA | Get statistics for a given table in the specified schema, including table size, index size, and estimated row count. |
| pg_list_constraintsA | List constraints (foreign keys, primary keys, check constraints) on a table in the specified schema. |
| pg_explain_queryA | Run EXPLAIN on a read-only SELECT query to analyze query performance. |
| pg_active_queriesB | Get active queries currently running on the server. |
| pg_list_functionsA | List all user-defined functions in the specified schema. |
| pg_list_sequencesA | List all sequences in the specified schema. |
| pg_database_infoC | Get metadata and size information about the current database. |
| pg_kill_queryB | Terminate an active query by PID. Blocked when that connection's own readOnly mode is enabled. |
| pg_vacuum_analyzeA | Run VACUUM ANALYZE on a table to clean dead tuples and update database statistics. Blocked when that connection's own readOnly mode is enabled. |
| pg_list_materialized_viewsA | List all materialized views in the specified schema. |
| pg_refresh_materialized_viewB | Refresh a materialized view. Blocked when that connection's own readOnly mode is enabled. |
| pg_index_usageA | Retrieve index usage statistics for all user tables in the specified schema. |
| pg_lock_infoB | Get active lock information from the database catalog. |
| pg_get_top_queriesA | Get the slowest SQL queries based on execution time from pg_stat_statements (if the extension is enabled). |
| pg_explain_hypothetical_indexA | Explain a query's execution plan simulating hypothetical indexes using the hypopg extension (if installed). |
| pg_database_healthB | Get a comprehensive database health report (connections, buffer cache, invalid indexes, dead rows, and replication). |
| pg_sizes_overviewB | Get size statistics for the database and all tables/indexes in a schema. |
| pg_unused_indexesA | Find indexes that have never been used (zero scans since last stats reset). Great for identifying candidates to DROP to save space and reduce write overhead. |
| pg_duplicate_indexesA | Find redundant indexes where one index's leading columns are a subset of another, making the smaller one unnecessary. |
| pg_long_running_queriesC | Find queries that have been running longer than a given threshold in seconds. |
| pg_missing_indexesA | Find tables that have high sequential scan counts relative to index scans, suggesting they might benefit from new indexes. |
| pg_bloat_estimateA | Estimate table and index bloat using pg_stat_user_tables statistics (dead tuples vs live tuples ratio). Returns tables where dead tuple ratio exceeds a threshold. |
| redis_getB | Get the value stored at a Redis key. |
| redis_setB | Set a Redis key to a value. Blocked when that connection's own readOnly mode is enabled. |
| redis_msetA | Set multiple string keys to their values in a single command (e.g. for seeding test/sample data) — far more efficient than one redis_set call per key. Blocked when that connection's own readOnly mode is enabled. |
| redis_delC | Delete a Redis key. Blocked when that connection's own readOnly mode is enabled. |
| redis_keysA | List Redis keys matching a glob pattern (e.g. 'user:*'). Capped at 1000 keys; result is truncated=true with a total count if there are more. |
| redis_ttlA | Get the remaining time to live (in seconds) of a Redis key, or -1 if it has none. |
| redis_hgetC | Get the value of a hash field. |
| redis_hsetB | Set the value of a hash field. Blocked when that connection's own readOnly mode is enabled. |
| redis_hdelB | Delete one or more hash fields. Blocked when that connection's own readOnly mode is enabled. |
| redis_hgetallA | Get all fields and values of a hash. |
| redis_hexistsC | Check if a hash field exists. |
| redis_saddA | Add a member to a set. Blocked when that connection's own readOnly mode is enabled. |
| redis_sremB | Remove a member from a set. Blocked when that connection's own readOnly mode is enabled. |
| redis_smembersA | Get all members of a set. Capped at 1000 members; result is truncated=true with a total count if there are more. |
| redis_sismemberA | Check if a value is a member of a set. |
| redis_lpushA | Prepend a value to a list. Blocked when that connection's own readOnly mode is enabled. |
| redis_rpushB | Append a value to a list. Blocked when that connection's own readOnly mode is enabled. |
| redis_lpopC | Remove and return the first element of a list. Blocked when that connection's own readOnly mode is enabled. |
| redis_rpopA | Remove and return the last element of a list. Blocked when that connection's own readOnly mode is enabled. |
| redis_lrangeB | Get a range of elements from a list. Capped at 1000 elements; result is truncated=true with a total count if there are more. |
| redis_llenB | Get the length of a list. |
| redis_existsC | Check key existence. |
| redis_expireB | Set a key's time to live in seconds. Blocked when that connection's own readOnly mode is enabled. |
| redis_typeC | Retrieve the internal data type of a key. |
| redis_incrA | Increment the integer value of a key. Blocked when that connection's own readOnly mode is enabled. |
| redis_decrB | Decrement the integer value of a key. Blocked when that connection's own readOnly mode is enabled. |
| redis_flushdbA | Delete all keys from the current database. Blocked when that connection's own readOnly mode is enabled. |
| es_cluster_healthA | Get Elasticsearch cluster health: status (green/yellow/red), node count, and shard counts. |
| es_list_indicesB | List all indices with document count, size, and health status. |
| es_index_statsA | Get stats (doc count, store size, segments) for a specific index. |
| es_searchB | Run a search query against an index using Elasticsearch Query DSL. |
| es_countA | Count documents in an index matching a query (or all documents if no query is given). |
| es_get_docB | Get a document by id from an index. |
| es_index_docA | Index (create or overwrite) a document. Blocked when that connection's own readOnly mode is enabled. |
| es_bulk_indexA | Index (create or overwrite) multiple documents into one index in a single request via the Elasticsearch _bulk API (e.g. for seeding test/sample data) — far more efficient than one es_index_doc call per document. Reports per-document success/failure rather than aborting the whole batch on one bad document. Blocked when that connection's own readOnly mode is enabled. |
| es_update_docB | Partially update a document by id. Blocked when that connection's own readOnly mode is enabled. |
| es_delete_docC | Delete a document by id. Blocked when that connection's own readOnly mode is enabled. |
| es_delete_by_queryB | Delete all documents in an index matching a query. Blocked when that connection's own readOnly mode is enabled. |
| mysql_queryA | Run a read-only SELECT/SHOW/EXPLAIN query against a configured MySQL connection. |
| mysql_execute_sqlB | Run any SQL statement (INSERT/UPDATE/DELETE/DDL) against a configured MySQL connection. Blocked when readOnly mode is enabled. |
| mysql_list_databasesA | List all databases on a MySQL connection. |
| mysql_list_tablesB | List tables in a MySQL database. |
| mysql_list_viewsC | List views in a MySQL database. |
| mysql_describe_tableB | Show column definitions and metadata for a MySQL table. |
| mysql_show_create_tableB | Get the exact CREATE TABLE DDL statement for a MySQL table. |
| mysql_show_create_viewC | Get the exact CREATE VIEW DDL statement for a MySQL view. |
| mysql_list_indexesB | Show all indexes for a specified MySQL table. |
| mysql_list_triggersC | List triggers in a MySQL database. |
| mysql_list_routinesC | List stored procedures and functions in a MySQL database. |
| mysql_list_constraintsA | List table constraints and foreign keys in a MySQL database. |
| mysql_table_statsC | Get size, row count estimates, and index sizes for tables in a MySQL database. |
| mysql_active_queriesB | List currently running queries and processes in MySQL. |
| mysql_kill_queryA | Kill a running query or connection thread by ID in MySQL. Blocked when readOnly mode is enabled. |
| mysql_explain_queryB | Get the execution plan for a MySQL query. |
| mysql_global_statusC | Show server status variables in MySQL. |
| mysql_analyze_tableB | Analyze key distribution for a MySQL table. Blocked when readOnly mode is enabled. |
| mongo_list_databasesB | List all databases in MongoDB. |
| mongo_list_collectionsB | List all collections in a MongoDB database. |
| mongo_findC | Query documents from a MongoDB collection. |
| mongo_distinctC | Find distinct values for a specified field in a MongoDB collection. |
| mongo_aggregateC | Run an aggregation pipeline on a MongoDB collection. |
| mongo_count_documentsB | Count documents matching a filter in a MongoDB collection. |
| mongo_insert_oneA | Insert a single document into a MongoDB collection. Blocked when readOnly mode is enabled. |
| mongo_insert_manyB | Insert multiple documents into a MongoDB collection. Blocked when readOnly mode is enabled. |
| mongo_update_oneC | Update a single document matching filter in MongoDB. Blocked when readOnly mode is enabled. |
| mongo_update_manyC | Update multiple documents matching filter in MongoDB. Blocked when readOnly mode is enabled. |
| mongo_delete_oneA | Delete a single document matching filter in MongoDB. Blocked when readOnly mode is enabled. |
| mongo_delete_manyB | Delete multiple documents matching filter in MongoDB. Blocked when readOnly mode is enabled. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Nam088/mcp-database-server-v2'
If you have feedback or need assistance with the MCP directory API, please join our Discord server