On May 14, we teamed up with the Xano team for a workshop that shows you how to build a smarter, conversational CRM using Model Context Protocol (MCP).
The link to the workshop 👇
‍
Here is what we covered:
This workbook was created to accompany the workshop and help you out with the steps. It walks you through the process demonstrated in the video, covering both the Xano backend setup for MCP and the WeWeb frontend implementation using AI-assisted design and workflows.
MCP is an open standard developed by Anthropic. It's described as a "universal way for AI models to connect with external systems, data sources, and tools," like giving AI "eyes and hands" to see and interact with other systems.
The architecture involves MCP clients (like AI chat apps) and an MCP server which contains various tools (API endpoints, database transactions, custom logic) that the AI agent can use. Xano allows you to create both MCP servers and remote clients.
MCP helps solve problems like integration complexity, fragmented implementations, and data isolation, and can reduce maintenance. It's seen as a gamechanger for dynamic tasks and improving user experience by unifying systems through a natural chat interface.
Now that you better understand MCP, let's get to work and set up backend in Xano.
The timestamps in the video are corresponding to steps outlined below.
In the workshop, we use a custom CRM example with tables for companies, contacts, and deals.
Start a new Xano workspace and use the AI database assistant to generate CRM tables like:
Or you can use the Xano snippet provided above.
API endpoints are essentially ways for systems to communicate and transfer information.
You can create a database schema and CRUD (Create, Read, Update, Delete) API endpoints using Xano's AI assistant. Or use the Xano snippet provided above.
Go to the AI Tools section and click create an MCP server.
For each API endpoint in your Xano workspace that you want the AI to have access to (e.g. get all companies):
This server will contain the tools the AI agent can access. You can edit the server settings to provide a specific description for each individual tool to give the AI more context on how to use it.
Because you are building a custom chat client in WeWeb (not using a third-party client like Cloud Desktop), you need an API endpoint in Xano that acts as the remote client. This endpoint is called whenever the user sends a message to the AI from the WeWeb frontend.
Build a POST endpoint to receive and process chat queries. The endpoint should:
This endpoint is where you configure which LLM provider(s) you will use (e.g., OpenAI, Azure OpenAI, Gemini) for the tool request and chat completion.
âś… Ensure all tools are protected using Xano's built-in authentication.
âś… Optionally add RBAC (role-based access control) to limit tool access by user roles.
WeWeb interacts with Xano using API endpoints. You need to install the Xano plugin in WeWeb to enable seamless integration and access all your endpoints.
Use Collections in WeWeb to fetch data from Xano API endpoints (e.g., getting a list of deals). You bind UI elements to collection data to display it.
Add a side menu component that appears from the right.
Create variables to manage the state and data of the chat:
Bind the placeholder element's properties (like display and width) to these variables.
Workflows allow you to execute actions when triggers occur (e.g., button click, item move in a list). You can chain different actions within a workflow, including calling Xano API endpoints.
Create a global workflow (e.g., sendMessageToChatbot) to:
After you created the workflow:
‍
Bind the Xano request parameters:
‍
Add actions to update the chat messages array:
Navigate to WeWeb AI:
Execute the prompt. WeWeb AI will generate the UI elements for the chat interface.
Check the generated design:
‍
Connect the Send Button:
Test the chat interface in preview mode by typing messages and sending them. Observe your message appearing, followed by the AI's response.
Happy building!
Sign up now, pay when you're ready to publish.