Skip to content

MCP guide

Let your assistant use your own systems

Connect a service you already use, or upload one of our starter programs to your own hosting. Your assistant then answers with real bookings, orders and account details.

Find your business

How it works

MCP (Model Context Protocol) is an open standard for connecting AI assistants to other software. An MCP server offers a list of tools, such as find_slots or my_orders. You connect it once in MagizAI, choose which tools the assistant may use, and from then on it calls them whenever a visitor's question needs one.

  1. 01

    Connect

    Skills, then MCP servers. Paste the https address and the token. MagizAI reads the list of tools.

  2. 02

    Choose the tools

    Press Manage. Tick the tools to use. Anything unticked is never called.

  3. 03

    Safe or Sensitive

    Safe tools run straight away. Sensitive tools wait until the visitor types back a six-digit code, so nothing changes without their go-ahead.

  4. 04

    Tie accounts to the sign-in

    For a tool that reads one customer's data, set its email or account argument to "Filled from the signed-in visitor". It is then never taken from the chat.

Limits to design for

These are the real limits of the MagizAI side. A server built within them works first time.

LimitValueWhat it means for you
TransportStreamable HTTP over httpsThe address must be public. Servers that only run on a computer (stdio) cannot be connected.
Sign-inNone, Bearer token, custom header, or username and passwordServices that only offer an OAuth login cannot be connected yet.
Time per call10 secondsThe visitor is waiting for the reply. Answer from an index or cache, not a slow report.
Result read by the assistantFirst 1,500 charactersReturn short, factual text: five results with the key facts, not a whole record.
Tools per server50Keep one server per job. A few clear tools work better than many overlapping ones.
ArgumentsText, numbers, true/false, fixed choices, simple listsoneOf, $ref, pattern and lists of objects are not supported yet. A tool that uses them shows "Cannot be used".
Servers per workspaceSet by your planSkills, then MCP servers shows how many your plan allows.

Signed-in customers

Tools such as "my orders" or "my appointments" must only ever show the signed-in customer's own data. MagizAI does this with a signed identity token from your website, never with what the visitor types.

  1. In MagizAI, open the chatbot, find Signed visitor identity and generate a secret. Keep it on your server.
  2. When a customer is signed in to your website, your backend signs a short token (HS256) with their email and an expiry, and puts it on the widget tag as data-identity.
  3. In the MCP tool settings, set the email argument to "Filled from the signed-in visitor". MagizAI fills it from the verified token and refuses the call if the visitor is not signed in.
<?php
// On your server, for the signed-in customer. $secret comes from the chatbot's
// "Signed visitor identity" setting and never goes to the browser.
function magiz_identity(string $email, string $name, string $secret): string
{
    $b64 = fn ($s) => rtrim(strtr(base64_encode($s), '+/', '-_'), '=');
    $head = $b64(json_encode(['alg' => 'HS256', 'typ' => 'JWT']));
    $body = $b64(json_encode([
        'email' => $email,
        'name'  => $name,
        'iat'   => time(),
        'exp'   => time() + 3600,
    ]));
    return "$head.$body." . $b64(hash_hmac('sha256', "$head.$body", $secret, true));
}
?>
<script src="https://magiz.ai/widget.js" data-key="YOUR_WIDGET_KEY"
        data-identity="<?= magiz_identity($user->email, $user->name, $secret) ?>" defer></script>

The token must include exp and can last at most 24 hours. The secret never goes in the browser; only the finished token does. WHMCS sites get this from our WHMCS module automatically.

Examples by business

Each business type has a real use case, a sample conversation, and two ways to do it: a service you can connect today, or a starter program you upload to your own hosting and point at your own data.

Use the WHMCS module. Hosting companies do not need an MCP server: the MagizAI module for WHMCS answers invoices, services, domains and tickets for signed-in clients, and shows your plans as cards.

WHMCS module

Or connect

Stripe

Subscribers ask when their line expires and whether a channel is included. The assistant reads it from your panel and answers at 2am without a ticket.

Sample conversation

Visitor: My TV stopped working, is my subscription expired?

Assistant: Your Family package is active until the 24th and 2 of your 3 devices are in use, so it hasn't expired. Try restarting the app on the TV.

