Turn on a site's MCP server
A site’s MCP server answers once your newest deployment holds everything it needs. The server has no on/off switch:
you meet the conditions below, deploy, and the server answers at https://<tenant>.edgekit.ai/mcp.
Before you start
Section titled “Before you start”- Content items on the site. A content source must be syncing your CMS, and an item is on a site only when your CMS places it there. See Content sources and Arc XP.
- AI Answers. EdgeKit sets an embedding model, and optionally a rerank model, for your organization. You can read them in Content › Configuration › AI Answers. They reach the server at your next deploy. Once anything has been embedded, changing the embedding model needs a re-embed, which EdgeKit does for you, except for a content API source, whose items you push again. See AI Answers.
- Your archive embedded. Search finds only items embedded with the deployed embedding model. Each sync embeds a
published item when its text changes; drafts are never embedded. Items synced before the models were deployed are
embedded only when they sync again:
- Arc XP or WordPress: select Start full sync on the source’s page in Content › Configuration › Sources, or ask EdgeKit.
- Content API: push the items again. EdgeKit never reads a pushed source. See Re-push to reconcile.
- A way for users to sign in. The site’s id mode decides which, and EdgeKit sets it. See
Choose who signs users in.
edgekit_only, ordualwith EdgeKit sign-in turned on for the site: users sign in with an emailed code.external_only, ordualwith EdgeKit sign-in off: users sign in through your own login, which needs your identity provider connected through a token your login signs or a session endpoint EdgeKit asks. See Sign-in through your own login.
- An active, deployed site. See Site settings.
- Optional: your own sender. Where users sign in with an emailed code, the code goes out under your organization’s transactional mail settings, like your site’s own sign-in emails. See Transactional email.
The site’s Name titles the sign-in and consent pages and the assistant’s tools, so check that it reads well.
1. Decide what each user gets
Section titled “1. Decide what each user gets”Work out who may use the server and how much of each item they get. The server reads both answers from outcome ids, so the convention is fixed:
| Feature | Asked | Its outcome |
|---|---|---|
mcp_access |
Once per tool call | Opens the article lets the call run. Anything else refuses it |
mcp_content |
Once per content item | Id full, excerpt or metadata with Opens the article is that reveal. Stops them drops the item |
See Decide what each user gets for what a rule can read, how meters count, and a worked example.
2. Create the outcomes
Section titled “2. Create the outcomes”In Revenue › Decision Engine › Outcomes, create the outcomes the two features return. See Create an outcome. The names are yours; what the server reads is each outcome’s Returns and Decision:
| For | Returns | Decision |
|---|---|---|
mcp_access |
any id | Opens the article |
mcp_access |
any id | Stops them |
mcp_content |
full |
Opens the article |
mcp_content |
excerpt |
Opens the article |
mcp_content |
metadata |
Opens the article |
mcp_content |
any id | Stops them |
metadata is optional: create it only if some users should get the headline and link alone. Open each new outcome
and select Include in deploy.
3. Create the two features
Section titled “3. Create the two features”In Revenue › Decision Engine › Features, select New feature twice, with the Name mcp_access and then
mcp_content, exactly as written. See Create and edit a feature. For each:
- Purpose:
decision. Only adecisionfeature may count on a meter. - Sites: the sites whose server should answer. A feature with no sites picked runs on every site, so every site that meets the other conditions gets a server.
- Fallback and On error: for
mcp_access, the outcome that stops them in both. Formcp_content, the reveal for everyone your rules do not name, and the outcome that stops them on error. - Canvases and rules: who gets what. See A worked example.
Save each feature, then select Include in deploy on it. Owner, Admin and Developer can create features.
4. Stage and deploy
Section titled “4. Stage and deploy”Stage and deploy in Delivery › Deployments › Versions. See
Stage and deploy a change. Stage refuses an mcp_content rule that counts on
a meter this server cannot charge; see Meters on this server.
5. Check that the server answers
Section titled “5. Check that the server answers”Without a token, the server answers 401 and points the caller at its sign-in:
curl -i https://<tenant>.edgekit.ai/mcpHTTP/2 401www-authenticate: Bearer resource_metadata="https://<tenant>.edgekit.ai/.well-known/oauth-protected-resource/mcp"The document it points at names the server and its authorization server:
const response = await fetch( 'https://<tenant>.edgekit.ai/.well-known/oauth-protected-resource/mcp',);const metadata = await response.json();
console.log(response.status); // 200 once the server is on, 404 until thenconsole.log(metadata.resource); // 'https://<tenant>.edgekit.ai/mcp'console.log(metadata.authorization_servers); // ['https://<tenant>.edgekit.ai/mcp/auth']A 404 with {"error":"not_found"} means one of the conditions does not hold yet. See
The server answers 404.
6. Hand out the URL
Section titled “6. Hand out the URL”Give your users the server’s URL and a link to Connect an AI assistant, which is written for them. Opened in a browser, the URL itself shows a page with the site’s name, a button that copies the URL, and the steps for Claude, ChatGPT and Perplexity. Each site has its own URL, and a user signs in and allows the assistant once on each site’s server.
Sign in once yourself with a test account and run a search. The results show what your rules give a user like that.
Sign-in through your own login
Section titled “Sign-in through your own login”Where your own login signs users in for the site, it is the only way into the MCP server: the emailed code is off there, as it is on your site. Any method your login offers, such as Apple or Google, works for the MCP server too.
When the assistant opens the sign-in page, the page reads your login’s cookie and checks it with your login, once. The first time EdgeKit sees the person, it finds or creates their user as it does on your site. See From credential to user. The user then allows the assistant. Your login is not checked again on tool calls, and the sign-in page never changes or removes your login’s cookie.
What your login needs
Section titled “What your login needs”Give EdgeKit, beside your identity provider settings:
- Your login page’s URL. A user with no valid login is sent there once. It must be an absolute
httpsURL, and it may carry a query string of its own. Without one, that user gets an error page instead. - Your login’s cookie names, with a session endpoint too. The sign-in page checks your login only when the browser sends one of these cookies.
Your login’s cookie must reach the server’s host. For https://edgekit.example.com/mcp, your login sets its cookie
on example.com, so the browser sends it to edgekit.example.com too.
The return URL your login must allow
Section titled “The return URL your login must allow”EdgeKit sends a user who is not logged in to your login page with one query parameter added, return_to. Its value
is the server’s sign-in page, carrying the sign-in request’s own parameters. After a successful login, or a new
account, your login sends the browser back to that URL.
The sign-in page is the server’s URL followed by /sign-in. Allow it at your login as a return URL, with any query
string after it, once for each server URL you give out:
| Server URL | Return URL to allow |
|---|---|
https://edgekit.example.com/mcp |
https://edgekit.example.com/mcp/sign-in |
https://www.example.com/edgekit/mcp |
https://www.example.com/edgekit/mcp/sign-in |
https://www.example.com/mcp |
https://www.example.com/mcp/sign-in |
The second row applies only on an EdgeKit managed install that
mounts /edgekit/ on your site’s hosts. The third applies where EdgeKit also serves the server at a path of your
own on those hosts, /mcp here: ask for one at setup. It is a separate server URL with its own tokens, and EdgeKit
routes that path and everything under it, so nothing else of yours may live there. Hand the URL out exactly as
it is: with a query string after it (?utm_source=…) the request reaches your site, not the server.
With a login page at https://login.example.com/sign-in, a user who is not logged in is sent to a URL like this one:
https://login.example.com/sign-in?return_to=https%3A%2F%2Fedgekit.example.com%2Fmcp%2Fsign-in%3Fresponse_type%3Dcode%26...A user who comes back still without a valid login gets an error page, never a second trip. The user has 30 minutes from the moment the assistant opens the sign-in page to select Allow, enough to create an account or confirm an email address at your login. What each page says, and why: see A user cannot sign in through your login.
A dual site with EdgeKit sign-in on
Section titled “A dual site with EdgeKit sign-in on”The sign-in page shows the email code form and, when your login page’s URL is set, a link to your login. It never sends the user to your login by itself. A browser that already carries your login’s cookie is signed in with it, as above.