GitHub - oneness/ts-mcp-client-server: MCP client and server with command line chat interface using Anthropic

GitHub

1 min read Original article ↗
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
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

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