About MCPサーバー練習用コード
Japanese practice code for building an MCP server, associated with a Qiita article. It uses `uv` for Python environment setup and documents configuring an LLM API, with Azure OpenAI Services given as the author's example.
Key features
- 01MCP server practice code
- 02Python environment setup with `uv`
- 03LLM API configuration via `.env`
Use cases
- 01Follow the associated Qiita article's implementation
- 02Set up a Python environment for MCP practice
- 03Configure an LLM API for the example
MCP support
The repository contains practice code for implementing an MCP server; the README refers readers to its associated Qiita article.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCPサーバー練習用コード
本コードは下記のQiita記事の実装コードです。
先に記事をご覧ください。
環境構築
-
リポジトリクローン
git clone https://github.com/switch-kosuke/practice-mcp-server.git -
.envファイルを作成して、使用したいLLMモデルのAPIを記載:
筆者は、Azure OpenAI Servicesのモデルを使用しております.cp .env.sample .env -
Python開発環境は、uvを用います. インストールされていない方は以下を実行.
Linux/Mac
curl -LsSf https://astral.sh/uv/install.sh | sh echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc source ~/.bashrcWindows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" -
uvを使って依存関係をインストール
# 仮想環境を作成 uv venv # 仮想環境を有効化(Linux/Mac) source .venv/bin/activate # 仮想環境を有効化(Windows) .venv\Scripts\activate # 依存関係をインストール uv pip install -e .
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.