obrr-hhx
MCP Serverobrr-hhxpublic

mcp client demo

A demo for mcp client

Repository Info

3
Stars
0
Forks
3
Watchers
0
Issues
TypeScript
Language
-
License

About This Server

A demo for mcp client

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

MCP Client Demo

This is a demo project for a client using the Model Context Protocol (MCP), designed to demonstrate how to interact with AI models via MCP and utilize model tool calling features.

Features

  • Connect to MCP server
  • Call large language models (LLM) for conversation (in this example, qwen3-235b-a22b is used)
  • Support for Custom Tool Calling
  • Streaming response handling

Prerequisites

  • Node.js (v18+)
  • TypeScript
  • DashScope API key

Installation

# Clone the project
git clone https://github.com/obrr-hhx/mcp-client-demo.git
cd mcp-client-demo

# Install dependencies
npm install

Configuration

  1. Create a .env file and add the following content:
DASHSCOPE_API_KEY=your_dashscope_api_key
ZHIPU_API_KEY=your_zhipu_api_key # for web search
  1. Configure the server connection (already set in server-config.json):

Since this demo only implements connections via sse and streamable http, if you are using an mcp server with stdio, please use the mcp-proxy project as a proxy first.

The demo uses a filesystem mcp server. Example command:

mcp-proxy --port=9000 -- npx -y @modelcontextprotocol/server-filesystem /path/to/your/workspace

Example server-config.json:

{
    "mcp-proxy-filesystem": {
        "url": "http://127.0.0.1:9000/sse"
    }
}

Build

npm run build

Usage

node build/index.js

After starting, follow the prompts to interact with the AI assistant. Enter exit to quit the program.

Project Structure

├── src/
│   ├── index.ts          # Program entry point
│   ├── mcpHost.ts        # MCP host class, handles interaction with LLM
│   ├── mcpClient.ts      # MCP client, connects to MCP server
│   └── tools.ts          # Tool calling related definitions
├── server-config.json    # Server configuration
└── tsconfig.json         # TypeScript configuration

License

MIT

Quick Start

1

Clone the repository

git clone https://github.com/obrr-hhx/mcp-client-demo
2

Install dependencies

cd mcp-client-demo
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerobrr-hhx
Repomcp-client-demo
LanguageTypeScript
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation