
hello world sayer mcp
Model Context Protocol (MCP) を使用した「Hello World」サーバーの実装例
Repository Info
About This Server
Model Context Protocol (MCP) を使用した「Hello World」サーバーの実装例
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Hello World Sayer MCP
Model Context Protocol (MCP) を使用した「Hello World」サーバーの実装例です。
開発手順
1. src/index.tsを書く
MCPサーバーとツールの実装を行います。このファイルでは:
- MCPサーバーの設定
getHelloWorldツールの定義(引数に指定された名前に対して「Hello {name};」を返す)- StdioServerTransportを使用したサーバーの起動
2. src/index.test.tsを書く
ツールのテストを実装します:
- 引数なしで呼び出した場合に「Hello World;」を返すことを確認
- 引数 name: 'Alice' を指定した場合に「Hello Alice;」を返すことを確認
3. テストする
npm run test
4. ビルドする
npm run build
5. 実行できるか確認する
node ./build/index.js
6. クライアントの設定をする
Claude Desktopで使用するには、claude_desktop_config.jsonに以下の設定を追加します:
{
"mcpServers": {
"helloWorldSayer": {
"command": "node",
"args": [
"/absolute/path/to/your/hello-world-sayer/build/index.js"
]
}
}
}
/absolute/path/to/your/hello-world-sayer/は、実際のプロジェクトのパスに置き換えてください。
使用例
Claude Desktopで以下のようにツールを呼び出すことができます:
!Hello World Sayer MCPの使用例
これにより、「Hello Alice;」というレスポンスが返されます。
参考資料
- TypeScript で MCP サーバーを実装し、Claude Desktop から利用する
Quick Start
Clone the repository
git clone https://github.com/ikekou/hello-world-sayer-mcpInstall dependencies
cd hello-world-sayer-mcp
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.