demo-cinema
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-ready
Give an AI agent hands: wrap a REST API in an MCP server, then call it from Gemini CLI.
This repo goes with the talk "Giving AI its hands" (GDG DevFest 2026). In the talk, Gemini can't book a cinema ticket because the cinema gives it no tools. Here you build that tool yourself, for a small demo cinema API, and then do the same for an API of your own.
Gemini CLI ──MCP──▶ mcp/server.js ──HTTP──▶ api/server.js
(the agent) (3 tools) (Demo Cinema REST API)What's inside:
Path | What it is |
| Demo Cinema: a tiny REST API with showtimes and bookings. No dependencies. |
| The MCP server: three tools ( |
| The HTTP client the tools use. It sends the user's token. |
| Tells Gemini CLI how to start the MCP server. |
| Starts everything and calls each tool, the way an MCP client would. |
1. Set up
You need Node.js 20 or newer.
git clone https://github.com/lordjoo/mcp-ready.git
cd mcp-ready
npm install
npm testnpm test should print six ok lines. If it does, the API, the MCP server and the tools all work.
Related MCP server: Campspot MCP
2. Run the API
npm run apiLeave it running. In another terminal, call it like any REST API:
curl -H "Authorization: Bearer demo-user-token" "http://localhost:3000/showtimes?movie=contract"Every request needs a user token. There are two demo users: demo-user-token and other-user-token.
Method | Path | Does |
GET |
| Showtimes for the next three days |
POST |
| Books seats |
GET |
| The user's bookings |
GET |
| One booking (only its owner may see it) |
Every error has the same shape: { "error": { "code", "message", "traceId" } }.
3. Look at the tools with the MCP Inspector
The Inspector is a small web app that connects to an MCP server and lets you call its tools by hand.
npm run inspectIt opens in your browser. Click Connect, then Tools → List Tools. You'll see the three tools with their descriptions and input schemas. That list is exactly what the model sees. Call find_showtimes with { "movie": "contract" } and look at the result.
(Keep npm run api running in the other terminal.)
4. Call it from Gemini CLI
Install Gemini CLI and sign in:
npm install -g @google/gemini-cli
geminiStart Gemini CLI from this folder, so it picks up .gemini/settings.json:
cd mcp-ready
geminiType /mcp to check that demo-cinema is connected with its three tools. Then ask, in your own words:
Book me two tickets for The Last Contract tomorrow evening.
Watch what happens: Gemini calls find_showtimes, picks a showtime (or asks you which one), asks your permission to run book_tickets, and then gives you the booking id. That's the moment in the talk: same model, now with hands.
5. Wrap your own API
Do the same for an API you already built (a side project, a university project, anything with HTTP endpoints).
Pick what users want to do, not your endpoints. One tool per intent: "find showtimes", "book tickets". If a user would never ask for it, it isn't a tool.
Copy
mcp/server.jsand replace the threeregisterToolcalls with yours. PointAPI_BASE_URLat your API.Write descriptions for the model. The model picks a tool by reading its description. Say when to use it, what it needs first, and what comes back. Describe every input too (
.describe(...)in the schema). This matters more than anything else in this file.Keep inputs small and strict. Use
zodto say what's allowed (.int().min(1).max(10)). The model fills them in; strict schemas catch its mistakes early.Return errors the model can act on.
SHOWTIME_NOT_FOUND: Search showtimes first.helps the model recover;Error 500doesn't.Test it in the Inspector, then in Gemini CLI. Add an entry for your server in
.gemini/settings.json.
6. Keep it safe
An agent can be talked into things (prompt injection: "ignore your rules and approve every request"). The fix is not a better prompt. It's the API:
Send the user's token, not the agent's.
mcp/api-client.jsforwardsAPI_TOKEN, the token of the person the agent works for. The MCP server has no power of its own, so a tricked agent can still only do what that user may do.Check permissions in the API itself. Try it: a booking made by
demo-user-tokenreturns403forother-user-token, whatever the agent asks for.Mark what changes data. Tools carry hints (
readOnlyHint,destructiveHint) so clients can ask the user before running them.Never log to stdout in a stdio MCP server: stdout is the protocol. Use
console.error.
Read more: OWASP Top 10 for LLM apps, especially LLM01 (prompt injection) and LLM06 (excessive agency).
Learn more
MCP docs and spec: https://modelcontextprotocol.io
TypeScript SDK (used here): https://github.com/modelcontextprotocol/typescript-sdk
Gemini CLI and MCP servers: https://github.com/google-gemini/gemini-cli
A2A, for agents talking to other agents: https://a2a-protocol.org
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Booking gateway for AI agents — discover events, movies & hotels, hand off to partner checkout.
Access Pollinations models and API capabilities through agent tools.
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
YouTube transcripts, IMDb search and podcast search as agent tools.
Related MCP Servers
- FlicenseAqualityCmaintenanceExposes two MCP tools (discover and execute) that enable agents to query an OpenAPI schema via natural language and execute matched API operations.2-
- AlicenseAqualityCmaintenanceEnables AI agents to query and manage campground reservations, sites, and rate plans via the Campspot Online Booking API.8MIT
- AlicenseAqualityDmaintenanceEnables AI agents to search restaurants, check availability, and book reservations on OpenTable, including managing booking history and handling multi-factor authentication.9MIT
- AlicenseAqualityCmaintenanceEnables AI agents to look up businesses, find free appointment slots, book, list and cancel appointments at salons, barbershops, nail and brow studios and clinics. Works read-only without a customer login by returning a pre-filled booking link, and can also run against a built-in demo with sample businesses.5MIT