MCP ExplorerExplorer

Llamacppmcpclientdemo

@bruceproon a year ago
12 MIT
FreeCommunity
AI Systems
standalone react MCP client using SSE

Overview

What is Llamacppmcpclientdemo

llamacppMCPClientDemo is a standalone React-based client for interacting with MCP servers using Server-Sent Events (SSE). It is designed to facilitate communication with various MCP services.

Use cases

Use cases include integrating real-time data feeds into applications, enabling tool invocation from a client interface, and developing interactive web applications that require server communication without page refresh.

How to use

To use llamacppMCPClientDemo, first load the SSE servers using the provided commands. You can run the servers with either supergateway or uv. After setting up the servers, start the client by running ‘npm start’.

Key features

Key features include the ability to connect to multiple SSE servers, support for tool invocation, and a React-based user interface. It also allows for configuration changes to connect to different servers.

Where to use

llamacppMCPClientDemo can be used in web applications that require real-time data streaming from MCP servers, such as chat applications, live data dashboards, or any interactive tool that benefits from SSE.

Content

A Demo of the MCP Client using React and SSE

Still in progress but seems to work.

Instructions

Load the SSE servers:
npx -y supergateway --cors --port 8002 --stdio “npx -y @modelcontextprotocol/server-everything”

or

cd servers/python/simple-tool-prompt-resource
Load it with uv.

uv run mcp-simple-tool-prompt-resource --transport sse --port 8000

cd servers/python/simple-tool-prompt-resource2
Load it with uv.

uv run mcp-simple-tool-prompt-resource2 --transport sse --port 8001

The script assumes these are running at localhost. But you can edit the config and change it to any SSE server.

Run the script.

npm start

Issues to consider:

two tool names that match but are different servers, can prolly modify the tools_available to do mcpserver.name.toolname to the list tools.

Haven’t tested multiple tools being called, prolly should set max tool calls.

Text completion streaming needs to be off to call tools.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers