ts-mcp-client-server

このプロジェクトは、TypeScriptで構築されたMCPクライアントとサーバーの例を提供します。コマンドラインインターフェースを介してAnthropicのClaude APIと対話し、MCPサーバーを通じてツールを実行することができます。簡単にセットアップでき、NPMを使用して依存関係を管理します。

GitHubスター

5

ユーザー評価

未評価

お気に入り

0

閲覧数

18

フォーク

0

イシュー

1

README
MCP client and server example
src
├── chat.ts   # command line chat interface to Claude completion
├── client.ts # MCP client that starts MCP server with stdio transport
├── index.ts  # Node run script to start MCP server or Chat CLI
├── llm.ts    # Uses Anthropic SDK to talk to Claude API
└── server.ts # MCP server that exposes tools and executes them
Depends
NPM                  # install with your package manager of choice (Recommend nix)
                     # nix shell nixpkgs#nodejs
ANTHROPIC_API_KEY='' # Put your key here in .env.local file
Build
npm run build
Run MCP stdio client/server demo
npm run mcp
Run CLI chat with Anthropic using MCP
npm run chat
TODO

NOTE: Used Claude and Gemini web chat interface to generate some
boiler plate code.