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 で作成された Web チャット インターフェイスと Ollama を使用したローカル言語モデルを統合した Python MCP (Model Context Protocol) サーバーのデモです。チャットと外部 MCP ツールの両方から、PostgreSQL データベース内のユーザーを管理 (追加、削除、変更、クエリ) できます。
特徴
- Streamlit とのWeb チャット。
- Ollama (Llama 3 またはその他の互換モデル) を使用したローカル LLM 。
- ユーザー CRUD 用のツールを備えたMCP サーバー。
- ユーザーを保存するためのPostgreSQL データベース。
- 柔軟な統合: チャットのみ、MCP サーバーのみ、またはその両方を使用できます。
要件
- Python 3.9以上
- PostgreSQLが実行中でありアクセス可能
- Ollamaがインストールされ、実行中 (ローカル LLM 用)
- 仮想環境(推奨)
requirements.txt
ファイル内の依存関係
施設
- リポジトリをクローンします。
- 仮想環境を作成してアクティブ化します。
- 依存関係をインストールします。
- 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.
Streamlit チャット インターフェイスを備えた Python ベースのモデル コンテキスト プロトコル サーバーで、ユーザーは Web UI と MCP ツールの両方を使用して PostgreSQL データベースを管理できます。ローカル 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