Skip to main content

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​

  1. Enable MCP for your site — see Site Settings → MCP.
  2. 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 accessAuthenticated access
API keyNot requiredRequired (nxis-api-key header or OAuth 2.1)
Tools availableTyped retrieval only — nxis_list_types, nxis_query, nxis_getAll tools (typed retrieval, graph search, generation, discovery, per-action tools, and the write tools below)
Rate limitLower — public traffic is rate-limited more strictlyHigher
tip

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:

ToolPurpose
nxis_list_typesDiscover the Schema.org types available in your site's data.
nxis_querySearch typed records with field filters, sorting, and pagination.
nxis_getFetch a single entity's full JSON-LD by its ID.
nxis_actionExecute 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:

ToolPurpose
nxis_crawl_sitemapsubmit queues a sitemap crawl so new pages are discovered; status reports progress.
nxis_bulk_autofillGenerate structured data across the site. plan reports the page count and your credit balance before anything is spent; submit starts; status polls.
nxis_publish_entitiesPublish generated drafts so the site serves them. Until this runs, generated data is stored but not returned by nxis_query.
nxis_generate_image_sitemapCrawl 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.

  1. Open Settings → Connectors → Add custom connector.
  2. Paste your server URL: https://<your-domain>.mcp.nxis.ai/mcp
  3. Click Add. Claude Desktop discovers the authorization server, performs Dynamic Client Registration, and opens the browser sign-in.
  4. 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>

Honest scope

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.