ts -client
MCP client and server with command line chat interface using Anthropic
claude mcp add --transport stdio oneness-ts-mcp-client-server node dist/index.js
How to use
This MCP server example showcases a local client/server setup written in TypeScript that demonstrates an MCP server exposing tools and a CLI chat interface that talks to Claude via the Anthropic API. The project includes a CLI chat utility and an MCP client that starts the MCP server over a stdio transport, making it easy to run end-to-end within a single environment. After building, you can launch the MCP demo with the provided npm scripts to observe how requests flow from the CLI chat through the MCP client to the server and how tools are executed via the server.
How to install
Prerequisites:
- Node.js (recommended via Node.js package manager)
- npm installed
- Access toAnthropic API key to use Claude features
Install and run:
- Clone or download the repository.
- Install dependencies: npm install
- Create an environment file or set vars:
- Create .env.local with: ANTHROPIC_API_KEY=your_key_here
- Build the project: npm run build
- Run the MCP demo (stdio client/server): npm run mcp
- Optional: Run the CLI chat interface with Claude using MCP: npm run chat
Additional notes
Environment variables:
- ANTHROPIC_API_KEY must be set to a valid Anthropic API key for Claude access.
Configuration tips:
- The server exposes tools via MCP; ensure the dist/index.js (or the path used in the node command) is generated by your build step.
- If you modify environment dependencies or require different APIs, update .env.local accordingly.
Common issues:
- If npm run mcp fails due to missing transpiled files, ensure npm run build completes successfully.
- If Claude calls fail due to invalid API keys, verify the ANTHROPIC_API_KEY is correct and that network access is allowed.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud