Skip to main content
Glama
main.py821 B
""" MCP Server エントリーポイント このファイルはMCPサーバーの起動を担当する。 Claude Desktopは設定ファイル(claude_desktop_config.json)に基づいて このスクリプトを子プロセスとして起動する。 """ from weather import mcp # weather.pyで定義したFastMCPインスタンスをインポート def main(): # サーバーを起動 # transport="stdio" は標準入出力を使用して通信することを意味する # - stdin: クライアント(Claude Desktop)からのJSON-RPCリクエストを受信 # - stdout: クライアントへJSON-RPCレスポンスを送信 # # 注意: print()を使うとstdoutにゴミが混じりJSON-RPCが壊れるため使用禁止 mcp.run(transport="stdio") if __name__ == "__main__": main()

Latest Blog Posts

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/Kohei-Suzuki22/weather_mcp'

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