
mcp study
MCPサーバーのQuickStartの実装
Repository Info
About This Server
MCPサーバーのQuickStartの実装
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
MCPサーバーのチュートリアル実装
公式のQuickStartをそのまま実装。
Node.jsのバージョンは16以上を使用すること。
npm install
npx tsc
でビルド。Macは実行権限をつける。 chmod 755 build/index.js
Claude Desktopでの設定
code $env:AppData\Claude\claude_desktop_config.json
で設定ファイルを開く。
以下のように設定。
{
"mcpServers": {
"weather": {
"command": "node",
"args": [
"C:\\Users\\sifue\\workspace\\mcp-study\\build\\index.js"
]
}
}
}
設定後はClaude Desktopを再起動。
「サクラメントの天気を教えてください」
で検証。東京の天気は調べられないので要注意。
!Claude Desktop
VSCodeの設定
【未検証】いずれGitHub Copilot でAIエージェントが利用できるようなると利用できるらしい(現在はプレビュー版のみ)。 mcpで設定を検索して以下をsetting.jsonに設定。パスは適宜変更すること。jsonのweatherの上に起動ボタンが現れるので起動しておく。
{
"mcpServers": {
"weather": {
"command": "node",
"args": [
"C:\\Users\\sifue\\workspace\\mcp-study\\build\\index.js"
]
}
}
}
設定後はGitHub Copilotで
「サクラメントの天気を教えてください」
で検証。東京の天気は調べられないので要注意。
動作確認
詳しくは、TypeScript SDKのClientの実装を参照。
node build/index.js
でサーバーを起動。
node .\build\client.js
でクライアントを起動して実行。
クライアントは検証したいコードに合わせて書き換え、その後、
npx txc
でビルドして再度クライアントを実行する
参考
- MCPのQuickStart
- VSCodeのMCP設定
Quick Start
Clone the repository
git clone https://github.com/sifue/mcp-studyInstall dependencies
cd mcp-study
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.