MCP REST Demo Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP REST Demo ServerList all users"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
REST vs MCP Demo (stdio + HTTP/SSE)
A minimal, runnable demo of the difference between a plain REST API and MCP (Model Context Protocol) servers that wrap it — shown two ways: a local MCP server reached over stdio, and a remote-style MCP server reached over HTTP/SSE.
Architecture
Local (stdio) transport
------------------------
mcp-client-stdio.js --spawns + talks MCP over stdio--> mcp-server-stdio.js
|
| HTTP
v
server-rest.js
(Express API :3001)
^
| HTTP
|
mcp-client-http.js --connects over the network (SSE)--> mcp-server-http.js
(listens :3002)
------------------------
Remote-style (HTTP/SSE) transportBoth MCP servers expose the exact same five tools and wrap the exact same REST API on port 3001. Only the transport between client and server differs:
|
| |
Transport | stdio (stdin/stdout pipes) | HTTP + Server-Sent Events |
How the client finds it | Client spawns it as a child process | Client connects to a URL ( |
Server lifecycle | Starts and dies with the client | Runs independently, on its own — start it once and any number of clients can connect over time |
Can client/server be on different machines? | No — same machine, parent/child process | Yes — this is exactly how a genuinely remote MCP server would be reached |
Endpoints | none (raw stdio) |
|
The stdio version is what tools like Claude Desktop use for MCP servers installed locally on your machine. The HTTP/SSE version is the same idea as a hosted/remote MCP server — the kind you'd deploy once and let multiple clients (or multiple people) connect to over the network, the same way you'd deploy any web service.
Related MCP server: Node MCP Server
Files
server-rest.js — the Express REST API for managing users (in-memory storage). Identical for both demos; you can hit it directly with Postman or curl. Runs on port 3001.
mcp-server-stdio.js — MCP server over stdio. Spawned directly by
mcp-client-stdio.js.mcp-client-stdio.js — spawns
mcp-server-stdio.js, discovers its tools viatools/list, and runs the test sequence below.mcp-server-http.js — MCP server over HTTP/SSE. Runs standalone on port 3002; you start it yourself, in its own terminal, before running the HTTP client.
mcp-client-http.js — connects to
http://localhost:3002/sseover the network (no spawning), discovers tools viatools/list, and runs the identical test sequence.
Both MCP servers expose the same 5 tools:
list_usersget_user(parameter:id)create_user(parameters:name,email)update_user(parameters:id,name,email)delete_user(parameter:id)
1. Install dependencies
npm install2. Start the REST API
In one terminal (required for both demos below):
npm run restYou should see:
[REST] User API listening on http://localhost:3001Leave this running.
Try it with Postman / curl
curl http://localhost:3001/users
curl -X POST http://localhost:3001/users \
-H "Content-Type: application/json" \
-d '{"name":"John Doe","email":"john@example.com"}'
curl http://localhost:3001/users/1
curl -X PUT http://localhost:3001/users/1 \
-H "Content-Type: application/json" \
-d '{"name":"Jane Doe"}'
curl -X DELETE http://localhost:3001/users/1Watch the REST terminal — every request logs there.
3. Run the stdio (local) demo
With the REST API still running, in another terminal:
npm run client-stdioYou don't need to start the MCP server yourself — mcp-client-stdio.js
spawns mcp-server-stdio.js for you and talks to it over stdio.
If you want to see the stdio server run standalone (e.g. to try it from the MCP Inspector or Claude Desktop instead of the bundled client):
npm run mcp-stdioOn its own it just sits there waiting for a client to speak JSON-RPC on stdin — that's expected. Press Ctrl+C to stop it.
4. Run the HTTP/SSE (remote-style) demo
This one needs two terminals of its own, in order, because the HTTP server doesn't get spawned automatically — it's meant to represent a server running independently, somewhere else on the network.
Terminal 2 — start the HTTP MCP server (with the REST API from step 2 still running in terminal 1):
npm run mcp-httpYou should see:
[MCP-HTTP ...] MCP HTTP/SSE server listening on http://localhost:3002
[MCP-HTTP ...] SSE endpoint: GET http://localhost:3002/sse
[MCP-HTTP ...] Messages endpoint: POST http://localhost:3002/messagesLeave this running too.
Terminal 3 — run the HTTP client:
npm run client-httpThis connects to http://localhost:3002/sse (a plain network URL — no
spawning involved) and runs the same test sequence as the stdio client.
Test sequence (identical for both transports)
List all users (expect empty)
Create user "John Doe"
List all users again (shows John)
Get John by ID
Update John's name to "Jane Doe"
Get the user again to verify the update
Delete the user
List all users one more time (expect empty)
Each step prints timing info and the raw tool result. You'll also see
[MCP-SERVER] / [MCP-HTTP] log lines (the stdio server's logs are
inherited into the client's terminal via stderr; the HTTP server's logs
appear in its own terminal) and [REST] log lines in the REST terminal —
so you can watch one logical operation flow through all three layers for
either transport.
5. Talk to it in plain English (free mock version)
mock-ai-client.js is a free, no-API-key stand-in for a real AI client.
There's no LLM involved — it's a handful of regexes that recognize a few
plain-English phrasings and map them onto the same 5 MCP tools, discovered
the same way (tools/list) as the other clients. It exists to show the
shape of "natural language in → pick a tool → call it via MCP → REST API →
result out" before spending anything on the real thing.
With the REST API running (step 2 above):
npm run mock-ai-client -- "list all users"Or run it with no argument for an interactive prompt:
npm run mock-ai-clientPhrasings it understands:
list all userscreate a user named <name> with email <email>get user <id>update user <id>'s name to <name>update user <id>'s email to <email>delete user <id>
Anything else prints a "didn't understand" message listing these examples — unlike a real LLM-backed client, it can't generalize to phrasings it doesn't recognize.
This is not the real thing. A genuine AI client would use the Anthropic
Messages API's tool-use feature: hand Claude the same tools/list output
(converted to Anthropic's tool format — just renaming inputSchema to
input_schema, since MCP already uses JSON Schema), let Claude decide which
tool to call and with what arguments based on your actual request, run it,
and feed the result back. That requires a separate Anthropic API key (billed
separately from any Claude subscription) and costs a small amount per
request — a few cents at most for casual use with a cheap model like Claude
Haiku 4.5. Ask if you want that version built.
What this demonstrates
The REST API works exactly like any normal HTTP service (Postman-testable), and is unchanged between both demos — both MCP servers wrap the same API.
Neither MCP client hardcodes a URL, HTTP verb, or JSON body shape — both discover tool names, descriptions, and parameters via
tools/list.stdio = local: the client owns the server's process lifecycle by spawning it directly. Simple, but client and server must be on the same machine.
HTTP/SSE = remote-capable: the server runs independently and listens on a port; the client just connects to a URL, the same way it would connect to a server hosted anywhere else on the network. Multiple clients can connect to the same running server over time.
Either way, the MCP server is a thin translation layer: each tool call becomes one HTTP call to the REST API, and the HTTP response becomes the tool result.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA stateless HTTP streaming MCP server built with Express that provides tools to read resource files (widgetResource.md and pageResource.md) and demonstrates the HTTP Streaming Transport protocol implementation.Last updated6MIT
- Alicense-qualityDmaintenanceA minimal Express-based MCP server that exposes a weather tool through HTTP endpoints, demonstrating how to implement the Model Context Protocol with streamable HTTP transport.Last updated6ISC
- Alicense-qualityCmaintenanceA simple MCP server that exposes a createUser tool to add users to a local JSON file via stdio transport.Last updated3261MIT
- Alicense-qualityDmaintenanceA simple Model Context Protocol (MCP) server that allows LLMs to create and manage user entries in a JSON file system database.Last updated1,977MIT
Related MCP Connectors
The official MCP Server from Mia-Platform to interact with Mia-Platform Console
A basic MCP server to operate on the Postman API.
MCP (Model Context Protocol) server for Appwrite
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/waqaszafar10p/mcp_rest_demo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server