Skip to content
Index / Guides / MCP & ChatGPT apps / How to build an MCP server for your SaaS product

MCP & ChatGPT apps guide

How to build an MCP server for your SaaS product

Updated 2026-10-26

Short answer: Wrap the API you already have. Pick 5 to 8 read-only tools that answer real customer questions, serve them over Streamable HTTP with OAuth for multi-user use (or stdio with an API key for a local pilot), test in Claude and ChatGPT, then add carefully scoped writes.

1. Pick tools from real questions, not endpoints

Look at support tickets and sales calls. "Which invoices are overdue?" is a tool. GET /v2/invoices with 14 filters is not. Most good servers expose far fewer tools than the API has endpoints, and combine calls where a user would.

2. Choose a transport

3. A minimal TypeScript server

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";

const server = new McpServer({ name: "acme", version: "0.1.0" });

server.registerTool("list_invoices", {
  description: "List the signed-in user's invoices, newest first.",
  inputSchema: { status: z.enum(["open", "paid", "void"]).optional(), limit: z.number().max(50).default(20) },
  annotations: { readOnlyHint: true },
}, async ({ status, limit }) => {
  const r = await fetch(`https://api.acme.com/v1/invoices?limit=${limit}${status ? "&status=" + status : ""}`,
    { headers: { Authorization: `Bearer ${process.env.ACME_API_KEY}` } });
  if (!r.ok) return { isError: true, content: [{ type: "text", text: `Acme API error ${r.status}` }] };
  return { content: [{ type: "text", text: JSON.stringify(await r.json()) }] };
});

await server.connect(new StdioServerTransport());

4. Make results model-friendly

5. Test the way customers will use it

6. Ship

Cofounderbase build service

Get a free 2-minute demo of your product in Claude

Besides running this directory, our team builds MCP servers and ChatGPT apps for small SaaS. Send your product URL and we'll record a short video of it working inside Claude, built only from your public API docs. Free, no call needed. Pilots start at $1,500. This service is separate from the agency rankings, which it never affects.

Prefer email? Write to us. Want an outside agency instead? See agencies that do MCP work.

Agencies in our index that mention MCP work

Listed in their normal directory order. Our own build service is not part of this list or the rankings.

Questions

Do I need to rewrite my API?

No. An MCP server is a thin layer over your existing API. Most of the work is choosing and describing tools, auth, and testing.

Should I generate it from my OpenAPI spec?

Generation is a good starting point for a prototype, but one tool per endpoint usually confuses the model. Curate the list afterwards.

How long does a first version take?

A read-only pilot over a clean public API is commonly 1 to 2 weeks of focused work. That is an estimate, not a quote.

More MCP guides

Cost and effort figures on this page are rough estimates, not quotes.

CompareOpen shortlist