
very simple mcp host client sample
一个使用Anthropic Claude API实现的简单MCP主机/客户端示例。
Repository Info
About This Server
一个使用Anthropic Claude API实现的简单MCP主机/客户端示例。
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
very-simple-mcp-host-client-sample
(English follows)
とてもシンプルな MCP ホスト/クライアントのサンプルです。 Anthropic Claude API を用いて、対話します。
以下の手順でビルドしてください。(node と npm はご自身でインストールしてください。node を入れると npm も入ります)
npm install
npm run build
上記が完了し、build フォルダができていれば成功です。
このフォルダに .env ファイルを作成し、以下の記述が必要です。
ANTHROPIC_API_KEY="<ANTHROPICのAPIキー>"
node build/index.js で実行します。質問を投げてみてください。quit を入力すると終了します。
上記 .env ファイルが正しくないとエラーになります。
接続する MCP サーバーの設定は config.json で行います。
とりあえず @modelcontextprotocol/server-filesystem のエントリーを書いてあります。
<YOUR_HOME> のところは適宜書き換えてください。
(Japanse above)
This is a very simple MCP host/client sample. It interacts using the Anthropic Claude API.
Please follow the steps below to build it. (Make sure you have node and npm installed. Installing node will also install npm.)
npm install
npm run build
If the above completes successfully and a build folder is created, you're all set.
Create a .env file in this folder with the following content:
ANTHROPIC_API_KEY="<Your ANTHROPIC API KEY>"
Run it with: node build/index.js. Try entering a question. Type quit to exit.
If the .env file is incorrect, it will result in an error.
You can configure the MCP server connection in config.json.
An entry for @modelcontextprotocol/server-filesystem is already included as a placeholder.
Please replace <YOUR_HOME> with the appropriate path for your environment.
Quick Start
Clone the repository
git clone https://github.com/ynaoto/very-simple-mcp-host-client-sampleInstall dependencies
cd very-simple-mcp-host-client-sample
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.