Visitor: Do you have 4K sports?

Assistant: Sports 4K is in the Premium package (Rs 899 a month, 5 devices).

Set the tools like this

  • packagesSafe
  • find_channelSafe
  • my_subscriptionSafe· email filled from the signed-in visitor

Starter program

Download magizai-mcp-iptv.zip · 9 KB

SHA-256 14f5a08449fb90bbbab4956b82dd061d376d84b01a45d29807be09d590741964

Or connect

n8nStripe

Patients see real free slots and book them. Signed-in patients see their own upcoming appointments.

Sample conversation

Visitor: Can I see a doctor tomorrow morning?

Assistant: Yes. Tomorrow Dr. Aisha Rather is free at 09:00 and 09:20, and Dr. Imran Shah (children) at 10:00. Which one suits you?

Visitor: 9:20 with Dr. Rather please, it's for a cough. I'm Sara Ahmed, sara@example.com

Assistant: To book 09:20 tomorrow with Dr. Aisha Rather, please type the code 482915 to confirm.

Visitor: 482915

Assistant: You're booked for 09:20 tomorrow. Your reference is RFC-3A91C2. Please arrive 10 minutes early.

Set the tools like this

  • clinic_infoSafe
  • find_slotsSafe
  • request_bookingSensitive
  • my_appointmentsSafe· patient_email filled from the signed-in visitor

Starter program

Download magizai-mcp-clinic.zip · 10 KB

SHA-256 8f9cf73d524e9d4e14f52745bf5180fd864899c20ce631461b6b38e86ee7ce03

Or connect

n8nZapier

Patients ask what a treatment costs and when the practice is free, and request an appointment in the chat.

Sample conversation

Visitor: How much is a root canal?

Assistant: A root canal starts at Rs 6,000 per tooth and usually takes two visits. The crown is extra. Would you like a free time to come in?

Visitor: Yes, tomorrow afternoon if possible

Assistant: Tomorrow Dr. Nida Wani is free at 12:30 and Dr. Omar Lone at 17:00. Which one works for you?

Set the tools like this

  • treatment_pricesSafe
  • find_slotsSafe
  • request_appointmentSensitive

Starter program

Download magizai-mcp-dental.zip · 9 KB

SHA-256 60dfa4b72880d5760d9081c4cff5edde6d1503d3ac4b4895ecd88de292ca2f69

Or connect

n8nZapier

Students search courses by subject and start date, and signed-in applicants check where their application stands.

Sample conversation

Visitor: When does the Python course start and are there seats?

Assistant: Data science with Python (DS201) starts in about a month, runs 16 weeks on Tuesdays and Thursdays 18:00-20:00, and costs Rs 24,000. Only 3 seats are left.

Visitor: I applied already, what's my status?

Assistant: Your application APP-2231 needs one document: please upload your class 12 marksheet in the student portal.

Set the tools like this

  • find_coursesSafe
  • my_applicationsSafe· email filled from the signed-in visitor

Starter program

Download magizai-mcp-education.zip · 9 KB

SHA-256 224fd0609f46b61e8b160277c8ad3bb66aaa195f4519efa7943d477bd8aa19cd

Or connect

AirtableZapier

Shoppers check price, stock and sizes, and signed-in customers track their own orders with the carrier and tracking number.

Sample conversation

Visitor: Where is my order?

Assistant: Order #1042 (Rs 7,450) shipped 3 days ago with Delhivery, tracking DLV778812. Order #1051 is being packed now.

Visitor: Is the rose pashmina back in stock?

Assistant: The rose pashmina is out of stock at the moment. The natural one is Rs 6,500 and 4 are in stock.

Set the tools like this

  • product_stockSafe
  • store_policySafe
  • my_ordersSafe· email filled from the signed-in visitor

Starter program

Download magizai-mcp-ecommerce.zip · 9 KB

SHA-256 d8aa3bdd8a91a371a6cda133261d2192cac461d134752e268707564ae0d8a945

Or connect

Shopify StorefrontStripe

Buyers search by area, budget and bedrooms, get the details of one listing, and ask for a viewing.

Sample conversation

