MCP Server Demo

  • Linux
  • Apple
Integrations
  • Integrates with Ollama to provide local LLM capabilities (using Llama 3 or other compatible models) for processing natural language queries and responding to free-form conversation.

  • Manages user data in a PostgreSQL database, supporting CRUD operations (add, delete, modify, query) for user profiles with details like names and email addresses.

  • Provides a web-based chat interface built with Streamlit, allowing users to interact with the system through natural language commands for database operations and free conversation.

MCP Server Demo with Streamlit and Ollama

This project is a demo of a Model Context Protocol (MCP) server in Python, integrated with a web chat interface built in Streamlit and a local language model using Ollama. It allows users to manage users in a PostgreSQL database (add, delete, modify, and query) both from the chat and from external MCP tools.

Characteristics

  • Web chat with Streamlit.
  • Local LLM using Ollama (Llama 3 or other compatible model).
  • MCP server with tools for user CRUD.
  • PostgreSQL database for storing users.
  • Flexible integration : You can use just the chat, just the MCP server, or both.

Requirements

  • Python 3.9+
  • PostgreSQL running and accessible
  • Ollama installed and running (for local LLM)
  • Virtual environment (recommended)
  • Dependencies in the requirements.txt file

Facility

  1. Clone the repository:
    git clone https://github.com/tu-usuario/mcp-server-demo.git cd mcp-server-demo
  2. Create and activate a virtual environment:
    python -m venv .venv source .venv/bin/activate # En Linux/Mac .venv\\Scripts\\activate # En Windows
  3. Install the dependencies:
    pip install -r requirements.txt
  4. Configure your PostgreSQL database and configure the connection details in server.py .
  5. (Optional) Create a .env file if you use API keys.

Use

1. Levanta Ollama and the LLM model

ollama run llama3

2. Open the Streamlit chat

streamlit run streamlit.py

Open your browser at http://localhost:8501 .

3. (Optional) Start the MCP server

mcp run server.py

either

uv run --with mcp mcp run server.py

Chat Features

  • Add user:
    Write: agregar usuario Juan juan@mail.com clave123
  • Delete user:
    Type: eliminar usuario juan@mail.com
  • Modify user:
    Type: modificar usuario juan@mail.com nombre=Juan Perez contraseña=nuevaClave
  • Consult users:
    Write: consultar usuarios or consultar usuario juan@mail.com
  • Free conversation:
    If the message is not an action, the local LLM responds.

Credits


Contributions and suggestions are welcome!

-
security - not tested
F
license - not found
-
quality - not tested

A Python-based Model Context Protocol server with Streamlit chat interface that allows users to manage a PostgreSQL database through both web UI and MCP tools, powered by Ollama for local LLM integration.

  1. Characteristics
    1. Requirements
      1. Facility
        1. Use
          1. Levanta Ollama and the LLM model
          2. Open the Streamlit chat
          3. (Optional) Start the MCP server
        2. Chat Features
          1. Credits

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              An interactive chat interface that combines Ollama's LLM capabilities with PostgreSQL database access through the Model Context Protocol (MCP). Ask questions about your data in natural language and get AI-powered responses backed by real SQL queries.
              Last updated -
              28
              TypeScript
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server providing both read and write access to PostgreSQL databases, enabling LLMs to query data, modify records, and manage database schemas.
              Last updated -
              4
              JavaScript
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that enables powerful PostgreSQL database management capabilities including analysis, schema management, data migration, and monitoring through natural language interactions.
              Last updated -
              58
              21
              TypeScript
              AGPL 3.0
              • Linux
              • Apple
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that enables performing PostgreSQL database operations (create, read, update, delete) on User and Post entities through MCP tools.
              Last updated -
              TypeScript

            View all related MCP servers

            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/IgnacioFucksmann/MCP-SERVER-DEMO'

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