MCP Server Demo

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 con Streamlit y Ollama

Este proyecto es una demo de un servidor MCP (Model Context Protocol) en Python, integrado con una interfaz de chat web hecha en Streamlit y un modelo de lenguaje local usando Ollama. Permite gestionar usuarios en una base de datos PostgreSQL (agregar, eliminar, modificar, consultar) tanto desde el chat como desde herramientas MCP externas.

Características

  • Chat web con Streamlit.
  • LLM local usando Ollama (Llama 3 u otro modelo compatible).
  • Servidor MCP con herramientas para CRUD de usuarios.
  • Base de datos PostgreSQL para almacenar usuarios.
  • Integración flexible: puedes usar solo el chat, solo el servidor MCP, o ambos.

Requisitos

  • Python 3.9+
  • PostgreSQL corriendo y accesible
  • Ollama instalado y corriendo (para LLM local)
  • Entorno virtual (recomendado)
  • Las dependencias del archivo requirements.txt

Instalación

  1. Clona el repositorio:
    git clone https://github.com/tu-usuario/mcp-server-demo.git cd mcp-server-demo
  2. Crea y activa un entorno virtual:
    python -m venv .venv source .venv/bin/activate # En Linux/Mac .venv\\Scripts\\activate # En Windows
  3. Instala las dependencias:
    pip install -r requirements.txt
  4. Configura tu base de datos PostgreSQL y ajusta los datos de conexión en server.py.
  5. (Opcional) Crea un archivo .env si usas claves de API.

Uso

1. Levanta Ollama y el modelo LLM

ollama run llama3

2. Levanta el chat de Streamlit

streamlit run streamlit.py

Abre el navegador en http://localhost:8501.

3. (Opcional) Levanta el servidor MCP

mcp run server.py

o

uv run --with mcp mcp run server.py

Funcionalidades del chat

  • Agregar usuario:
    Escribe: agregar usuario Juan juan@mail.com clave123
  • Eliminar usuario:
    Escribe: eliminar usuario juan@mail.com
  • Modificar usuario:
    Escribe: modificar usuario juan@mail.com nombre=Juan Perez contraseña=nuevaClave
  • Consultar usuarios:
    Escribe: consultar usuarios o consultar usuario juan@mail.com
  • Conversación libre:
    Si el mensaje no es una acción, responde la LLM local.

Créditos


¡Contribuciones y sugerencias son bienvenidas!

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

local-only server

The server can only run on the client's local machine because it depends on local resources.

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. Características
    1. Requisitos
      1. Instalación
        1. Uso
          1. Levanta Ollama y el modelo LLM
          2. Levanta el chat de Streamlit
          3. (Opcional) Levanta el servidor MCP
        2. Funcionalidades del chat
          1. Créditos

            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