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
- 가상 환경을 만들고 활성화하세요.
- 종속성을 설치합니다.
- PostgreSQL 데이터베이스를 구성하고
server.py
에서 연결 세부 정보를 구성합니다. - (선택 사항) API 키를 사용하는 경우
.env
파일을 만듭니다.
사용
1. 레반타 올라마와 LLM 모델
2. Streamlit 채팅을 엽니다.
http://localhost:8501 에서 브라우저를 엽니다.
3. (선택 사항) MCP 서버를 시작합니다.
어느 하나
채팅 기능
- 사용자 추가:
쓰기: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이 응답합니다.
크레딧
기여와 제안을 환영합니다!
This server cannot be installed
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가 지원합니다.
Related MCP Servers
- -securityFlicense-qualityAn 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 -28TypeScript
- -securityFlicense-qualityA 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 -4JavaScript
- -securityAlicense-qualityA 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 -5821TypeScriptAGPL 3.0
- -securityFlicense-qualityA 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