Decide what each user gets
The MCP server asks two of your features about every request, and reads their outcomes by a fixed convention, the way your page reads a paywall feature. You build both in Revenue › Decision Engine › Features, with the same builder as any feature. See Create and edit a feature.
How the server reads the two features
Section titled “How the server reads the two features”mcp_access: may this user use the server
Section titled “mcp_access: may this user use the server”Asked once per tool call, about the user alone. It never sees a content item.
mcp_access returns |
The tool call |
|---|---|
An outcome whose decision is allow |
Runs |
| Anything else, or no answer at all | Is refused: You do not have access to this server. |
mcp_content: how much of this item
Section titled “mcp_content: how much of this item”Asked once for each content item a tool is about to return. The outcome’s id decides:
mcp_content returns |
The item |
|---|---|
An outcome with the decision deny |
Dropped, whatever the id |
An outcome whose reason is error |
Dropped |
| No outcome | Dropped |
Id full |
Reveals the whole text |
Id excerpt |
Reveals the item’s lead only |
| Any other id | Reveals metadata: the headline, the URL and the item’s details, no text |
A dropped item is left out of search results, and fetch answers No content item with that id. as if it did not
exist. What each reveal returns from each tool is on Search and read.
The paywall features your pages ask for do not apply here. If your users should get on the server what they get on
your site, have mcp_content’s rules match your paywall’s.
What a rule can read on this server
Section titled “What a rule can read on this server”A request to the MCP server always has a signed-in user and a site. It has no page, no device and no browser. So a rule here can read:
- the user and their standing:
user.*,user_site.*, andgrants.*; site.id;- meters, segments and per-user experiments;
profile.*andstreaming.*, as on your pages;- in
mcp_contentonly, theitem.*facts below.
These read differently from a page:
| Facts | On the MCP server |
|---|---|
user.state |
Never anonymous: every caller is signed in |
device.token |
Empty |
request.* |
request.geo is empty, and request.new_device and request.preview are false |
gift_link.* |
No gift link: gift_link.present is false |
context.* |
None: there is no page to send them |
external.* |
Empty on every site. A deploy is refused while mcp_access or mcp_content reads it |
db_user_traits.*, bot.* |
Cannot be read. A rule that tests one is unreadable |
item.* in mcp_access |
Cannot be read: the call is not about an item yet |
signed.*, content.* |
Never: stage refuses a rule that names a content fact your site signs, in any feature |
An unreadable rule does not hold. If no rule wins and one was unreadable, the canvas returns its error outcome, which drops the item or refuses the call. See What a rule can read.
Item facts
Section titled “Item facts”Each item.* fact describes the content item being decided, as EdgeKit holds it from your CMS:
| Fact | Type | Value |
|---|---|---|
item.source_id |
string | The item’s id in your CMS |
item.source |
string | The source key of the item’s content source |
item.ref |
string | The source key and the CMS id, <source key>:<id>: one item across all your content sources |
item.sections |
list of strings | The ids of the item’s sections, as your CMS gives them |
item.tags |
list of strings | The ids of the item’s tags |
item.authors |
list of strings | The ids of the item’s authors: your CMS’s id, or, for a byline without one, an id made from the name. A pushed source’s ids carry the CMS in front, such as glide:12 |
item.content_type |
string | Your CMS’s type for the item, verbatim. Arc XP: the story’s type, such as story. WordPress: the post type, such as post |
item.content_subtype |
string | Your CMS’s subtype, verbatim. No value when it has none |
item.published_at |
number | When it was first published, else its display date, in milliseconds since 1 January 1970 UTC |
item.language |
string | A BCP 47 tag such as en-GB: your CMS’s, else the content source’s default language |
The lists hold ids, never names, so a rule keeps working when a section is renamed. An author’s id is the last part
of its address in Content › Content › Authors. Section and tag ids come from your CMS; the item’s
screen in Content › Content › Items shows their names. item.published_at is a number so a rule can
compare it: item.published_at is under 1767225600000 holds for an item first published before 2026.
item.* is an EdgeKit fact computed from the stored copy of your CMS content. It is not a content fact your site
signs, and no rule here reads those.
Name the site by its id
Section titled “Name the site by its id”No condition means “the site this request is for”. A rule that checks access to the current site writes that site’s
id, which is the last part of its address in Delivery › Delivery › Sites, such as site_example. Write
both tests in the same rule:
site.idissite_example;grants.site_idsincludessite_example.
A feature that runs on several sites needs one such rule per site. Without the site.id test, a user with a
grant on one site would get full text on every site’s server.
Meters on this server
Section titled “Meters on this server”A meter counts on the MCP server as it does on a page, with these differences:
fetchcounts,searchnever does.searchreads the count to decide each item but changes nothing, so listing results uses up nothing.fetchcounts when its winning rule has Count a read if this rule wins, as a page read does.- Every count is the user’s. The caller is always signed in, so a
devicemeter counts on the user too, as for a signed-in user on a page. See Whose count. - A
seen-setneeds a key this server has. Anmcp_contentrule may count on aseen-setkeyed on anitem.*,user.*,user_site.*orsite.*fact. Keyed onitem.ref, it counts each item once per period;item.source_idalone counts two content sources’ items with the same CMS id as one. Keyed on any of the others, it counts one read at most, since the key never changes here. The meter screen keys aseen-setonly on a signed fact, which stage refuses here. Declare anmcp_contentseen-setkeyed onitem.refin a config tree. - A
countmeter counts every fetch. Fetching the same item twice counts twice. - No gift link.
mcp_contentmay not count on agift_linkmeter. - A reveal is never given without its count. If the count cannot be taken, for example because another fetch used the last free read at the same moment, the item is decided again on the new count. If the new answer would still count, the item is dropped.
Stage refuses a draft that breaks these rules, with one of these messages:
| Message | Cause |
|---|---|
meter "<name>" is a seen-set keyed on "<field>", which this feature never has, so this tick could never be charged. Only mcp_content has item.*, and it has no page or device: give it its own seen-set keyed on item.ref. |
An mcp_content rule counts on a seen-set keyed outside item.*, user.*, user_site.* and site.*, such as signed.article_id. Or another feature counts on a seen-set keyed on item.* |
meter "<name>" counts per gift link, and mcp_content never has one, so this tick could never be charged. |
An mcp_content rule counts on a gift_link meter |
By default, a user who holds a live grant on any of your sites counts on no meter, here as on your pages. See How a meter counts.
A worked example
Section titled “A worked example”Every signed-in user may use the server. A user whose grants reach the site gets full text, and everyone else gets
the excerpt. The site’s id is site_example, and both features run on it alone.
mcp_access
- Canvas
signed-in, entered whenuser.stateis one ofregistered,paid, which holds for every caller here. No rules.- else: id
allow, Opens the article, reasonmatch. - on error: id
deny, Stops them, reasonerror.
- else: id
- Fallback: id
deny, Stops them, reasondefault. On error: the same as the canvas’s.
mcp_content
- Canvas
items, entered by Everyone:- Rule
grant-site_example:site.idissite_example, andgrants.site_idsincludessite_example. Returns idfull, Opens the article, reasongrant. - else: id
excerpt, Opens the article, reasondefault. - on error: id
deny, Stops them, reasonerror.
- Rule
- Fallback: id
excerpt. On error: iddeny, reasonerror.
A user with no grant on the site sees excerpts in search, with full_available false, and gets the excerpt from
fetch. A user whose grant reaches the site sees the same excerpts in search with full_available true, and gets
the whole text from fetch.
Add free reads
Section titled “Add free reads”To give users without a grant five full items in any 30 days, declare a count meter mcp-reads that counts user
on site_example (see Set up a meter), then add two rules to mcp_content below
grant-site_example:
- Rule
paid-elsewhere:user.stateispaid. Returns idexcerpt, Opens the article, reasonupgrade. - Rule
free-read:mcp-readsis under 5, in the last 30 days, Count a read if this rule wins. Returns idfull, Opens the article, reasonmeter.
paid-elsewhere catches users whose grants are all for other sites. They count on no meter, so without that rule
free-read would give them full text with no limit.
While a user has fewer than 5 reads counted, search shows full_available true and counts nothing. Each fetch
that returns full text counts one, including a second fetch of the same item. Once 5 are counted, fetch returns the
excerpt and search shows full_available false.
Two sites
Section titled “Two sites”For site_a and site_b, run both features on both sites, and give mcp_content one rule per site:
- Rule
grant-site_a:site.idissite_a, andgrants.site_idsincludessite_a. Returnsfull. - Rule
grant-site_b:site.idissite_b, andgrants.site_idsincludessite_b. Returnsfull.
Experiments
Section titled “Experiments”A rule may read an experiment arm. A per-user experiment assigns the user the same arm as on your pages. A per-device experiment assigns no arm here, because there is no device. The MCP server reports no exposures. See Experiments.