API and MCP
A full news website, from one prompt
Connect Claude Code to News Factory over MCP, ask for a news site in one sentence, and it builds one from your own stories: images, key points, tags, an RSS feed and a sitemap. The site keeps itself up to date, and the same key opens the REST API for anything else you build.
- One command to connect
- Read-only key, one topic
- Claude Code, Codex or any MCP client
How it works
Your stories, open to your agents
News Factory finds the news in your topic and writes the stories. The API and the MCP server let other software use them: your own code calls the REST API, and an AI agent like Claude Code connects to the MCP server, where every API endpoint becomes a tool it can call.
Both take the same API key, and the key decides what they can do. Over MCP, an agent only sees the tools its key allows, and every call runs the same checks as the REST API.
Step by step
From an empty folder to a live site
The four steps from the video, with the commands to copy. Each card jumps to its moment in the video.
- A News Factory topic that publishes stories
- An API key (Pro, Business or Enterprise)
- Claude Code, or Codex
Create an API key
In News Factory, open Organization settings, then API keys, and create a key. Name it, keep it read only and pick your topic. The key is shown only once, so save it to .env.local in an empty folder.
NEWS_FACTORY_API_KEY=<your key>Connect Claude Code over MCP
One command adds the News Factory MCP server to Claude Code, with the key as a bearer token. claude mcp list confirms it's connected. Using Codex? Same server, one command.
source .env.local claude mcp add --transport http news-factory \ https://client-api.news-factory.app/mcp \ --header "Authorization: Bearer $NEWS_FACTORY_API_KEY" claude mcp listcodex mcp add news-factory \ --url https://client-api.news-factory.app/mcp \ --bearer-token-env-var NEWS_FACTORY_API_KEYAsk for the site
In plain words, with your topic's name. Claude Code checks the key, the topic and a real story over MCP, makes a plan, writes the code, runs the build, fixes what breaks and checks every page against your real stories.
Build me a news website that feeds from my News Factory topic Peptides.Deploy to Vercel
Add the key to Vercel as an environment variable and deploy. In the video, the site is online 42 seconds later.
vercel env add NEWS_FACTORY_API_KEY production vercel deploy --prod
What it built
A real news site, from your own stories
All of it came from one sentence. The site reads straight from the News Factory API and refreshes every minute, so when News Factory publishes a new story, it shows up on the site. No code, no redeploy.
Home page
The latest stories, with their images.
A page for every story
Headline, summary, hero image, key points, the full article, an FAQ, tags and related stories.
Tag pages
Stories grouped together by tag.
RSS feed and sitemap
Ready for readers and search engines.
Built by Claude Code in a real run of 11 minutes 43 seconds, then deployed to Vercel.
Not only websites
The same key, for anything you build
The REST API takes the same key. Everything News Factory does with stories, content sources, RSS feeds and workflows is there, documented for people and for AI agents.
Step-by-step recipes in the reference
- Write a story from a web article
- Check it and improve it
- Translate it
- Pick relevant news from followed feeds
- Run a workflow and wait for it
curl https://client-api.news-factory.app/v1/me \
-H "Authorization: Bearer $NEWS_FACTORY_API_KEY"Start every integration with GET /v1/me: it tells you the organization, the key's scopes and the Topic Workspaces it can use.
You stay in control
Your agent gets only what you allow
Read only, one topic
Each key gets only the scopes it needs, like read only, and can be limited to one Topic Workspace. Over MCP, the agent only sees the tools those scopes allow.
Shown once, revoked in a minute
A key is shown once and stored only as a hash. Give it an expiry date, or revoke it whenever you like: it stops working within a minute.
Kept out of the code
In the video, the key lives in .env.local on your computer and in an environment variable on Vercel, never in the code the agent writes.
Questions
The API and MCP, answered
What is the News Factory MCP server?
It's how AI agents use News Factory. Connect Claude Code, Codex, Cursor or any MCP client to https://client-api.news-factory.app/mcp with an API key, and every News Factory API endpoint becomes a tool the agent can call, limited to what the key's scopes allow.
Which plans include the API and MCP?
The Pro, Business and Enterprise plans.
Do I need to write code?
Not for the website in the video: Claude Code wrote all of it from one sentence. You create a key, run one command to connect it, and deploy. To build your own integration, the REST API has a public reference, an OpenAPI 3.1 specification and llms.txt files for AI agents.
Is it safe to give my API key to an AI agent?
Give it a key with only the access it needs. For a website, a read-only key limited to one Topic Workspace is enough. Keys are shown once, stored only as a hash, can have an expiry date and stop working within a minute of being revoked.
Who can create API keys?
An organization admin, in the app under Organization settings, API keys. An organization can hold several keys, each with only the access one integration needs.
How does the site stay up to date?
The site in the video reads straight from the News Factory API and refreshes every minute. When News Factory publishes a new story in your topic, it appears on the site, with no code changes and no redeploy.
Can I use the API without MCP?
Yes. The REST API takes the same key. Start with GET /v1/me, then follow the recipes in the reference: write a story from a web article, check and improve it, translate it, pick relevant news from followed feeds, or run a workflow and wait for it.
Give your agent your newsroom
The API and MCP server come with the Pro, Business and Enterprise plans. Create a key, connect your agent and ask for what you need.
