> ## Documentation Index
> Fetch the complete documentation index at: https://docs.architect.new/llms.txt
> Use this file to discover all available pages before exploring further.

# Connecting MCP Servers

> Bring any Model Context Protocol (MCP) server into your Architect app — connect it once and your agents can use its tools.

## What is an MCP Server?

**MCP (Model Context Protocol)** is an open standard for connecting AI agents to external tools and data sources. If a capability you need isn't in Architect's [built-in integrations](/integrations/communication/gmail) — a niche SaaS product, an internal API exposed over MCP, or a public MCP server like DeepWiki — you can connect it as an MCP server and let your agents call its actions.

<Info>
  **MCP servers are tied to your Lyzr account, not a single app.** Once you connect a server, it's available to *every* app you build under the same account — connect it once, reuse it everywhere. They're authenticated under your account, so your agents can use them without any extra keys.
</Info>

There are two ways to connect an MCP server to your Architect app.

## Method 1 — Connect in Lyzr Studio first, then just ask (recommended)

If you already know which MCP server you need, connect it in **Lyzr Studio** before you start building. Architect automatically sees all your connected MCP servers, so you just reference it in your prompt.

<Steps>
  <Step title="Open Lyzr Studio from Architect">
    In the Architect sidebar, click **Agent Studio** to open Lyzr Studio.

    <Frame>
      <img src="https://mintcdn.com/lyzr-636197f6/TxR2Y--nh27i3lr2/images/MCP/mcp-1.png?fit=max&auto=format&n=TxR2Y--nh27i3lr2&q=85&s=4478129b6200cc58a94074a9df1210be" alt="Agent Studio link highlighted in the Architect sidebar" width="2930" height="1666" data-path="images/MCP/mcp-1.png" />
    </Frame>
  </Step>

  <Step title="Go to Connections → Tools">
    In Studio's left sidebar, open **Connections** and choose **Tools**.

    <Frame>
      <img src="https://mintcdn.com/lyzr-636197f6/TxR2Y--nh27i3lr2/images/MCP/mcp-2.png?fit=max&auto=format&n=TxR2Y--nh27i3lr2&q=85&s=6e1059dfd7f6facee95d21ab9d2a02b7" alt="Connections menu expanded to Tools in Lyzr Studio" width="2940" height="1768" data-path="images/MCP/mcp-2.png" />
    </Frame>
  </Step>

  <Step title="Open the MCP tab and add a server">
    Switch to the **MCP** tab. You can either pick a ready-made server from **Available MCP Servers** (DeepWiki, Stripe, Supabase, and more), or click **+ New → MCP Server** to connect your own.

    <Frame>
      <img src="https://mintcdn.com/lyzr-636197f6/TxR2Y--nh27i3lr2/images/MCP/mcp-3.png?fit=max&auto=format&n=TxR2Y--nh27i3lr2&q=85&s=981babf62efe7f0fcb0fc22249d94ad8" alt="MCP tab showing connected servers, available servers, and the + New → MCP Server option" width="2916" height="1748" data-path="images/MCP/mcp-3.png" />
    </Frame>
  </Step>

  <Step title="Enter the server details">
    Give it a **name** and optional **description**, paste the **Server URL**, and pick an **Auth Type** — **No Auth**, **API Key**, or **OAuth**. Save it, and the server is now connected under your account.

    <Frame>
      <img src="https://mintcdn.com/lyzr-636197f6/TxR2Y--nh27i3lr2/images/MCP/mcp-4.png?fit=max&auto=format&n=TxR2Y--nh27i3lr2&q=85&s=2394e841bb63948b2e048679c1ae42b1" alt="Add MCP Server dialog: name, description, server URL, and auth type" width="2920" height="1768" data-path="images/MCP/mcp-4.png" />
    </Frame>
  </Step>

  <Step title="Start building in Architect and mention the server">
    Back in Architect, on the homepage, describe your app **and name the MCP server** you want it to use. Being specific helps Architect pick the right one. For example:

    > *I've connected Parallel Search MCP server in lyzr studio. Build an agent that uses it to search the web and show the results in a dashboard.*

    <Frame>
      <img src="https://mintcdn.com/lyzr-636197f6/TxR2Y--nh27i3lr2/images/MCP/mcp-5.png?fit=max&auto=format&n=TxR2Y--nh27i3lr2&q=85&s=5e2455c863614e143ca84bc6fb167df7" alt="Architect homepage with a prompt naming the connected Parallel Search MCP server" width="2930" height="1670" data-path="images/MCP/mcp-5.png" />
    </Frame>
  </Step>

  <Step title="Architect attaches it automatically">
    While building, Architect reads your live list of connected MCP servers, finds the one you named, and attaches it to the agent it creates — wiring up the server's available actions. No manual configuration needed.
  </Step>
</Steps>

<Note>
  For this to work, the server must be **connected and reporting its actions** in Studio. If a server shows as connected but lists no actions, Studio couldn't fetch its action list — re-check the server and try again. Architect will never invent or fake a tool it can't see.
</Note>

## Method 2 — Add an MCP server mid-build (to an app you've already built)

Already built your app and want to plug in a new MCP server in a later iteration? You can connect one **directly from Architect's build chat** — no need to switch over to Studio.

<Steps>
  <Step title="Open the '+' menu in the build chat">
    In your app's **Build** view, click the **“+”** button in the message composer and choose **Add MCP server**. (You can also type **`@mcp:`** to open the MCP menu, which lists your already-connected servers and offers to add a new one.)

    <Frame>
      <img src="https://mintcdn.com/lyzr-636197f6/TxR2Y--nh27i3lr2/images/MCP/mcp-m2-1.png?fit=max&auto=format&n=TxR2Y--nh27i3lr2&q=85&s=27d2f88f48a378eb3675e389bceeb6e9" alt="The + menu in the Architect build chat showing 'Add MCP server'" width="2928" height="1672" data-path="images/MCP/mcp-m2-1.png" />
    </Frame>
  </Step>

  <Step title="Fill in the server details">
    In the **Add MCP server** dialog, give it a **name**, paste the **Server URL**, and pick an **Authentication** type — then click **Connect**.

    | Auth type   | Use it when                                      |
    | ----------- | ------------------------------------------------ |
    | **No auth** | Public server — no credentials (e.g. DeepWiki)   |
    | **API key** | The server needs a key, sent as a request header |
    | **OAuth**   | Authorize in a popup window                      |

    The server is saved to your account (just like connecting it in Studio) and becomes available to your agents.

    <Frame>
      <img src="https://mintcdn.com/lyzr-636197f6/TxR2Y--nh27i3lr2/images/MCP/mcp-m2-2.png?fit=max&auto=format&n=TxR2Y--nh27i3lr2&q=85&s=c3d2d4775f5ebbddc4c7d3fef0e9e2da" alt="Add MCP server dialog inside Architect: name, server URL, and authentication" width="2922" height="1648" data-path="images/MCP/mcp-m2-2.png" />
    </Frame>
  </Step>

  <Step title="Ask Architect to use it">
    In the same chat, ask Architect to wire the newly connected server into your app. It picks it up from your live server list, attaches it to the agent, and rebuilds the affected part.
  </Step>
</Steps>

## What if I ask for an MCP I haven't connected?

Architect won't fake the connection. If you prompt it to use a server that isn't in your account (say, *"connect with DeepWiki MCP"* when DeepWiki isn't connected yet), it will tell you — in plain language — to add that server first using the **“+” / Add MCP server** button, naming the capability it needs. Once you add it (a quick form: name, URL, auth), continue the chat and Architect wires it in.

## MCP servers vs. built-in tools

The same capability can sometimes exist both as a **built-in Architect integration** and as **your own MCP server** (for example, Linear). They're different tools — Architect uses your MCP server only when you explicitly ask for it; otherwise it uses the pre-built integration. When in doubt, name the MCP server in your prompt so there's no ambiguity.

<Info>
  Prefer connecting a full custom tool with a defined schema instead? See [Custom Tools via Lyzr Studio](/integrations/custom-tools/custom-tools).
</Info>

## Troubleshooting

Is your MCP-powered app not working — the agent doesn't respond, or the data from the MCP never shows up? Work through these checks **in order**. The goal is to figure out whether it's an **MCP/agent problem** (the data isn't being fetched at all) or a **UI problem** (the data *is* fetched but Architect isn't displaying it).

<Steps>
  <Step title="Confirm the MCP server is connected">
    In Lyzr Studio, go to **Connections → Tools → MCP** tab and find your server under **My MCP Servers**. A **green dot** means it's connected. If it's missing or not showing green, re-add / reconnect it first (see [Method 1](#method-1-connect-in-lyzr-studio-first-then-just-ask-recommended)).

    <Frame>
      <img src="https://mintcdn.com/lyzr-636197f6/TxR2Y--nh27i3lr2/images/MCP/debug-1.png?fit=max&auto=format&n=TxR2Y--nh27i3lr2&q=85&s=5a4042fc857118233005cfc41eaa943a" alt="My MCP Servers in Lyzr Studio, each with a green connected indicator" width="2926" height="1752" data-path="images/MCP/debug-1.png" />
    </Frame>
  </Step>

  <Step title="Confirm the MCP is attached to the agent (with its tools)">
    In Architect, open the **Agents** tab, click your agent to open the **Edit Agent** panel, and click **Open in Lyzr Studio**.

    <Frame>
      <img src="https://mintcdn.com/lyzr-636197f6/TxR2Y--nh27i3lr2/images/MCP/debug-2.png?fit=max&auto=format&n=TxR2Y--nh27i3lr2&q=85&s=1cd0a44f5653a7610a623c8c191c9dae" alt="Edit Agent panel in Architect with the Open in Lyzr Studio button" width="2932" height="1672" data-path="images/MCP/debug-2.png" />
    </Frame>

    In Studio's **Manage Agent** page, check the **Tool Configuration** section — your MCP server and its actions (for example `ask_question`, `read_wiki_contents`, `read_wiki_structure`) should be listed. If they're missing, the agent isn't wired to the MCP.

    <Frame>
      <img src="https://mintcdn.com/lyzr-636197f6/TxR2Y--nh27i3lr2/images/MCP/debug-3.png?fit=max&auto=format&n=TxR2Y--nh27i3lr2&q=85&s=a6ee39f9b0ad98d387dccadb37238798" alt="Tool Configuration in Lyzr Studio showing the MCP server's actions attached to the agent" width="2934" height="1754" data-path="images/MCP/debug-3.png" />
    </Frame>
  </Step>

  <Step title="Test the agent directly in Lyzr Studio">
    On the same Manage Agent page, use the **Test Agent Inference → Chat** panel on the right. Ask it something that needs the MCP — for example: *"Can you fetch some information from the MCP connected."*

    <Frame>
      <img src="https://mintcdn.com/lyzr-636197f6/TxR2Y--nh27i3lr2/images/MCP/debug-4.png?fit=max&auto=format&n=TxR2Y--nh27i3lr2&q=85&s=773a2e9b7b05ca365e2c846b54cafb81" alt="Test Agent Inference chat in Lyzr Studio with a prompt asking the agent to fetch data from the connected MCP" width="2934" height="1768" data-path="images/MCP/debug-4.png" />
    </Frame>
  </Step>
</Steps>

### Reading the result

<Check>
  **The agent fetches the data in Studio →** the agent and its MCP connection are working correctly. The problem is almost certainly in your **app's UI** — Architect built the interface, but it isn't rendering the response. Go back to Architect and prompt it, for example:

  > *"The agent can fetch the response from the MCP fine, but I can't see it in the UI. Can you fix that?"*
</Check>

<Warning>
  **The agent can't fetch the data in Studio →** this is most likely an **MCP error or MCP connection error**, not a UI issue. Re-check the MCP server (Step 1): its URL, its auth type, and that its actions are listed. Reconnect it if needed and re-test in Studio *before* going back to Architect.
</Warning>
