Skip to content

Guides AI & Agents

Build Your Own MCP Servers or Use a Platform? A Decision Guide for SaaS AI Features

Build an MCP server for your own product's data. For your customers' SaaS apps, use a platform. Per-customer OAuth and API upkeep cost more than the code.

Uday Gajavalli Uday Gajavalli · · 8 min read

Updated

Your team’s apps in Elaichi, from the team behind Truto, free for 14 days. Try Elaichi
Build Your Own MCP Servers or Use a Platform? A Decision Guide for SaaS AI Features

Most SaaS teams land in both columns: they build one MCP server for their own product and use a platform for the apps their customers connect.

Your situation Build Platform
Your own product's data Yes No
Customers' SaaS apps (Salesforce, Jira, HubSpot) If you staff OAuth upkeep Yes
How many apps One or two Five or more
Per-customer OAuth sign-in Token store per vendor Handled for you
Air-gapped or regulated Yes Only if self-hosted
Integration is your differentiator Yes, own it No

What a production MCP server for SaaS apps involves

MCP standardizes how an AI client talks to tools. It does not standardize the APIs behind those tools. Your MCP server still has to handle each vendor's pagination, rate limits, error formats and field names. Salesforce returns nextRecordsUrl for the next page. HubSpot uses paging.next.after. Jira uses startAt and maxResults. MCP puts one tool interface in front of these differences. Someone still writes and maintains the code for each one.

The first version is the cheap part. A demo with three read tools and one API key takes days. A server that real customers connect to their own accounts needs much more:

Cost center What it includes Why teams miss it
Tool surface Resource discovery, descriptions, schemas, read and write scoping The demo exposes three happy-path tools
Auth OAuth setup, refresh, re-auth, secret storage, consent It looks like a one-time setup until tokens start to expire
Execution Pagination, retries, rate limits, vendor-specific errors Vendor docs stop just before the difficult part
Safety Prompt-injection boundaries, least privilege, approval flows Teams treat MCP as transport, not as a security boundary
Operations Logs, audits, tenant isolation, incident response Nobody budgets on-call time for a proof of concept

Multiply that table by every app on your roadmap. One Salesforce MCP server is not one piece of work. It is OAuth app management, tenant onboarding, permission modeling, schema curation, retries, docs, monitoring, support runbooks, and a re-auth screen for the day a token dies in front of a customer.

For a line-by-line cost model, see our build vs. buy ROI case study. For what goes wrong in practice, see building integrations in-house.

Warning

If an integration does not make your product different, every sprint you spend on it is a tax on your roadmap. That time goes to API plumbing instead of to your agent.

Why per-customer OAuth is the hard part

Auth looks simple in a demo: paste an API key, call the endpoint, wrap it in a tool. It stops being simple when each of your customers connects their own Salesforce or Google account through OAuth.

Remote MCP auth has two hops:

  • MCP client to your MCP server. The MCP authorization specification makes your server an OAuth 2.1 resource server. It must validate each access token and check that the token was issued for it.
  • Your MCP server to the SaaS API. The same specification says the server must not pass the client's token through to the upstream API. So your server is also an OAuth client of Salesforce, HubSpot, Google and every other vendor, with a separate token for each customer.

The second hop is where custom builds stall. Astrix Security reviewed over 5,200 open-source MCP servers. 88% of them need credentials, 53% rely on long-lived static secrets such as API keys and personal access tokens, and only 8.5% use OAuth. Proper OAuth is a lot of work, so most servers skip it.

Here is the token flow for a single provider:

flowchart TD
    A["AI Agent calls<br>MCP tool"] --> B{"Token valid?"}
    B -->|Yes| C["Execute API call"]
    B -->|No| D{"Refresh token<br>available?"}
    D -->|Yes| E["Refresh token flow"]
    D -->|No| F["Re-authenticate<br>user via OAuth"]
    E --> G{"Refresh<br>succeeded?"}
    G -->|Yes| C
    G -->|No| F
    F --> H["Consent screen +<br>PKCE + Callback"]
    H --> I["Store new<br>tokens securely"]
    I --> C
    C --> J["Return result<br>to agent"]

    style F fill:#f96,stroke:#333
    style H fill:#f96,stroke:#333

Now repeat it for Salesforce (a connected app with its own scopes and instance URLs), HubSpot (its own refresh-token rules) and Zendesk (OAuth or API token, depending on the account). Each has edge cases the documentation does not mention.

This is the token refresh code that shows up in conference talks:

async function getUsableAccessToken(connection: Connection) {
  if (connection.expiresAt < Date.now() + 30_000) {
    const refreshed = await refreshVendorToken(connection.refreshToken)
 
    if (refreshed.error === 'invalid_grant') {
      await markNeedsReauth(connection.id)
      throw new Error('Reauth required')
    }
 
    await saveConnectionTokens(connection.id, refreshed)
    return refreshed.accessToken
  }
 
  return connection.accessToken
}

The talk skips the rest: encrypted storage, a lock so two requests do not refresh the same token at once, retry jitter, vendor-specific refresh parameters, audit logs, consent changes, and the screen that gets a customer reconnected without a support call. Our post on OAuth at scale covers each of these.

Danger

Good auth does not fix bad trust boundaries. A prompt injection in one tool's output can steer the agent to send data out through another tool. Give each server only the access it needs.

When to build your own MCP server

Build it yourself in two cases:

  • The MCP server exposes your own product. You own the API and the auth, so a platform adds nothing. This is the most common good reason to build.
  • The system is internal or proprietary, with no public API for a platform to support.

For the other cases teams list, weigh what building means:

  • Custom control over how the agent uses an app does not need a custom server. On Truto, your coding agent adds any app as config, and each connected account's MCP server is scoped by method and tag.
  • Strict deployment needs rule out a shared cloud. Truto Enterprise offers a single-tenant deployment in a pinned region.
  • One or two integrations carry the same OAuth, refresh, rate-limit and API-change work per integration as fifty.

If you build, start narrow: a few well-described tools, read-only first, one auth method, and logs on every tool call from day one. Our guide to generating MCP servers for your SaaS users covers the architecture.

When to use a platform

Use a managed MCP platform when these are true:

  • Your customers connect their own SaaS accounts, and each account needs its own OAuth, refresh and isolation.
  • You need five or more apps, and product or sales will ask for more.
  • OAuth upkeep already takes engineering time that you would rather spend on the agent.
  • You want to ship the AI feature in weeks, not after a quarter of integration work.

A platform has trade-offs too. Check these before you choose one:

  • Coverage gaps. A vendor ships a new endpoint and you wait for the platform, unless it lets you call any endpoint of the app directly.
  • Uptime. Your agent's tool calls now depend on the platform's availability.
  • Data path. Customer data passes through the platform. Ask what it stores, for how long, and what its security reports say.
  • Lock-in. Ask about revoking access, exporting connections, logs, and pricing under agent load.
Tip

When you compare platforms, count auth surfaces, not integrations. One Google Workspace integration can mean OAuth consent, refresh, scope changes, admin approval, webhooks, rate limits and domain-specific edge cases.

For a side-by-side view of the main options, see the best MCP server platforms for enterprise AI agents.

How Truto creates an MCP server per connected account

Truto treats an MCP server as configuration on top of an integration layer, not as a service you write for each app. Your customer connects their app once through Truto. You then create an MCP server for that connected account with one API call:

curl -X POST "https://api.truto.one/integrated-account/$ACCOUNT_ID/mcp" \
  -H "Authorization: Bearer $TRUTO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support agent (read and create)",
    "config": {
      "methods": ["read", "create"],
      "tags": ["support"]
    },
    "expires_at": "2027-01-31T00:00:00Z"
  }'

The response holds the server URL. Paste it into Claude, ChatGPT, Cursor or any MCP client, or give it to your own agent as a remote MCP endpoint.

  • One account per server. The agent sees that account's tools only: no other accounts and no other tenants.
  • Scope. config.methods takes method names (list, get, create...) or groups (read, write, custom). config.tags limits tools to tagged resources. A tool must match both.
  • Expiry. expires_at ends access at a set time, so a short task gets short-lived access.
  • Secret handling. The URL holds a secret token. Truto returns it once and stores only a hash. For extra protection, config.require_api_token_auth also requires a Truto API token on every request.
  • Tools from documentation. Each documented API method of the app becomes a tool with a JSON schema. A method with no description does not become a tool, so the agent does not see half-described endpoints.
  • Live calls. Tool calls run against the customer's account through the same request pipeline as every other Truto integration. That pipeline handles auth refresh, pagination and rate limits, with no app-specific handler code.

One trade-off to know: MCP tools return each vendor's own response format, not a normalized schema. If you need the same fields across CRMs, use Truto's unified API next to the MCP server. More detail is on the Truto MCP page and in our note on why the zero-code architecture matters.

For a worked example with one app, see connecting AI agents to Plaid. It covers tokens, rate limits and how to summarize large transaction lists.

Questions to ask before you decide

  • Whose data does the agent touch? Your own product's data points to building. Your customers' SaaS accounts point to a platform.
  • How many apps in the next 12 months? Count the ones sales has already promised.
  • How many of them use OAuth? Each one adds a token store, refresh, re-auth and consent work, for every customer.
  • What happens when a refresh token dies? Name the screen, the alert and the owner.
  • Can you cut off one customer at once, and audit every tool call per account?
  • How do you stop a prompt injection in one tool from moving data out through another?

If most answers point to "customers' apps, many of them, mostly OAuth", use a platform for those apps and keep your engineers on the agent itself. Build the MCP server for your own product.

FAQ

Should I build my own MCP server or use a platform?
Build your own MCP server for your own product's data and for internal systems. For your customers' third-party SaaS apps, such as Salesforce, Jira and HubSpot, use a platform. The server code is small. The cost is per-customer OAuth, token refresh, rate limits and vendor API changes, and it grows with every app and every customer you add.
Why is OAuth the hardest part of a custom MCP server?
Remote MCP auth has two hops: from the MCP client to your MCP server, and from your MCP server to the SaaS API. The MCP specification makes your server an OAuth 2.1 resource server and forbids passing the client's token through, so your server is also an OAuth client of every vendor, with a separate token for each customer. Astrix Security reviewed over 5,200 open-source MCP servers and found that only 8.5% use OAuth, while 53% rely on long-lived static secrets.
When should I build my own MCP server?
Build your own MCP server when it exposes your own product, or when it connects to an internal system with no public API. When your agents act in your customers' SaaS accounts, buy. Truto gives each connected account its own MCP server, scoped by method and tag, with an expiry; connections are free and each request a tool call sends to the app costs $5 per 100,000. Building your own means your team owns OAuth, token refresh, rate limits and every upstream API change.
What is a managed MCP platform?
A managed MCP platform is a hosted service that gives AI agents access to third-party SaaS APIs through MCP server endpoints. The platform handles each customer's authentication and token refresh, generates the tools, and deals with pagination, rate limits and vendor errors, so your team works on the product instead of the integration layer.
How does Truto create MCP servers for SaaS apps?
Truto creates an MCP server for a connected account with one API call. The response holds a URL with a secret token, and Truto stores only a hash of it. You can limit the server to some methods and tagged resources and set an expiry time. Each documented API method of the app becomes a tool, and tool calls run live against the customer's account.

Blog

More from our Blog

AI & Agents

Best MCP Server for Slack in 2026

Compare the top Slack MCP servers for AI agents in 2026: open-source options vs. Truto's managed MCP with full API coverage, managed OAuth, and enterprise security.

Uday Gajavalli 15 min read

AI & Agents

Best MCP Server for Attio in 2026

Compare the best MCP servers for Attio CRM in 2026. Open-source vs. Attio's hosted MCP vs. Truto's managed server — with setup guides for Claude, ChatGPT, and custom agents.

Uday Gajavalli 12 min read

Start free today. Pay only for the calls you make.

Connections are free. 25,000 calls a month on the Free plan, no card.