MCP Server Example
シンプルなMCPサーバーの実装例です。
機能
hello_world
: シンプルな挨拶を返す関数echo
: 入力された文字列をエコーバックする関数
必要条件
- Python 3.13以上
- 依存パッケージ:
- httpx >= 0.28.1
- mcp[cli] >= 1.6.0
インストール方法
プロジェクトはpyproject.toml
で依存関係を管理しています。
使用方法
サーバーを起動するには:
python server.py
Development Modeで起動するには:
# 基本的な起動方法
mcp dev server.py
Development ModeではMCPインスペクターを使用したデバッグが可能です
ライセンス
MIT License - 詳細はファイルを参照してください。
Related MCP Servers
View all developer_tools servers →Sequential Thinking
by modelcontextprotocol
An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.
git-mcp
by idosal
GitMCP is a free, open-source, remote Model Context Protocol (MCP) server that transforms GitHub projects into documentation hubs, enabling AI tools to access up-to-date documentation and code.
Everything MCP Server
by modelcontextprotocol
The Everything MCP Server is a comprehensive test server designed to demonstrate the full capabilities of the Model Context Protocol (MCP). It is not intended for production use but serves as a valuable tool for developers building MCP clients.
context7
by upstash
Context7 MCP provides up-to-date, version-specific documentation and code examples directly into your prompt, enhancing the capabilities of LLMs by ensuring they use the latest information.
exa-mcp-server
by exa-labs
A Model Context Protocol (MCP) server allows AI assistants to use the Exa AI Search API for real-time web searches in a secure manner.
repomix
by yamadashy
Repomix is a tool that packs your codebase into AI-friendly formats, making it easier to use with AI tools like LLMs.
mcpdoc
by langchain-ai
MCP LLMS-TXT Documentation Server provides a structured way to manage and retrieve LLM documentation using the Model Context Protocol.