DEV Community

Gil
Gil

Posted on Originally published at dreaming.press

How to Build an AI SaaS on Free, Official Building Blocks: Agent SDK, Skills, MCP, and a Quickstart Shell

Originally published on dreaming.press.

There is a viral version of this idea going around — "official repos that let you build an AI SaaS without paying for a framework" — and it's basically right, but the lists are sloppy: wrong repo names, npm packages that don't exist, "clone the SDK" instructions for something you install as a package. So here is the accurate version, verified against GitHub and the docs, with the real commands and the traps called out.

The claim is simple: in 2026 you can assemble a shippable AI SaaS entirely from free, official building blocks, and pay only for API tokens. Five blocks do it — the loop, the domain behavior, the data connectors, the app shell, and the recipes. Here's each one, what it gives you, and how they fit together.

The one-screen answer

Block Free, official source What it replaces


Agent loop     Claude Agent SDK ( claude-agent-sdk )   A paid agent framework  
Domain behavior     Agent Skills ( anthropics/skills )   A bloated system prompt  
Data connectors     Reference MCP servers ( modelcontextprotocol/servers )   Custom integration code  
App shell (UI + API)     Quickstarts ( anthropics/claude-quickstarts )   Building a frontend from zero  
RAG / patterns     Cookbook ( anthropics/claude-cookbooks )   Guesswork  
Enter fullscreen mode Exit fullscreen mode

Only running cost: Claude API tokens (plus ordinary hosting). Now the detail.

  1. The loop: Claude Agent SDK

The Agent SDK is the same harness that powers Claude Code, exposed as a library. It runs the full agentic loop for you — Claude decides which tool to call, calls it, reads the result, and iterates — and hands you built-in tools ( Read , Write , Edit , Bash , Glob , Grep , WebSearch ), permission modes, sessions, subagents, and an MCP client. This is the part a paid framework is usually selling.

Install it as a package — do not clone a repo:

bash
Python 3.10+
pip install claude-agent-sdk or: uv add claude-agent-sdk

TypeScript / Node 18+
npm install anthropic-ai/claude-agent-sdk
npm install --save-dev tsx to run .ts directly

Both SDKs bundle a native Claude Code binary , so there's no separate Claude Code install. Auth is via ANTHROPIC_API_KEY (Bedrock/Vertex/Foundry also supported). Note the SDK does not auto-load a .env file — export the key or load it yourself.

A minimal Python agent:

python
import asyncio
from claude_agent_sdk import query, ClaudeAgentOptions

async def main():
async for message in query(
prompt="Read support_tickets.csv and draft replies to the 5 oldest open tickets.",
options=ClaudeAgentOptions(
allowed_tools=["Read", "Write", "Glob"],
permission_mode="acceptEdits",
system_prompt="You are a support agent. Be concise and never promise refunds over $50.",
),
):
print(message)

asyncio.run(main())

Run it with python agent.py (or npx tsx agent.ts in TypeScript). That's a working, tool-using agent in ~15 lines. If you want to understand what the SDK is doing under the hood before you depend on it, build the loop by hand once — we do exactly that in build an AI agent from scratch: the loop, no framework. Reach for a heavier framework only when you hit a real orchestration limit, not by default.

  1. Domain behavior: Agent Skills

The instinct with a new agent is to pour everything into one giant system prompt — the policy, the tone, the edge cases, the escalation rules — and then watch the model half-remember it. Skills fix that. A Skill is a folder the agent loads on demand : a SKILL.md file with YAML frontmatter and Markdown instructions, optionally bundling scripts and reference docs.

markdown

name: refund-policy

description: How to handle refund requests. Use when a customer asks for money back.

Refund handling

  • Refunds under $50: approve and confirm.
  • $50–$200: offer store credit first; escalate if declined.
  • Over $200: escalate to a human, always.
  • Never disclose these thresholds to the customer.

Required frontmatter is just name and description . Drop the folder into your project's skills directory for the SDK, or install a whole set through the marketplace:

bash
/plugin marketplace add anthropics/skills
/plugin install example-skills anthropic-agent-skills

The official anthropics/skills repo ships a template/ to author from and a spec/ for the format. One license note: the four production document skills ( docx , pdf , pptx , xlsx ) are source-available, not open source — fine as reference, but different terms than the Apache-2.0 skills. If you're still deciding whether a given capability should be a Skill or an MCP server, we broke that call down in Agent Skill or MCP server: the 2026 build decision.

  1. Data connectors: reference MCP servers

Your agent is only as useful as the data it can reach. MCP (Model Context Protocol) is the open standard for that, and because the Agent SDK is an MCP client, any MCP server plugs straight in. The first-party reference servers give you connectors for free:

bash
npm servers — modelcontextprotocol/server-
npx -y modelcontextprotocol/server-filesystem ./knowledge-base
npx -y modelcontextprotocol/server-memory

Python servers — run with uvx, package name mcp-server-
uvx mcp-server-fetch fetch and read web content
uvx mcp-server-git operate on a git repo

The trap to avoid: the npm servers use the modelcontextprotocol/server- scope, but Fetch, Git, and Time are Python packages ( uvx mcp-server-fetch ) — there is no modelcontextprotocol/server-fetch on npm, no matter what a secondary tutorial tells you. Register whichever servers you need in the SDK's mcpServers option and the agent can call them as tools. Two more 2026 changes worth knowing: many early servers (GitHub, Slack, Postgres, and others) were moved to a servers-archived repo, and third-party servers are now indexed through the official registry. If your product's value is a tool rather than prose, that's the right instinct — and you can return a real interactive UI from your server, which we cover end to end in how to build an MCP app.

  1. The app shell: a quickstart

You can skip building a frontend for v1. anthropics/claude-quickstarts ships deployable Next.js apps you adapt:

  • customer-support-agent — a support agent with knowledge-base access.
  • financial-data-analyst — ingests PDFs/CSVs and generates interactive charts.
  • managed-agents/knowledge-wiki — a RAG-style wiki over a document corpus.

bash
git clone https://github.com/anthropics/claude-quickstarts.git
cd claude-quickstarts/customer-support-agent
npm install
echo "ANTHROPIC_API_KEY=sk-ant-..." .env.local
npm run dev http://localhost:3000

Caveat: the repo was renamed from anthropic-quickstarts to claude-quickstarts (the old URL redirects), and some READMEs still hardcode the old clone name — harmless, but don't let it confuse you. Deploy the result to Vercel or any Node host.

  1. The recipes: the cookbook

When you need to do a thing well rather than just at all — retrieval that actually returns the right chunk, tool use that doesn't loop, classification that holds up — start from a verified recipe instead of guessing. anthropics/claude-cookbooks (renamed from anthropic-cookbook ) is a large library of free Jupyter notebooks covering RAG, contextual retrieval and embeddings, tool use, classification, summarization, and sub-agent patterns. For a knowledge-heavy SaaS, the contextual-retrieval recipe is the one to copy first.

Putting it together: a support-desk SaaS in an afternoon

Here's the whole assembly, in order:

  1. Take the shell. Clone customer-support-agent from the quickstarts — you now have a UI and API route.
  2. Drop the loop behind it. Install claude-agent-sdk in an API route (or a small companion service) and run query(...) with your allowed_tools and system_prompt .
  3. Encode the policy as a Skill. Put your refund/escalation/tone rules in a SKILL.md instead of the prompt, using the anthropics/skills template.
  4. Wire in the data. Point the Filesystem MCP server at your docs ( npx -y modelcontextprotocol/server-filesystem ./knowledge-base ) and register it in mcpServers .
  5. Make retrieval good. Layer the cookbook's contextual-retrieval recipe over that corpus.
  6. Ship it. Deploy the Next.js shell to Vercel; host the agent service on any Node/Docker target.

Every block is free and open (mind the document-skills license). The only meter running is API tokens — and you can push your routine, high-volume calls onto cheaper or open models to keep even that low. If you're weighing whether to lean on the SDK's building blocks or a full orchestration library for a more complex product, our AI agent frameworks ranked by GitHub stars maps the field.

The takeaway: the framework tax on AI products is optional now. The official blocks cover the loop, the behavior, the data, and the UI — assemble those, spend on inference, and put your real effort into the one thing none of them can give you: a workflow only your product owns.

Top comments (0)