mcp-client-server logo

mcp-client-server

by okikusan-public

This repository provides a self-made implementation of a Model Context Protocol (MCP) client and server. It demonstrates the implementation and application of MCP through interaction with Anthropic's Claude model.

View on GitHub

Last updated: N/A

What is mcp-client-server?

This project is a self-implemented client and server for the Model Context Protocol (MCP), an open standard for connecting AI assistants with various data sources. It provides a practical understanding of MCP concepts and demonstrates a working client and server implementation.

How to use mcp-client-server?

To use this project, clone the repository, install the dependencies using npm install, configure the environment variables in a .env file (including the Anthropic API key), start the server using npm run start:server, and then run the demo applications using npm run demo:http, npm run demo:ws, or npm run demo:chat.

Key features of mcp-client-server

  • MCP Server with Express.js and Anthropic API integration

  • WebSocket support for real-time streaming and interactive dialogue

  • Integrated MCP Client supporting both HTTP and WebSocket

  • Demo applications showcasing HTTP and WebSocket communication

Use cases of mcp-client-server

  • Connecting AI models to external data sources

  • Building interactive AI assistants with real-time streaming

  • Implementing custom communication protocols for AI applications

  • Experimenting with different AI models and communication methods

FAQ from mcp-client-server

What is MCP?

MCP stands for Model Context Protocol, an open standard for connecting AI assistants with various data sources.

What technologies are used in this project?

The project uses Node.js, Express, WebSocket (ws), TypeScript, Axios, and the Anthropic Claude API.

How do I set up the project?

Clone the repository, install dependencies using npm install, configure the .env file with your Anthropic API key, and start the server using npm run start:server.

How do I run the demo applications?

After starting the server, run the HTTP demo with npm run demo:http, the WebSocket demo with npm run demo:ws, or the chat demo with npm run demo:chat.

Where can I find more detailed documentation?

Detailed technical information can be found in the MCP_DOCUMENTATION.md file.