Visitor: Any 2 or 3 bedroom flats to rent in Srinagar under 30k?

Assistant: Yes: RE-102, a furnished 2-bedroom in Jawahar Nagar, 1,050 sq ft, Rs 28,000 a month, available now. Want to see it?

Visitor: Yes, Saturday morning

Assistant: I'll request a viewing of RE-102 for Saturday morning. Please type the code 551208 to confirm.

Set the tools like this

  • search_listingsSafe
  • listing_detailsSafe
  • request_viewingSensitive

Starter program

Download magizai-mcp-real-estate.zip · 10 KB

SHA-256 d0c1dad84a9d6e405900c053965699b4a2ebcfba303f561def3da12f7413b544

Or connect

AirtableMake

Guests check room availability for their dates, compare tour packages and send a booking request.

Sample conversation

Visitor: Room for 2 from next Friday for 3 nights?

Assistant: Yes. A deluxe double with lake view is Rs 4,500 a night, Rs 13,500 for 3 nights, breakfast included. The houseboat room is Rs 6,500 a night with dinner too. Which would you like?

Visitor: What Gulmarg trips do you have?

Assistant: The Srinagar and Gulmarg package is 4 nights at Rs 18,500 per person, with a houseboat night, the Gulmarg day trip with gondola tickets and airport transfers.

Set the tools like this

  • check_availabilitySafe
  • tour_packagesSafe
  • request_bookingSensitive

Starter program

Download magizai-mcp-hotel.zip · 10 KB

SHA-256 fd27c3ea208e91ec02b500aca0dfefe6b24b06213a6d70dd80b00298bbbe0c95

Or connect

Maken8n

Prospects see your services and starting prices. Signed-in clients see their project's stage, next milestone and manager.

Sample conversation

Visitor: What's happening with our website project?

Assistant: The new company website (PRJ-310) is in design review. The next step is your homepage design sign-off, due in 3 days. Mehak is managing it.

Set the tools like this

  • servicesSafe
  • my_projectsSafe· email filled from the signed-in visitor

Starter program

Download magizai-mcp-agency.zip · 8 KB

SHA-256 ce433a86b097aed3a901946d19693087a7db3c9053447dd1f99435f440d7c4be

Or connect

ZapierAtlassian

Visitors compare cover. Signed-in customers check renewal dates and where a claim stands, without calling.

Sample conversation

Visitor: Where is my hospital claim?

Assistant: Claim CLM-5501 (Rs 42,000) on your Family Health Shield policy is under review. Our assessor will call you within 2 working days.

Visitor: When does my health policy renew?

Assistant: POL-88120 renews in about 40 days. The premium is Rs 14,500.

Set the tools like this

  • productsSafe
  • my_policiesSafe· email filled from the signed-in visitor
  • my_claimsSafe· email filled from the signed-in visitor

Starter program

Download magizai-mcp-insurance.zip · 9 KB

SHA-256 f07d4b768d2a0fc51722111a98ae5c2f3bb2961992bc3f45f4a9b5db0010ec31

Or connect

StripeZapier

Users hear about a known incident before opening a ticket, compare plans, and see their own seats and usage.

Sample conversation

Visitor: Our emails aren't arriving

Assistant: There is a known issue right now: some emails are delayed by up to 10 minutes and a fix is in progress. They will arrive.

Visitor: How close are we to our limit?

Assistant: You've used 84,000 of 100,000 requests this month (84%) on the Growth plan, and 7 of 10 seats. It renews in 12 days.

Set the tools like this

  • service_statusSafe
  • plansSafe
  • my_accountSafe· email filled from the signed-in visitor

Starter program

Download magizai-mcp-saas.zip · 9 KB

SHA-256 5b8e77ea251d2588cf41fb48e65f715a72dd3f0e5d5c790bcde0bbff2e02ab2d

Or connect

StripeLinear

Guests read the menu, check a table for tonight, book it, and see their own reservations.

Sample conversation

Visitor: What's special today? We're vegetarian.

Assistant: Today's vegetarian special is phirni (Rs 160). For mains, the dum aloo is Rs 320. Would you like a table?

Visitor: Table for 4 tomorrow at 8pm

