Connect an MCP Server
Open in CMSThe Model Context Protocol (MCP) is an open standard that lets your agent discover and call tools hosted on any compatible server, without you writing code. Instead of registering one endpoint at a time, you point qlar at an MCP server and it fetches the full list of tools in one step. The AI then decides on its own which tool to call, when to call it, and what arguments to pass.
In this tutorial you connect Atlas, Kirana Group's operations assistant, to an MCP server. Kirana's site team keeps its weekly capex tracker in a Python script that uses the openpyxl library to write Excel files. When they get stuck, they ask Atlas, and Atlas looks up the current library documentation instead of answering from memory. You practice with Context7, a free public MCP server for software library documentation. Once the steps are familiar, you replace it with your own MCP server.
Before you start
- You have worked through Connect Your API, or you know how the AI decides when to call a tool.
- You have the URL of an MCP-compatible server, plus its credentials if it needs any. This tutorial uses Context7, which is public, so no account is needed.
- You know how to test and publish changes. See Preview and Publish Changes.
How MCP Works
MCP splits the work into two phases:
-
Discovery: qlar sends a request to the MCP server's endpoint. The server responds with a structured list of tools: each tool has a name, a description, and an input schema. qlar registers each tool that is on as a function the AI can call.
-
Execution: during a conversation, the AI decides whether a tool is relevant to the user's message. If it is, qlar sends a tool-call request to the same MCP server, receives the result, and passes it back to the AI to use in its reply.
MCP vs. Custom API
| Custom API | MCP | |
|---|---|---|
| How tools are defined | You define each endpoint manually | The server exports its tools automatically |
| Number of tools per config | 1 | Many (one server can expose dozens) |
| When to use | You own the API and control its schema | You want to connect to an existing MCP-compatible service |
Use Custom API when you integrate a specific endpoint you own, such as Kirana's Projects API. Use MCP when you connect to a service that already speaks the MCP protocol.
Scenario Used in This Tutorial
| Field | Value |
|---|---|
| Server URL | https://mcp.context7.com/mcp |
| Display name | context7_docs |
| Description | Practice server: up-to-date documentation for software libraries via Context7. Replace with your own MCP server. |
| Authorization method | None (public, no registration required) |
| Tools discovered | resolve-library-id, query-docs |
| Test question | How to write a cell and save a workbook with openpyxl |
Context7 is a practice server. It shows how MCP works with a real server and real tools. For your own agent, use an MCP server that gives access to your own systems, such as a document search or a ticket lookup.
Step 1: Open MCP Servers
Move your pointer over the icon sidebar on the left edge of the CMS to expand it (on a narrow screen, click the menu button (β°) at the top left instead). Expand Tools, then click MCP.
The MCP servers page lists all MCP servers connected to this agent. The first time, it shows No MCP servers yet with the hint "Add a server to give your agent tools like document search or a ticket lookup." That is expected.

Step 2: Add a new MCP server
Click Add MCP server. A drawer titled Add MCP server opens. It has four sections: Server, Authorization, Tool defaults, and Availability. Keep it open for the next steps.
Step 3: Fill in the Server section
Server: where the server lives and what you call it in the CMS.
-
Server URL (required): enter the endpoint below. This is the MCP endpoint your provider gave you. It must start with
https://.https://mcp.context7.com/mcp -
Display name (required): type
context7_docs. Only you see this name. Use a name you will recognize in the server list. -
Description (optional): add a short note so teammates know why the server is there:
Practice server: up-to-date documentation for software libraries via Context7. Replace with your own MCP server.
Tip: If the server needs a specific path (for example
/mcp,/sse, or/v1/mcp), include it in the URL. Ask the server provider if you are unsure. Most first-time connection problems come from small typos in the URL, so check it before you go on.
Step 4: Configure Authorization
Authorization: how the server checks that the call comes from you.
Context7 is public, so no credentials are needed. Leave Authorization method set to None. The hint under the field says: "The server is public and accepts calls without credentials."
If your own MCP server needs credentials, see Authorization Options at the bottom of this page.
Step 5: Check Tool defaults and Availability, then save
- Under Tool defaults, leave Loading message set to Auto. This is what users see while a tool from this server is running. With Auto, qlar writes a fitting message for each tool. The setting applies to every tool discovered from this server, and any tool can override it later.
- Under Availability, leave Make these tools available to the agent switched on (the default). Turn it off to keep the setup saved but hide every tool from conversations.
- Click Save server in the drawer footer.

qlar saves the server, contacts the Server URL to discover its tools, and the drawer title changes to Edit MCP server with the Tools tab open. If discovery fails, check the URL and authorization, then try again.
Note: The Tools tab appears only after the server has been saved once, because qlar must connect to the server to fetch the tool list.
Step 6: Review the tools
The Tools tab shows every tool the server returned. For Context7 you see two:
| Tool name | What it does |
|---|---|
resolve-library-id | Resolves a package or product name (for example openpyxl) to a Context7-compatible library ID |
query-docs | Retrieves and queries up-to-date documentation and code examples from Context7 for that library |
The line above the list says 2 of 2 tools are on. The agent can call only these.. Use the controls to manage them:
- All, On, and Off filter the list. Search tools finds a tool by name.
- The switch next to each tool turns it on or off. A tool that is off stays in the list but is hidden from the AI, so it will not be called.
- Turn all off switches every tool off at once.
- The arrow at the end of a row expands the tool's full description.
- The refresh button (Refresh from server) fetches the tool list again (see Refreshing the Tool List).

Leave both tools on. The AI usually chains them: it calls resolve-library-id to find the right library ID, then query-docs to fetch the relevant documentation. Take a minute to read each description; it helps you predict when the AI will call which tool.
Click Save changes.
Step 7: Check the server list and publish
Close the drawer. The MCP servers page now lists context7_docs with its URL, status Active, 2 of 2 on under Tools, and None under Authorization. The switch under Available turns all of the server's tools on or off for the agent, and the Row actions menu opens more actions for the server. Use Search servers or tools and the Status filter when the list grows.

Every save on the MCP servers page is stored as a draft. You can test the tools in the preview right away (next section), and real users get them after you click Publish in the top bar. See Preview and Publish Changes.
Check the result
In the preview panel on the right, click the reload button to start a fresh conversation. Then ask the question a member of the site team would ask:
Our site team builds the weekly capex tracker with the Python library openpyxl. Check the openpyxl docs: how do I write a value into cell B2 and save the file?
Atlas calls resolve-library-id to find openpyxl, then query-docs to fetch the relevant section. While the tools run you see a short loading message. The answer contains a Python snippet that creates a Workbook, writes ws["B2"] = "Your value", and saves with wb.save("capex_tracker.xlsx"). It adds that save() overwrites an existing file, and that you load an existing workbook with load_workbook() first. It ends with the source: the openpyxl documentation page on creating and saving a workbook.
![Atlas preview: the user asks how to write a value into cell B2 with openpyxl and save the weekly capex tracker; Atlas replies with a Python code block that imports Workbook, sets ws['B2'] = 'Your value' and calls wb.save('capex_tracker.xlsx'), explains that save() overwrites the file and that load_workbook() opens an existing workbook, and names the source: openpyxl documentation, Create and save a workbook](/images/docs/configuring-your-agent/call-mcp-server/04-preview-mcp-answer.png)
Check three things: the answer is about the right library, it contains concrete code, and it names the documentation it used instead of giving a generic answer.
If the answer is not right:
- Atlas answers from memory without a source. Check that the server's switch in the list is on, both tools are on in the Tools tab, and you saved. Then ask again in a fresh conversation.
- Atlas says it cannot reach the documentation. Check the Server URL and the Authorization method.
Tip: Try a less common library, for example "How do I read only the visible sheets of a workbook with pandas?", to see how the AI resolves libraries it has not used before.
Advanced Features
The steps above cover the most common setup. The sections below explain features you may need as your integration grows.
Authorization Options
qlar supports five authorization methods for MCP servers. Select the Authorization method in the Authorization section and the required fields appear.
| Type | When to use |
|---|---|
None | Public endpoints, no credentials needed |
Bearer Token | Servers secured with a static Bearer token |
Custom Header | Servers that use a custom header name (for example X-API-Key) |
Server OAuth | Servers using OAuth 2.0 handled on the server side (Client Credentials or Google Service Account) |
Client OAuth | Servers using OAuth 2.0 with a user login flow (Google or Microsoft) |
Bearer Token
Enter the token in the Token field. qlar sends it as Authorization: Bearer <token> on every request.
Custom Header
Enter the Header name (for example X-API-Key) and the Header value. qlar attaches this header to every request to the MCP server.
Server OAuth: Client Credentials Enter the Token URL, Client ID, and Client secret. qlar fetches and refreshes the token automatically.
Server OAuth: Google Service Account Enter the Token URL and upload your Google Service Account JSON file. qlar handles JWT signing and token rotation.
Client OAuth: Google / Microsoft Enter the Client ID (and Tenant ID for Microsoft). The user completes the login flow in their browser; qlar then uses the resulting token for all tool calls.
For OAuth authorization types, you can also add OAuth scopes: click Add scope to add the permission scopes your server requires.
Loading Text Types
The Loading message setting under Tool defaults controls what users see while a tool is running. It applies to every tool from the server, and any tool can override it later.
| Type | Behavior |
|---|---|
None | No loading message is shown |
Fixed | Always shows the exact text you enter in Message |
Dynamic | Uses the Message field as a prompt to generate a context-aware message |
Auto | qlar generates a loading message automatically based on the tool being called |
Auto is recommended for MCP servers because tool names and purposes vary. qlar writes a fitting message for each one without extra configuration.
Disabling Individual Tools
If an MCP server exposes tools that do not fit your agent's purpose, turn them off in the Tools tab instead of deleting the whole server. Tools that are off are hidden from the AI but stay in the list, so you can turn them on again later.
Example: A server exposes both
send-emailandread-inbox. If Atlas should never send email on its own, leave onlyread-inboxon.
Refreshing the Tool List
When an MCP server adds or removes tools, the Tools tab does not update automatically. To fetch the list again, open the server's drawer, click the Tools tab, and click Refresh from server. New tools are on by default, and tools the server no longer offers are turned off. Review the list, then click Save changes.
Next steps
- Next in the journey: Work With Other Agents, to let Atlas ask Ledger, Kirana's finance assistant, about vendor payments.
- Connect Your API: register a single endpoint manually, such as Kirana's Projects API.
- Using Plugins: connect ready-made plugin services.