- Home
- MCP servers
- MCP Demo Server
MCP Demo Server
- typescript
0
GitHub Stars
typescript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can interact with this MCP server using HTTP POST requests to a dedicated endpoint that processes requests in a stateless, streaming fashion. It enables you to list available tools, call specific tools, and receive results efficiently over standard HTTP, making it easy to scale and deploy across modern environments.
How to use
To use the MCP server, send JSON-RPC 2.0 style requests to the HTTP streaming endpoint. Your client should connect to the endpoint, use the JSON-RPC format, and include headers that indicate you accept both JSON and text/event-stream responses. You can start by listing available tools, then call a tool to retrieve or transform data. All requests are processed independently, with no session state maintained by the server.
Your MCP client should target the primary MCP endpoint and handle responses as they stream back. Use a POST request to the /mcp path and ensure the Accept header includes application/json and text/event-stream. Health checks and basic server information are available through dedicated endpoints to help you monitor status and capabilities.
How to install
Prerequisites you need before installation include Node.js (with npm) installed on your machine.
-
Ensure Node.js and npm are installed on your system.
-
Install project dependencies.
-
Start the server in production or development mode depending on your workflow.
# Prerequisites
# - Install Node.js and npm from the official site or your package manager
# Install dependencies
npm install
# Run in production mode
npm start
# Run in development mode (with hot reload)
npm run dev
# Run tests for the MCP streaming client (optional)
npm run test
Configuration and usage notes
The primary MCP endpoint for remote usage is exposed at a specific URL. Use this endpoint to perform all JSON-RPC 2.0 calls over HTTP with streaming responses. The server exposes a health check endpoint and a root endpoint that provides server information and tool availability.
Security and health checks
Use the health endpoint to verify the server is running and reachable. Implement appropriate authentication and network controls in your deployment environment to protect access to the MCP endpoint in production.
Troubleshooting and notes
If you encounter connectivity issues, verify that you are calling the correct /mcp endpoint, your Accept header includes application/json and text/event-stream, and the server is reachable at its hostname and port. For deployment, prefer stateless HTTP transport to maximize scalability and resilience in serverless or containerized environments.
Appendix: MCP connection configuration
You can connect your MCP client to the remote server using an HTTP transport configuration that points to the endpoint URL. The server is designed to be stateless and horizontally scalable.
Available tools
tools/list
List all available MCP tools and provide their metadata to the client.
tools/call
Invoke a specific tool by name with given arguments and return the result.
read_widget_resource
Read the content of the widgetResource.md file from the server resources.
read_page_resource
Read the content of the pageResource.md file from the server resources.