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.

使用 Streamlit 和 Ollama 的 MCP 服务器演示

该项目是 Python MCP(模型上下文协议)服务器的演示,集成了用 Streamlit 制作的网络聊天界面和使用 Ollama 的本地语言模型。允许您从聊天和外部 MCP 工具管理 PostgreSQL 数据库中的用户(添加、删除、修改、查询)。

特征

  • 使用 Streamlit 进行网络聊天
  • 使用 Ollama(Llama 3 或其他兼容型号)的本地 LLM
  • MCP 服务器带有供用户 CRUD 的工具。
  • 用于存储用户的PostgreSQL 数据库
  • 灵活集成:您可以只使用聊天、只使用 MCP 服务器或两者兼用。

要求

  • Python 3.9+
  • PostgreSQL 正在运行且可访问
  • Ollama已安装并正在运行(适用于本地 LLM)
  • 虚拟环境(推荐)
  • requirements.txt文件中的依赖项

设施

  1. 克隆存储库:
    git clone https://github.com/tu-usuario/mcp-server-demo.git cd mcp-server-demo
  2. 创建并激活虚拟环境:
    python -m venv .venv source .venv/bin/activate # En Linux/Mac .venv\\Scripts\\activate # En Windows
  3. 安装依赖项:
    pip install -r requirements.txt
  4. 配置您的 PostgreSQL 数据库并在server.py中配置连接详细信息。
  5. (可选)如果您使用 API 密钥,请创建一个.env文件。

使用

1. Levanta Ollama 和法学硕士 (LLM) 模式

ollama run llama3

2.打开Streamlit聊天

streamlit run streamlit.py

打开浏览器,访问http://localhost:8501

3. (可选)启动 MCP 服务器

mcp run server.py

任何一个

uv run --with mcp mcp run server.py

聊天功能

  • 添加用户:
    写入: agregar usuario Juan juan@mail.com clave123
  • 删除用户:
    类型: eliminar usuario juan@mail.com
  • 修改用户:
    类型: modificar usuario juan@mail.com nombre=Juan Perez contraseña=nuevaClave
  • 咨询用户:
    写信至: consultar usuariosconsultar usuario juan@mail.com
  • 自由交谈:
    如果消息不是一个动作,本地 LLM 会做出响应。

致谢


欢迎贡献和建议!

-
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.

基于 Python 的模型上下文协议服务器,具有 Streamlit 聊天界面,允许用户通过 Web UI 和 MCP 工具管理 PostgreSQL 数据库,由 Ollama 提供支持,可实现本地 LLM 集成。

  1. 特征
    1. 要求
      1. 设施
        1. 使用
          1. Levanta Ollama 和法学硕士 (LLM) 模式
          2. 2.打开Streamlit聊天
          3. (可选)启动 MCP 服务器
        2. 聊天功能
          1. 致谢

            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