MCP.so
ログイン

MCP Server Implementation

@yisu201506

基本情報

カテゴリ

その他

トランスポート

stdio

作者

yisu201506

MCP Server Implementation について

Repository for MCP server implementation

MCP Server Implementation の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "mcp-server-yisu201506": {
      "command": "python",
      "args": [
        "-m",
        "venv",
        "venv"
      ]
    }
  }
}

MCP Server Implementation のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is MCP Server Implementation?

A Flask-based implementation of the Model Context Protocol (MCP) that extends Large Language Models with external tools like weather and calculator, using text-based tool invocation directly in the context window.

How to use MCP Server Implementation?

Clone the repository, create a Python virtual environment, install dependencies, set environment variables for API keys, then run flask run or gunicorn app:app. Send chat messages via the POST /chat endpoint with a JSON body containing a messages array.

Key features of MCP Server Implementation

  • Complete MCP parsing, execution, and response handling
  • Sample weather and calculator tools with parameter validation
  • Maintains conversation context across multiple interactions
  • Regex‑based parsing for flexible tool invocation detection
  • Flask REST API for easy chat integration

Use cases of MCP Server Implementation

  • Adding real‑time weather data to an LLM‑powered chatbot
  • Enabling a language model to perform mathematical calculations
  • Building custom tool integrations by inheriting from the Tool base class
  • Demonstrating MCP workflow for educational or prototyping purposes

よくある質問

1

What is MCP and how does it differ from function calling?

MCP places tool definitions in the prompt text and parses natural‑language responses for tool calls, while function calling uses structured JSON in API parameters and requires API support.

2

What are the runtime dependencies?

Python 3, Flask, Gunicorn (optional for production), and API keys for the LLM and weather service stored in environment variables.

3

Where is conversation state stored?

The server maintains conversation history across multiple interactions by adding processed responses and tool results back into the message history.

4

What transport does the server use?

HTTP via the Flask development server (default port 5000) or Gunicorn in production.

5

How are tools authenticated?

Weather tool requires a `WEATHER_API_KEY` environment variable; LLM requests require an `LLM_API_KEY`. Both are set in a `.env` file.

コメント

「その他」の他のコンテンツ