Skip to main content
Glama
avantifellows

Avanti Fellows PostgreSQL MCP Server

Official

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
AF_DB_HOSTYesThe database host
AF_DB_NAMEYesThe database name
AF_DB_PORTNoThe database port5432
AF_DB_USERYesThe database username
AF_DB_PASSWORDYesThe database password

Tools

Functions exposed to the LLM to take actions

NameDescription
query

Execute a read-only SQL query against the database.

Only SELECT queries are allowed. Use this to explore data, debug issues, or validate assumptions about the data. Args: sql: A SELECT query to execute Returns: JSON array of results, or error message
list_tables

List all tables in the database.

Returns tables from all schemas (excluding system schemas). Use this to discover what data is available. Returns: JSON array of tables with schema, name, and type
describe_table

Get detailed schema information for a table.

Returns column names, types, nullability, and defaults. Use this to understand table structure before querying. Args: table_name: Name of the table schema_name: Schema name (default: public) Returns: JSON with columns, primary keys, and foreign keys
sample_data

Get sample rows from a table.

Useful for understanding what data looks like without writing a full query. Args: table_name: Name of the table schema_name: Schema name (default: public) limit: Number of rows to return (default: 10, max: 100) Returns: JSON array of sample rows
count_rows

Count rows in a table, optionally with a WHERE clause.

Args: table_name: Name of the table schema_name: Schema name (default: public) where: Optional WHERE clause (without 'WHERE' keyword) Returns: JSON with count
search_columns

Search for columns by name across all tables.

Useful when you know a column name but not which table it's in. Args: search_term: Partial column name to search for (case-insensitive) Returns: JSON array of matching columns with their tables

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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/avantifellows/mcp-postgres'

If you have feedback or need assistance with the MCP directory API, please join our Discord server