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 で作成された 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ファイル内の依存関係

施設

  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. レヴァンタ・オラマと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.

Streamlit チャット インターフェイスを備えた Python ベースのモデル コンテキスト プロトコル サーバーで、ユーザーは Web UI と MCP ツールの両方を使用して PostgreSQL データベースを管理できます。ローカル 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