MCP and AI agents
Connect Claude, ChatGPT or your own agent to the Fiuit MCP server to look up times, book and run the business with your API key.
Updated:
Fiuit includes an MCP server (Model Context Protocol) so AI agents use the same engine as the WhatsApp bot: same holds, same validation and same audit trail. The server is a thin client of the API: every tool calls the API with your own key, so MCP never grants more permissions than the key.
The server lives in the repository (packages/mcp) and today you run it yourself. The hosted server at mcp.fiuit.com is not deployed yet: it is Coming soon. So is OAuth authentication.
Run the server
You need Python 3.12+ and uv.
cd packages/mcp
uv sync
WAGEND_API_URL=https://api.fiuit.com MCP_PORT=8700 uv run python -m wagend_mcp
# escucha en http://127.0.0.1:8700/ (Streamable HTTP)
Variables:
| Variable | Purpose |
|---|---|
WAGEND_API_URL | API URL (default https://api.fiuit.com) |
MCP_TOOLSETS | Toolsets to expose: booking, admin or both (default booking,admin) |
MCP_HOST, MCP_PORT | Where it listens (default 127.0.0.1:8700) |
MCP_ALLOWED_HOSTS | Allowed hosts (DNS rebinding protection) |
Connect a client
Authentication is an API key in the Authorization header. Without a key in a valid format, the server answers 401 before entering the protocol.
With Claude Code:
claude mcp add --transport http wagend http://127.0.0.1:8700/ \
--header "Authorization: Bearer wg_live_xxx"
Or with the JSON configuration of any client that supports HTTP:
{
"mcpServers": {
"wagend": {
"type": "http",
"url": "http://127.0.0.1:8700/",
"headers": { "Authorization": "Bearer wg_live_xxx" }
}
}
}
To try it without an agent: npx @modelcontextprotocol/inspector (Streamable HTTP transport, the same URL and header).
Tools
All tools in the active toolset are listed, but each one only works if the key has the scope it needs; otherwise it returns the API's 403 error. Writes are audited with actor mcp.
Bookings (booking): for assistants that book on behalf of a customer.
| Tool | Scope | Does |
|---|---|---|
list_services | config:read | Services with duration and price |
find_slots | slots:read | Available times for a service between two dates |
hold_slot | bookings:write | 10-minute hold |
confirm_booking | bookings:write | Confirms a hold with the customer's data |
cancel_booking, reschedule_booking | bookings:write | Manages an existing booking |
get_booking | bookings:read | Booking detail |
Administration (admin): so the owner can run the business from their AI assistant.
| Tool | Scope | Does |
|---|---|---|
list_resources | config:read | Team, rooms, machines and groups |
list_today | bookings:read | Today's bookings |
block_time | config:write and bookings:read | Closes whole days of a resource (max. 31). It does not cancel existing bookings: it returns them for a person to decide |
create_service, update_service | config:write | Creates or changes a service, with its booking form |
update_schedule | config:write | Changes the weekly schedule or the time zone |
get_stats | bookings:read | Bookings, occupancy and no-shows per resource |
get_stage_config, list_stage_config_versions, get_stage_config_version | config:read | Stages, actions and forms, with their version history |
update_stage_config, revert_stage_config | settings:write | Replaces or reverts the stages (creates a new version; history is kept) |
Configuration writes require confirm=true. Without it, the tool does not call the API: it returns confirmation_required with what it would send, so the agent can show it to a person and repeat with the confirmation.
Example requests
- "Book a haircut with Juan tomorrow morning, under the name Carlos."
- "Block the laser machine next Monday for maintenance and tell me which bookings are affected."
- "How many no-shows did we have this month?"
Docs for LLMs
/llms.txtlists every documentation page./llms-full.txtcontains the full documentation in Markdown.