Skip to main content
Glama

MCP Python Server

by jatindera

MCP(モデルコンテキストプロトコル)実装

概要

このプロジェクトは、Pythonのサーバークライアントアーキテクチャを用いてモデルコンテキストプロトコル(MCP)を実装します。MCPサーバーはモデルコンテキスト管理に関連するリクエストを処理し、MCPクライアントはサーバーと対話してデータの送受信を行います。

前提条件

  • Python 3.x

環境の設定

  1. 仮想環境を作成するターミナルを開き、プロジェクトディレクトリに移動します。以下のコマンドを実行して仮想環境を作成します。
    python -m venv venv
  2. 仮想環境をアクティブ化する
    • Windowsの場合:
      venv\Scripts\activate
    • macOS/Linuxの場合:
      source venv/bin/activate
  3. 必要なパッケージをインストールする仮想環境をアクティブ化した後、次のコマンドを使用して必要なパッケージをインストールします。
    pip install -r requirements.txt

アプリケーションの実行

  1. **MCPサーバーを起動します。**仮想環境が有効化されている状態でターミナルを開き、 mcp_server.pyがあるディレクトリに移動します。以下のコマンドを実行します。
    python mcp_server.py
  2. **MCPクライアントを起動します。**仮想環境がアクティブになっている状態で、別のターミナルウィンドウ(またはタブ)を開き、 mcp_client.pyを含むディレクトリに移動します。以下のコマンドを実行します。
    python mcp_client.py

使用法

  • MCP サーバーを起動したら、MCP クライアントを使用してサーバーと対話できます。

貢献

改善やバグ修正が必要な場合は、リポジトリをフォークしてプル リクエストを送信してください。

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。

-
security - not tested
F
license - not found
-
quality - not tested

要求応答アーキテクチャを通じてモデル コンテキスト管理サーバーとクライアント間の通信を可能にする、モデル コンテキスト プロトコルの Python ベースの実装。

  1. 概要
    1. 前提条件
      1. 環境の設定
        1. アプリケーションの実行
          1. 使用法
            1. 貢献
              1. ライセンス

                Related MCP Servers

                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that enables seamless execution of commands, Python code, web content fetching, and reusable task management with secure credentials handling.
                  Last updated -
                  2
                  Python
                  MIT License
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A streamlined foundation for building Model Context Protocol servers in Python, designed to make AI-assisted development of MCP tools easier and more efficient.
                  Last updated -
                  15
                  Python
                  MIT License
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Python implementation of the Model Context Protocol that allows applications to provide standardized context for LLMs, enabling creation of servers that expose data and functionality to LLM applications through resources, tools, and prompts.
                  Last updated -
                  Python
                  MIT License
                • A
                  security
                  F
                  license
                  A
                  quality
                  A Model Context Protocol server that allows LLMs to interact with Python environments, enabling code execution, file operations, package management, and development workflows.
                  Last updated -
                  9
                  Python

                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/jatindera/MCPBasic'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server