MCP ExplorerExplorer

Mcp Server Client Demo

@S1LV3RJ1NXon a year ago
15 MIT
FreeCommunity
AI Systems
SSE based MCP server and Client demo with auto registry, Dockerfile setup and env.

Overview

What is Mcp Server Client Demo

mcp-server-client-demo is a demonstration project that showcases a Model Context Protocol (MCP) server and client using Server Side Events (SSE) and an automatic tool registry.

Use cases

Use cases include building chatbots, interactive AI applications, and any system that requires real-time data updates from a server to a client.

How to use

To use mcp-server-client-demo, clone the repository, set up the Docker environment as described in the Dockerfile, and follow the instructions in the README files for both the server and client.

Key features

Key features include Server Side Events (SSE) for real-time data streaming, an automatic tool registry using the @mcp_tool decorator, and integration with the OpenAI SDK for client-side operations.

Where to use

mcp-server-client-demo can be used in AI application development, particularly in scenarios that require interaction between large language models and external data sources.

Content

Model Context Protocol (MCP)

The Model Context Protocol (MCP) is a powerful framework that enables developers to build AI applications with large language models (LLMs) by providing a standardized way to connect models with external data sources and tools.

MCP is nothing but a protocol to connect LLMs with external data sources and tools (functions).

MCP Server

This repository contains the code for setting up a demo MCP server. It contains:

  • A stateless MCP server with streamable HTTP transport for scalable production deployment.
  • Auto tool registry with @mcp_tool decorator.
  • Docker file to containerize the server.
  • Server can be run locally or in docker and deployed to any cloud provider.

Setup

  • Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
  • Install dependencies
uv sync

MCP Client

This repository contains the code for setting up a demo MCP client with OpenAI SDK. Refer to the client for more details.

Note: For ease of understanding, both server and client are in the same repository, you can easily keep them in separate repositories / projects.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers