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

# Set up Notion MCP Server

> Connect Notion as a fully managed MCP server on the TrueFoundry MCP Gateway so agents can search, read, and edit pages, databases, and comments.

[Notion](https://www.notion.so) is a collaboration and productivity tool for notes, docs, wikis, and databases. TrueFoundry ships it as a fully managed MCP server, so your agents can search workspaces and read or edit pages, databases, and comments without any infrastructure setup on your end. You add it from the TrueFoundry catalog, authorize once via OAuth2, and the endpoint is immediately available to every MCP-compatible client you use.

Notion is provisioned as a TrueFoundry Managed MCP — the platform manages its URL, auth, scopes, and credentials. For how managed servers are provisioned and kept up to date, see [TrueFoundry Managed MCPs](https://www.truefoundry.com/docs/ai-gateway/mcp/tfy-managed-mcp-server).

## How TrueFoundry Manages the MCP Server

TrueFoundry's MCP Gateway acts as a reverse proxy between your agents and MCP servers like Notion. When you add Notion as a managed MCP, TrueFoundry handles:

* **Authentication** — Agents authenticate once to the TrueFoundry MCP Gateway. The gateway handles outbound auth to Notion. Authorization happens directly between your account and your Notion workspace through the OAuth2 flow; TrueFoundry does not receive your Notion credentials.
* **Tool-level access control** — You can selectively enable or disable individual Notion tools per team from the TrueFoundry UI.
* **Audit trail** — Every tool invocation is traced with the calling user, tool name, input payload, and latency. Traces export via OpenTelemetry to your observability stack.
* **Guardrails** — TrueFoundry's guardrail hooks apply at `mcp_pre_tool` (before a tool is invoked) and `mcp_post_tool` (after the tool returns), letting you enforce content policies on Notion requests and results in real time.

## Adding Notion to TrueFoundry

<Steps>
  <Step title="Open the MCP Server catalog">
    Navigate to **MCP Servers** in the TrueFoundry sidebar and click **Add new MCP Server**. Select **Connect TrueFoundry Managed MCPs** to open the catalog, find **notion** (described as "Notion is a collaboration and productivity tool"), and click **+ Add**. TrueFoundry registers the server and takes you to the Notion MCP server detail page.

    <Frame>
      <img src="https://mintcdn.com/truefoundry/VRV0Qoigogl4kP4v/images/docs/ai-gateway/notion-step1-catalog.png?fit=max&auto=format&n=VRV0Qoigogl4kP4v&q=85&s=73bb1337122154ff5ee14899b4c5008a" alt="TrueFoundry managed MCP catalog with the notion card highlighted" width="1568" height="1726" data-path="images/docs/ai-gateway/notion-step1-catalog.png" />
    </Frame>
  </Step>

  <Step title="Start the connection">
    The Tools tab shows "You're not connected to this MCP Server." Click **Connect Now** to begin the OAuth2 authorization.

    <Frame>
      <img src="https://mintcdn.com/truefoundry/VRV0Qoigogl4kP4v/images/docs/ai-gateway/notion-step2-connect-now.png?fit=max&auto=format&n=VRV0Qoigogl4kP4v&q=85&s=aca99541ba506f6a492d02952bd8d10b" alt="Notion MCP server detail page showing OAuth2 auth type and the Connect Now button" width="2680" height="1720" data-path="images/docs/ai-gateway/notion-step2-connect-now.png" />
    </Frame>
  </Step>

  <Step title="Approve via the TrueFoundry Gateway">
    A "Connect via Truefoundry Gateway" popup appears showing the MCP Gateway URL, the redirect URL, and the MCP servers to authorize. Review the details and click **Approve**.

    <Note>
      You'll be redirected to each MCP server in sequence to grant access. TrueFoundry does not receive your credentials.
    </Note>

    <Frame>
      <img src="https://mintcdn.com/truefoundry/VRV0Qoigogl4kP4v/images/docs/ai-gateway/notion-step3-gateway-approve.png?fit=max&auto=format&n=VRV0Qoigogl4kP4v&q=85&s=7a8f0a3fa5e6bb5e2027f1d17031a7a3" alt="Connect via TrueFoundry Gateway popup listing notion-test under Authorize MCP Servers with Deny and Approve buttons" width="1318" height="1142" data-path="images/docs/ai-gateway/notion-step3-gateway-approve.png" />
    </Frame>
  </Step>

  <Step title="Authorize your Notion workspace">
    Notion's own consent screen opens. Select the **workspace** to connect, review the access Notion will grant (page and database access, search, workspace users), confirm you trust the redirect URL, and click **Continue**.

    <Frame>
      <img src="https://mintcdn.com/truefoundry/VRV0Qoigogl4kP4v/images/docs/ai-gateway/notion-step4-workspace-consent.png?fit=max&auto=format&n=VRV0Qoigogl4kP4v&q=85&s=f3f0bef517efa26b9fe0954f04a9bc0b" alt="Connect with Notion MCP screen showing workspace selection, the granted permissions, and a Continue button" width="968" height="1444" data-path="images/docs/ai-gateway/notion-step4-workspace-consent.png" />
    </Frame>
  </Step>

  <Step title="Verify tools">
    After authorizing, the **Tools** tab populates with Notion's available tools — search, fetch, create and update pages, databases, comments, and more. Notion also exposes MCP **Resources** on its own tab. Each tool shows its description and a **Try** button so you can test it before wiring it into an agent. Tools are labeled **Read-only** or **Destructive** so you can see at a glance which ones modify data.

    <Frame>
      <img src="https://mintcdn.com/truefoundry/VRV0Qoigogl4kP4v/images/docs/ai-gateway/notion-tools-list.png?fit=max&auto=format&n=VRV0Qoigogl4kP4v&q=85&s=4ea13a8ac28b232efd84fae99547b99c" alt="Notion Tools tab populated with tools such as notion-search, notion-fetch, notion-create-pages, and notion-update-page, each labeled Read-only or Destructive" width="2694" height="1730" data-path="images/docs/ai-gateway/notion-tools-list.png" />
    </Frame>
  </Step>
</Steps>

## Connecting to an MCP Client

TrueFoundry exposes the Notion MCP server over HTTP transport. The endpoint is specific to your TrueFoundry tenant, so don't construct it by hand — copy the exact URL and ready-to-paste connection commands from the **How To Use** tab on the Notion server detail page.

The How To Use tab generates connection instructions for every major client, including Cursor, VS Code, Claude Code, Claude Web, Claude Desktop, Windsurf, Codex, and the Python and TypeScript MCP SDKs. Pick your client, copy the snippet, and paste it in. Click **Show API Key** on that tab to retrieve the API key if your client requires it as a header.

<Frame>
  <img src="https://mintcdn.com/truefoundry/VRV0Qoigogl4kP4v/images/docs/ai-gateway/notion-how-to-use.png?fit=max&auto=format&n=VRV0Qoigogl4kP4v&q=85&s=ad996131ba3b87e774a320b65dd140dc" alt="Notion How To Use tab showing connection commands for multiple MCP clients" width="2684" height="1722" data-path="images/docs/ai-gateway/notion-how-to-use.png" />
</Frame>

## Using the Tool Playground

Before deploying an agent, you can test any Notion tool directly in TrueFoundry:

<Steps>
  <Step title="Open a tool">
    On the Notion MCP server detail page, click **Try** next to any tool — for example `notion-fetch`.
  </Step>

  <Step title="Fill in the inputs">
    Provide the tool's inputs. For `notion-fetch`, enter the page or data source **Id** (or URL) and optionally toggle **Include transcript** or **Include discussions**.
  </Step>

  <Step title="Execute and inspect">
    Click **Execute Tool** and inspect the JSON output in the right panel.
  </Step>
</Steps>

<Frame>
  <img src="https://mintcdn.com/truefoundry/VRV0Qoigogl4kP4v/images/docs/ai-gateway/notion-tool-playground.png?fit=max&auto=format&n=VRV0Qoigogl4kP4v&q=85&s=d5e72b84766340b586d84651fbf3b977" alt="Notion tool playground showing the notion-fetch inputs and the JSON output panel" width="2118" height="1724" data-path="images/docs/ai-gateway/notion-tool-playground.png" />
</Frame>

## Tool Metrics

The **Tool Metrics** tab on the Notion server detail page shows per-tool usage data: invocation count, latency distribution, and error rates. Use this to monitor which tools your agents are using and whether any tool is producing errors in production.

## Disabling Individual Tools

If your use case only needs a subset of Notion's tools, you can disable the rest from the Tools tab. Each tool has a toggle to enable or disable it. Disabled tools are not callable by agents — they will not appear in the tool list returned to the MCP client. This reduces the tool surface exposed to the agent and avoids unnecessary calls — for example, disabling **Destructive** tools to keep an agent read-only.