Assistant: A table for 4 is free tomorrow at 20:00. To reserve it, please type the code 730461.

Set the tools like this

  • menuSafe
  • check_tableSafe
  • reserve_tableSensitive
  • my_reservationsSafe· email filled from the signed-in visitor

Starter program

Download magizai-mcp-restaurant.zip · 10 KB

SHA-256 d4ac852d93806ce3417a0610d1eba5fee6fe883b60a3028cb8a7298d892634d4

Or connect

ZapierMake

The simplest place to start: answers from your own facts table (hours, location, payment) and takes callback requests.

Sample conversation

Visitor: Are you open on Sunday? Where can I park?

Assistant: We're closed on Sundays; Monday to Saturday we're open 09:30-19:00. There's parking behind the building on Residency Road.

Set the tools like this

  • business_infoSafe
  • request_callbackSensitive

Starter program

Download magizai-mcp-general.zip · 9 KB

SHA-256 cb3994107ab2d6434741a01c7bca0c47aac603d2c6f9b4d9c51f26030c489d99

Or connect

Zapiern8n

Services you can connect today

These services run an MCP server of their own that MagizAI can connect to with a key. Give every key the smallest permissions that do the job: the assistant can only do what the key allows.

ServiceAddressSign-inGood for
Shopify Storefront
https://{your-shop}.myshopify.com/api/mcp
https://{your-shop}.myshopify.com/api/ucp/mcp
NoneProduct search, cart, and your store policies and FAQs. Connect both addresses: product search is on the second one.
Stripe
https://mcp.stripe.com
Bearer: a restricted key (rk_…)Looking up payments, invoices and subscriptions. Give the key read permissions only.
Zapier
https://mcp.zapier.com/api/v1/connect
Bearer: your Zapier MCP tokenAny action you set up in Zapier, across thousands of apps. The easiest way to reach a system that has no MCP server.
Make
https://<your zone>/mcp, shown in Make
Bearer: your Make MCP tokenYour Make scenarios, each one a tool.
n8n
The production URL of an "MCP Server Trigger" node
Bearer or custom headerAny workflow you build. Self-hosted n8n keeps customer data on your own server, which suits clinics.
Airtable
https://mcp.airtable.com/mcp
Bearer: a personal access tokenBases such as course lists or property listings. Limit the token to the bases the assistant needs.
Linear
https://mcp.linear.app/mcp
Bearer: an API keyIssues and projects, for questions like "is the bug I reported fixed yet?".
Atlassian
https://mcp.atlassian.com/v2/mcp
Username and password: your email and an API tokenJira and Confluence. An organisation admin must allow API-token sign-in first.

WordPress and WooCommerce

