MCP for AI Agents
This is the "out on the web" surface. NxisAI gives each site a Model Context Protocol (MCP) endpoint so external AI agents — Claude, ChatGPT, Cursor, Gemini, browser agents — can query your structured data as typed records and act on what your pages offer.
The server uses the Streamable HTTP transport. All requests go to POST /mcp on your site's MCP domain.
Prerequisites
- Enable MCP for your site — see Site Settings → MCP.
- Grab your MCP Domain and API key (manage them on the API Keys page).
Your endpoint looks like https://<your-domain>.mcp.nxis.ai/mcp.
Public vs. authenticated access
Each site chooses whether to allow public (unauthenticated) access via the Public Access toggle in Site Settings → MCP.
| Public access | Authenticated access | |
|---|---|---|
| API key | Not required | Required (nxis-api-key header or OAuth 2.1) |
| Tools available | Typed retrieval only — nxis_list_types, nxis_query, nxis_get | All tools (typed retrieval, graph search, generation, discovery, per-action tools, and the write tools below) |
| Rate limit | Lower — public traffic is rate-limited more strictly | Higher |
Public access is great for open discovery and demos. For sustained or high-volume use — or to reach private and per-action tools — connect with an API key, which raises your rate limit.
When public access is disabled, every tool requires authentication.
What agents can do
Once connected, agents can discover and query your content through typed retrieval tools — returning structured values, not scraped HTML — and execute the actions your pages offer:
| Tool | Purpose |
|---|---|
nxis_list_types | Discover the Schema.org types available in your site's data. |
nxis_query | Search typed records with field filters, sorting, and pagination. |
nxis_get | Fetch a single entity's full JSON-LD by its ID. |
nxis_action | Execute an action discovered on an entity (quote request, reservation, signup) — routed per your Action Binding configuration. Supports mode: "check" for booking availability dry-runs. Always requires authentication, even on public servers. |
Authenticated agents can also maintain the corpus itself, rather than only read it:
| Tool | Purpose |
|---|---|
nxis_crawl_sitemap | submit queues a sitemap crawl so new pages are discovered; status reports progress. |
nxis_bulk_autofill | Generate structured data across the site. plan reports the page count and your credit balance before anything is spent; submit starts; status polls. |
nxis_publish_entities | Publish generated drafts so the site serves them. Until this runs, generated data is stored but not returned by nxis_query. |
nxis_generate_image_sitemap | Crawl the site and build a Google image sitemap, returning a download URL valid for 24 hours. |
These are write tools. They are never available on a public (unauthenticated) server, whatever the Public Access setting is — a public endpoint may read the corpus, never change it.
Connect without a key (public)
If the site has Public Access enabled, agents can use the typed-retrieval tools with no API key — just omit the headers. Gemini CLI (~/.gemini/settings.json):
{
"mcpServers": {
"nxis": {
"url": "https://<your-domain>.mcp.nxis.ai/mcp"
}
}
}
This exposes nxis_list_types, nxis_query, and nxis_get only, at the public rate limit. Add a key (below) for full tool access and higher limits.
Connect with an API key
For full access — all tools, higher rate limit — send your key as the nxis-api-key header.
Gemini CLI
Add the server to your ~/.gemini/settings.json:
{
"mcpServers": {
"nxis": {
"url": "https://<your-domain>.mcp.nxis.ai/mcp",
"headers": {
"nxis-api-key": "<your-api-key>"
}
}
}
}
Restart Gemini CLI and verify with /mcp list — you should see ✓ nxis: ... - Connected.
Claude Code
Add the server using the CLI:
claude mcp add --transport http nxis \
https://<your-domain>.mcp.nxis.ai/mcp \
--header "nxis-api-key: <your-api-key>"
Verify inside Claude Code with the /mcp slash command.
From code
Building an agent or backend that queries a NxisAI-powered site? Connect to the endpoint by URL with any MCP client. In TypeScript, use the official MCP SDK, @modelcontextprotocol/sdk:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const transport = new StreamableHTTPClientTransport(
new URL("https://<your-domain>.mcp.nxis.ai/mcp"),
{ requestInit: { headers: { "nxis-api-key": "<your-api-key>" } } }, // omit for public sites
);
const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(transport);
const types = await client.callTool({ name: "nxis_list_types", arguments: {} });
const plumbers = await client.callTool({
name: "nxis_query",
arguments: {
filter: {
schema_type: "Plumber",
field_filters: [
{ path: "aggregateRating.ratingValue", operator: "GREATER_THAN_OR_EQUAL", value: 4.0 },
],
sort_option: { property: "aggregateRating.ratingValue", order: "DESCENDING" },
},
limit: 5,
},
});
From a terminal, the NxisAI CLI reads a public site's records with nxis types and nxis query.
The full query surface — field filters, operators, sorting, pagination, semantic search — is documented in the Typed Retrieval Reference.
Connect Claude Desktop with OAuth 2.1 (no API key)
Claude Desktop can connect over OAuth 2.1 — there's no key to paste. The server publishes its authorization details via protected-resource metadata (RFC 9728), Claude Desktop dynamically registers itself as a client (RFC 7591), and you approve access in the browser.
- Open Settings → Connectors → Add custom connector.
- Paste your server URL:
https://<your-domain>.mcp.nxis.ai/mcp - Click Add. Claude Desktop discovers the authorization server, performs Dynamic Client Registration, and opens the browser sign-in.
- Approve the requested scopes — your typed retrieval tools appear in the tool menu.
How the handshake works
# 1 · Discover — protected-resource metadata (RFC 9728)
GET https://<your-domain>.mcp.nxis.ai/.well-known/oauth-protected-resource
→ authorization_server, scopes_supported
# 2 · Register — Dynamic Client Registration (RFC 7591)
POST <authorization_server>/register
→ client_id (issued on the fly — nothing to pre-provision)
# 3 · Authorize — OAuth 2.1 + PKCE in the browser
GET <authorization_server>/authorize # user consents
POST <authorization_server>/token # code → access_token
# 4 · Call — bearer token on every MCP request
POST https://<your-domain>.mcp.nxis.ai/mcp
Authorization: Bearer <access_token>
MCP makes your data queryable by agents. It does not guarantee that any agent will recommend, prefer, or send traffic to your site — that's brand territory. NxisAI ships the infrastructure that makes your site addressable by AI.
Related
- MCP Integration (overview)
- NxisAI Hub — one server for every listed site, no per-site setup
- Provisioning MCP Server — the org-scoped server that creates and configures sites
- Actions & Bindings — let agents execute your quotes, bookings, and signups
- Agent Protocols and Standards — publish an agent guide and site map, and make your MCP server discoverable with a Server Card + catalog
- Site Settings → MCP
- API Keys
- WebMCP — the on-page agent surface