mcp-server-demo logo

mcp-server-demo

by zhuohanl

This repository provides a starting point for developing MCP (Model Context Protocol) servers and clients. It includes example servers and clients to demonstrate the protocol's usage.

View on GitHub

Last updated: N/A

What is mcp-server-demo?

This is a demo repository showcasing the implementation of MCP servers and clients. It provides examples of different server types like a document assistant and a weather service, along with corresponding client implementations.

How to use mcp-server-demo?

To run the MCP server, use the command uv run python server/demo.py (or doc_assistant.py, us_weather.py). To run the client, use uv run python client/doc_assistant_client.py. You can test end-to-end message sequences by typing the provided JSON messages into the server's standard input.

Key features of mcp-server-demo

  • Demonstrates MCP server implementation

  • Provides example clients for interaction

  • Includes examples for document assistance and weather data

  • Shows message sequence for client-server communication

Use cases of mcp-server-demo

  • Learning MCP protocol implementation

  • Building custom MCP servers

  • Developing MCP clients to interact with servers

  • Testing and debugging MCP communication

FAQ from mcp-server-demo

What is MCP?

MCP stands for Model Context Protocol, a protocol for communication between clients and servers, particularly in the context of AI models and tools.

What is the purpose of this demo?

The demo aims to provide a practical example of how to implement MCP servers and clients, making it easier to understand and use the protocol.

How do I run the server?

Use the command uv run python server/<server_name>.py, replacing <server_name> with the name of the server you want to run (e.g., demo.py, doc_assistant.py, us_weather.py).

How do I run the client?

Use the command uv run python client/doc_assistant_client.py.

Where can I find more information about MCP?

Refer to the provided references: Demo, Document Assistant, US Weather.