agents-mcp-demo

agents-mcp-demo

0

This project serves as a template for implementing an MCP server, showcasing how to establish connections between AI agents and external data sources using the Model Context Protocol. It provides a demonstration of user management via a PostgreSQL database.

A Template MCP Server

This repository demonstrates how to implement a Model Context Protocol (MCP) server, connecting AI agents and services to tools and data sources. The server uses a PostgreSQL database backend for user data management and illustrates defining, exposing tools via MCP, handling client requests, database operations, and returning results or errors.

Features

  • Acts as a gateway between MCP clients and external data (e.g., PostgreSQL database).
  • Example tools: add_user, get_all_users, find_user_by_email, delete_user_by_email.
  • Configuration using environment variables.
  • Docker support for simplified deployment.

Prerequisites

  • Python 3.10+, PostgreSQL database, Docker.

Usage

  • Docker: Build and run the server container.
  • Local development: Set up a virtual environment, install dependencies, run the server.