
This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A template MCP server that acts as a gateway between an MCP client and a toy PostgreSQL users table, exposing example tools for managing user records.
Template MCP server with a PostgreSQL user database backend is cataloged as an MCP server attributed to alexander-nestor-bergmann. A template MCP server that acts as a gateway between an MCP client and a toy PostgreSQL users table, exposing example tools for managing user records. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Template MCP server with a PostgreSQL user database backend are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
No; the tools are simplified examples and not intended for production use.
The users table has an id integer primary key, a name text field, and a unique email text field.
README.md · e487e4a341ea · Fetched 2026-11-13 12:04:48 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
This repository serves as a template, demonstrating how to implement an MCP (Model Context Protocol) server - an open standard designed to connect AI agents and services (like Claude) to tools and data sources. The primary goal of this repository is to illustrate how to build, configure, and run a basic MCP server. The tools are simplified examples and not intended for production use.
This specific example server uses a simple PostgreSQL database backend to manage user data, showcasing how MCP can bridge the gap between AI agents and external resources.
The server acts as a secure gateway between an MCP client (e.g., an AI agent) and an external data source (in this case, a toy PostgreSQL database containing a users table). It demonstrates how to:
The demo users table used in this example has the following structure:
id (integer, primary key)name (text)email (text, unique)To illustrate how tools are defined and exposed, this server implements the following example functions for interacting with the user database:
add_user: Adds a new user to the database.
name (string), email (string)get_all_users: Retrieves a list of all users from the database.
id, name, email) or error.find_user_by_email: Finds a specific user by their email address.
email (string)delete_user_by_email: Deletes a user from the database based on their email address.
email (string)These tools serve as concrete examples of the kinds of operations an MCP server might provide access to.
uv (for local development dependency management).Environment variables are used to configure the database connection and server settings. Copy the .env.example file to .env and update the values:
cp .env.example .env
# Edit .env with your database details and desired server settings
Key variables:
| Variable | Description | Example | Required | Default |
|---|---|---|---|---|
DB_URL | Full PostgreSQL connection URL. | postgresql+asyncpg://user:pass@host:5432/dbname | Yes | |
DB_HOST | Host address for the MCP server to listen on. | 0.0.0.0 | No | 0.0.0.0 |
DB_PORT | Port for the MCP server to listen on. | 8051 | No | 8051 |
MCP_SIGNING_KEY | Optional secret key for signing requests between client and server. | your_very_secret_key | No |
Note: The DB_URL should use an asyncpg compatible driver prefix like postgresql+asyncpg://.
Build the Image: (Ensure you have Docker installed and running)
# Navigate to the project root directory (agents-mcp-demo)
docker build -t sql-mcp-demo-server --build-arg PORT=${DB_PORT:-8051} .
Run the Container:
docker run --rm -d --env-file .env -p ${DB_PORT:-8051}:${DB_PORT:-8051} --name sql-mcp-server sql-mcp-demo-server
uv. Navigate to the project root directory.
# Create a virtual environment (recommended)
python -m venv .venv
source .venv/bin/activate # or .\.venv\Scripts\activate on Windows
# Install using uv
uv pip install -e .[dev]
DB_URL is set in your shell environment or is present in a .env file in the root directory (dotenv is used).uv run python sqlmcp/server.py
(The server will use host/port from environment variables or defaults)Configure your MCP client to connect to the running server. The connection details depend on how you are running the server.
Example SSE Configuration (if running via Docker/Compose):
{
"mcpServers": {
"sqlDemoServer": { // Choose a name for this server connection
"transport": "sse",
"url": "http://localhost:8051/sse", // Adjust port if changed from default
}
}
}
Example Stdio Configuration (for local development):
This allows the client to directly manage the server process.
{
"mcpServers": {
"sqlDemoServerLocal": { // Choose a name
"command": "python", // Or path to python in your venv e.g., ".venv/bin/python"
"args": ["sqlmcp/server.py"], // Path relative to workspace root
"env": {
"TRANSPORT": "stdio", // Crucial: Tells server to use stdio
"DB_URL": "postgresql+asyncpg://user:pass@host:5432/dbname", // MUST provide DB URL
},
"workingDirectory": "." // Ensure paths are resolved correctly
}
}
}
(Adjust paths, URLs, ports, and connection details based on your specific setup.)
pyproject.toml configured).
uv run ruff check .
uv run ruff format .
# Placeholder command, add tests to tests/ directory
# uv run pytest
tests/ directory, mirroring the sqlmcp structure. Follow standard Pytest conventions.This is primarily an example repository. Contributions improving the clarity, correctness, or demonstrating best practices for MCP server development are welcome via Pull Requests. Please ensure code is formatted and linted before submitting.
This project is licensed under the MIT License - see the LICENSE file for details or visit https://opensource.org/licenses/MIT.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Template MCP server with a PostgreSQL user database backend from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/agents-mcp-demo)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A Model Context Protocol server that lets AI assistants run SQL queries against AWS Athena databases and retrieve results.

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.