mcpField
T
Ts Mcp Client Server

Ts Mcp Client Server

Local
github.com/onenessDeveloper Tools5Updated 74w ago

About Ts Mcp Client Server

A TypeScript example combining an MCP client, an MCP server, and a command-line chat interface that uses Anthropic's Claude API. It is for developers exploring how MCP components work together with an LLM.

Key features

  1. 01MCP server exposing and executing tools
  2. 02MCP client using stdio transport
  3. 03Command-line chat with Claude
  4. 04Anthropic SDK integration

Use cases

  1. 01Explore MCP client and server roles
  2. 02Run a stdio MCP demo
  3. 03Chat with Claude using MCP

MCP support

Includes an MCP server that exposes tools and an MCP client that starts a server over stdio. Its chat CLI uses MCP with Anthropic's Claude API.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project 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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.