The WordPress MCP Adapter (and WooCommerce's MCP, a developer preview) sign in with a WordPress username and an application password. Choose "Username and password" in MagizAI. The official guides use a local proxy, so test the direct connection on a staging site first.

Not usable yet

HubSpot, Notion, Square, Cal.com and Calendly only allow an OAuth login on their hosted MCP servers, which MagizAI does not support yet. Reach them through Zapier, Make or n8n instead. Supabase works, but its token opens your whole account, including running SQL, so do not connect it to a customer-facing assistant.

Run a starter program

Each starter is a small PHP program with no dependencies. It runs on ordinary shared hosting, comes with demo data so it works the moment you upload it, and has one tools.php file to point at your own database. Needs PHP 7.4 or newer with PDO (SQLite for the demo data, or MySQL).

  1. Download the starter for your business and upload its folder to your website, for example to public_html/mcp/.
  2. Copy config.sample.php to config.php and set token to a long random secret. The server refuses to run with the sample token.
  3. Check it answers. The command below should list the tools.
curl -X POST https://yourdomain.com/mcp/index.php \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
  1. In MagizAI, connect it with the address of index.php and Bearer token authentication, then set the tools as shown on its card.
  2. Ask your assistant a question from the chat on your own site. Recent tool calls on the server page shows each call.

Use your real data

Set dsn, db_user and db_pass in config.php to your MySQL or MariaDB database, and change the SQL in tools.php to your own tables. Each tool is one block: a name, a one-line description of when to use it, its arguments, and a function that returns short text.

<?php
// tools.php: one block per tool. $db is a PDO connection from config.php.
$server->tool(array(
    'name' => 'my_orders',
    'description' => 'Use when a signed-in customer asks where their order is.',
    'inputSchema' => array('type' => 'object', 'properties' => array(
        'email' => array('type' => 'string', 'maxLength' => 190),
    ), 'required' => array('email')),
    'annotations' => array('readOnlyHint' => true),
    'handler' => function (array $args) use ($db) {
        $q = $db->prepare('SELECT number, status, tracking FROM orders
                           WHERE email = ? ORDER BY placed_on DESC LIMIT 5');
        $q->execute(array($args['email']));
        $out = array();
        foreach ($q->fetchAll() as $o) {
            $out[] = "#{$o['number']}: {$o['status']} {$o['tracking']}";
        }
        return $out ? implode("\n", $out) : 'No orders found.';
    },
));

Included .htaccess lets the web reach index.php only. On nginx, add the same rule yourself, or the demo database could be downloaded.

Build your own

Any language works if it speaks Streamable HTTP. These are the maintained options.

Build your own
PHP / Laravellaravel/mcpMcp::web('/mcp', Server::class)->middleware('auth:sanctum')
PHPmcp/sdkcomposer require mcp/sdk
PythonFastMCPmcp.run(transport="http") + StaticTokenVerifier
TypeScript@modelcontextprotocol/servernpm i @modelcontextprotocol/server @modelcontextprotocol/node
Gomodelcontextprotocol/go-sdkmcp.NewStreamableHTTPHandler(...)

WordPress and WooCommerce: install a plugin instead

Your shop already holds the products, the stock and the orders. Install the plugin, tick what the assistant may use, and it answers from WooCommerce live: search and stock, delivery cost to a postcode, a discount code a shopper typed, and a signed-in customer's own orders and tracking. 32 tools, no code to write.

Download magizai-wordpress-1.3.0.zip · 72 KB

SHA-256 8a2a40bf78ff83d84e2785f02de937fad8691a85112521c99337f905711efbd5

Next.js and JavaScript starter

The same idea as the PHP starters, written for the Next.js App Router with no dependencies: the endpoint, seven example tools (plan, usage, invoices, billing link, password reset, support ticket), the code that signs a customer's identity, and the chat widget that follows sign-in and sign-out. Tested against MagizAI's own client.

Download magizai-mcp-nextjs.zip · 12 KB

SHA-256 91aaa173184890491a46c212eb40865e74f36681cd598eac78231bd5d48fbbb9

Rules that make tools work well

  • Write one clear sentence per tool saying when to use it. The assistant picks tools by reading these descriptions.
  • Mark look-ups with readOnlyHint and anything that deletes or cancels with destructiveHint. MagizAI never lets a destructive tool be marked Safe.
  • Validate every argument on your side too, and limit each query to the signed-in customer's own rows.
  • Return short text with the facts the assistant needs. Never return passwords, full card numbers or internal notes.
  • Treat a tool call like any public API request: check the token, log it, and rate-limit it.

Troubleshooting

What you seeWhat to do
The server must be reachable on the public internet over https.The address is private, local or not https. Put the server on a public https address.
Your plan does not include MCP servers. Upgrade to connect one.Upgrade under Billing. Your tool settings are kept and come back when the plan allows them.
Cannot be used: …The tool's arguments use a form MagizAI does not support yet. Keep them to text, numbers, true/false, fixed choices and simple lists.
Changed on the server — review and save to use it againThe tool changed on the server. Open the server, check the tool, and save.
Connection fails with 401The token in MagizAI does not match config.php. On Apache, the included .htaccess passes the Authorization header through; some hosts need it.
"Set a secret token in config.php"The starter is still on the sample token. Set a real one in config.php.
"This needs the visitor to be signed in."The tool is tied to the signed-in visitor, and this visitor is not signed in, or their identity token failed. Check Signed visitor identity on the chatbot.
No tool call appearsThe assistant never uses a tool: check it is ticked, its skill is on under Skills, and its description says clearly when to use it.

Stuck on a connection?

Send us the server address and what you see. We will tell you what is wrong.