tester-mcp-client
by: apify
Model Context Protocol (MCP) Client for Apify's Actors
đOverview
Purpose:
To provide a client application for testing and interacting with Model Context Protocol (MCP) servers over Server-Sent Events (SSE) via an interactive chat interface.
Overview:
The Tester MCP Client is an open-source Actor server designed for evaluating and interfacing with MCP servers. It connects to MCP servers using SSE, enabling real-time communication and dynamic usage of AI tools. The client displays server responses in a user-friendly, chat-like UI and supports secure connections through authorization headers and API keys. It is suitable for testing both generic MCP servers and the Apify Actors MCP Server.
Key Features:
-
SSE-Based Real-Time Connectivity:
Connects seamlessly to any MCP server using Server-Sent Events for low-latency, real-time interactions. -
Interactive Chat-like UI:
Provides a clean, user-friendly interface for displaying conversations, tool calls, and results, enhancing the testing and debugging experience.
Tester Client for Model Context Protocol (MCP)
Implementation of a Model Context Protocol (MCP) client that connects to an MCP server using Server-Sent Events (SSE) and displays the conversation in a chat UI. This standalone Actor server is designed for testing MCP servers over SSE, using the Pay-per-event pricing model.
For more information, see the Model Context Protocol website or the blog post What is MCP and why does it matter?.
Once you run the Actor, check the output logs for a link to the chat UI interface (the URL will be provided in the logs).
Main Features
- Connects to an MCP server using Server-Sent Events (SSE)
- Provides a chat-like UI for displaying tool calls and results
- Connects to an Apify MCP Server for interacting with Apify Actors
- Dynamically uses tools based on context and user queries (if supported by the server)
- Supports Authorization headers and API keys for secure connections
- Open source and modifiable
Example Queries
When connected to the Apify Actors MCP Server, you can ask questions like:
- What are the most popular Actors for social media scraping?
- Show me the best way to use the Instagram Scraper.
- Which Actor should I use to extract data from LinkedIn?
- Can you help me understand how to scrape Google search results?
How Does It Work?
The client connects to a running MCP server over SSE and:
- Initiates an SSE connection to the MCP server
- Sends user queries via POST requests
- Receives real-time streamed responses, which may include LLM output and tool usage blocks
- Orchestrates tool calls and displays the conversation accordingly
Usage
You can test any MCP server over SSE or the Apify Actors MCP Server with over 3,000+ available tools.
Normal Mode (on Apify)
Run the Tester MCP Client on Apify and connect it to any compatible MCP server. Configure parameters such as MCP server URL, system prompt, and API key via the Apify UI or API.
After running, check the logs for a unique URL to access the Tester MCP Client UI.
Standby Mode (on Apify)
In progress.
Pricing
The Tester MCP Client is free to use. You only pay for LLM provider usage and resources consumed on the Apify platform.
This Actor uses Pay-per-event) monetization.
Charged events include:
- Actor start (based on memory used)
- Running time (per 5 minutes, per 128 MB unit)
- Query answered (depends on the model used, not charged if you provide your own API key for the LLM provider).
With your own LLM provider API key, running the MCP Client for 1 hour with 128 MB memory costs about $0.06. The Apify Free tier allows up to 80 hours per month with no credit card required.
Architecture Overview
Browser â (SSE) â Tester MCP Client â (SSE) â MCP Server
- The browser uses SSE to communicate with the Tester MCP Client.
- The client uses SSE to talk to the MCP Server.
- Custom bridging logic is inside the Tester MCP Client; the main MCP Server remains unchanged.
Local Development
The Tester MCP Client Actor is open source and available on GitHub.
To get started:
git clone https://github.com/apify/tester-mcp-client.git
cd tester-mcp-client
npm install
Create a .env
file (refer to .env.example
) with content like:
APIFY_TOKEN=YOUR_APIFY_TOKEN
LLM_PROVIDER_API_KEY=YOUR_API_KEY
Default settings (such as mcpUrl
, systemPrompt
, etc.) are defined in the const.ts
file.
To start:
npm start
Visit http://localhost:3000 to interact with the MCP server.
Limitations
- Does not support all MCP features (e.g., Prompts and Resource)
- Does not store conversationsârefreshing the page clears chat history