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 서버 데모

이 프로젝트는 Streamlit으로 만든 웹 채팅 인터페이스와 Ollama를 사용한 로컬 언어 모델이 통합된 Python MCP(Model Context Protocol) 서버의 데모입니다. 채팅과 외부 MCP 도구 모두에서 PostgreSQL 데이터베이스의 사용자를 관리(추가, 삭제, 수정, 쿼리)할 수 있습니다.

형질

  • Streamlit과의 웹 채팅 .
  • Ollama(Llama 3 또는 기타 호환 모델)를 사용한 로컬 LLM .
  • 사용자 CRUD를 위한 도구를 갖춘 MCP 서버 .
  • 사용자를 저장하기 위한 PostgreSQL 데이터베이스 .
  • 유연한 통합 : 채팅만 사용할 수도 있고, MCP 서버만 사용할 수도 있고, 둘 다 사용할 수도 있습니다.

요구 사항

  • 파이썬 3.9 이상
  • PostgreSQL 실행 및 접근 가능
  • Ollama가 설치 및 실행됨(로컬 LLM용)
  • 가상 환경(권장)
  • requirements.txt 파일의 종속성

시설

  1. 저장소를 복제합니다.지엑스피1
  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. 레반타 올라마와 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 usuarios 또는 consultar 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.

웹 UI와 MCP 도구를 통해 사용자가 PostgreSQL 데이터베이스를 관리할 수 있는 Streamlit 채팅 인터페이스가 탑재된 Python 기반 모델 컨텍스트 프로토콜 서버로, 로컬 LLM 통합을 위해 Ollama가 지원합니다.

  1. 형질
    1. 요구 사항
      1. 시설
        1. 사용
          1. 레반타 올라마와 LLM 모델
          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