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.wagend.app 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.wagend.app MCP_PORT=8700 uv run python -m wagend_mcp
# escucha en http://127.0.0.1:8700/ (Streamable HTTP)

Variables:

VariablePurpose
WAGEND_API_URLAPI URL (default https://api.wagend.app)
MCP_TOOLSETSToolsets to expose: booking, admin or both (default booking,admin)
MCP_HOST, MCP_PORTWhere it listens (default 127.0.0.1:8700)
MCP_ALLOWED_HOSTSAllowed 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.

ToolScopeDoes
list_servicesconfig:readServices with duration and price
find_slotsslots:readAvailable times for a service between two dates
hold_slotbookings:write10-minute hold
confirm_bookingbookings:writeConfirms a hold with the customer's data
cancel_booking, reschedule_bookingbookings:writeManages an existing booking
get_bookingbookings:readBooking detail

Administration (admin): so the owner can run the business from their AI assistant.

ToolScopeDoes
list_resourcesconfig:readTeam, rooms, machines and groups
list_todaybookings:readToday's bookings
block_timeconfig:write and bookings:readCloses whole days of a resource (max. 31). It does not cancel existing bookings: it returns them for a person to decide
create_service, update_serviceconfig:writeCreates or changes a service, with its booking form
update_scheduleconfig:writeChanges the weekly schedule or the time zone
get_statsbookings:readBookings, occupancy and no-shows per resource
get_stage_config, list_stage_config_versions, get_stage_config_versionconfig:readStages, actions and forms, with their version history
update_stage_config, revert_stage_configsettings:writeReplaces 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