naulon
v1.0.2Check citations and retractions by DOI, and see the x402 price an AI agent pays to cite a source.
A Model Context Protocol server that lets any LLM discover, quote, pay, and cite naulon-tolled sources. Bring your own wallet, local stdio, the wayfarer brain running in-process. Point any MCP-capable client at this server and the model gains tools to find tolled articles, get a quote, pay the 402 toll from a wallet you control, and cite what it bought: the same budgeted buying loop the CLI agent runs, exposed as callable tools and slash commands. Works with any MCP client: Claude Code, Claude Desktop, Cursor, Windsurf, Cline, VS Code, OpenCode, Codex, Gemini CLI, or your own host.
Summary extracted from the README.
@naulon/wayfarer-mcp
A Model Context Protocol server that lets any LLM discover, quote, pay, and cite naulon-tolled sources. Bring your own wallet, local stdio, the wayfarer brain running in-process.
Point any MCP-capable client at this server and the model gains tools to find
tolled articles, get a quote, pay the 402 toll from a wallet you control, and
cite what it bought: the same budgeted buying loop the CLI agent runs, exposed
as callable tools and slash commands.
Works with any MCP client: Claude Code, Claude Desktop, Cursor, Windsurf, Cline, VS Code, OpenCode, Codex, Gemini CLI, or your own host. Setup for each is below.
Listed in the MCP Registry as app.naulon/naulon.
Quick start
npx -y @naulon/wayfarer-mcp # runs the stdio MCP server
The package is scoped (@naulon/wayfarer-mcp); the binary it installs is
wayfarer-mcp. Zero-config, it starts and mocks settlement (no wallet, no
spend), but mock settlement is not a mock catalog: discover, research and
verify need a real place to look, so with nothing configured they refuse
(they never fabricate sources). To actually find and read something, pick one:
- Buy from the fleet (hosted): point a client at the hosted endpoint with an
agent token and use
naulon_ask, which buys across the whole naulon fleet directory, real corpus, no local wallet. See Hosted endpoint. - Single publisher (stdio): set
RSS_URL,PUBLISHER_URL, orCATALOG_URLto that site's feed/catalog, plusTOLLGATE_URLto pay. A loneTOLLGATE_URLpins every payment to one gate, which is single-publisher by design. - Fleet / many publishers (stdio): to buy across more than one publisher
locally, set
WAYFARER_ALLOW_DOMAINSto the publisher hosts you trust (and point discovery at a fleet directory viaCATALOG_URL) instead of pinning a singleTOLLGATE_URL, and each discovered publisher is then paid at its own gate, bounded by the allowlist. See Configuration. - Full loop offline: run the repo's
make demo(ormake dev) to drive the whole discover → toll → pay → settle loop against a local stub publisher.
The canonical registration, which every client below is a variant of:
{
"mcpServers": {
"naulon": { "command": "npx", "args": ["-y", "@naulon/wayfarer-mcp"] }
}
}
Slash commands (prompts)
Every prompts-capable client surfaces these as native, argument-taking slash
commands, with no per-user config. In Claude Code and Desktop they appear as
/mcp__naulon__<name> (the naulon segment is whatever you named the server):
| Prompt | Argument | Does |
|---|---|---|
research |
topic |
Discover sources, see prices, return a grounded cited answer within budget. |
discover |
topic |
List candidate sources. Free, no payment. |
verify |
claim |
Fact-check a claim against tolled sources, citing what it paid for. |
ask* |
question |
Hosted reading agent: pays per citation, returns a grounded answer. |
* ask is only present on the hosted endpoint (it drives the cloud
naulon_ask tool). The stdio server exposes research / discover / verify.
Per-client setup
Claude Code
CLI (recommended, since --scope project writes a shared .mcp.json and user makes it
global across your projects):
claude mcp add naulon --scope user -- npx -y @naulon/wayfarer-mcp
Then /mcp inside Claude Code to confirm it connected, and type / to see the
research / discover / verify prompts. Or add it by hand to .mcp.json
(project) using the canonical block above.
Claude Desktop
Edit claude_desktop_config.json
(macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):
{
"mcpServers": {
"naulon": { "command": "npx", "args": ["-y", "@naulon/wayfarer-mcp"] }
}
}
Restart Claude Desktop. Prompts appear in the + / slash-command menu.
Cursor
~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project), key
mcpServers, the same canonical block as above.
Windsurf
~/.codeium/windsurf/mcp_config.json, key mcpServers, the same canonical block.
VS Code (native MCP / Copilot agent)
.vscode/mcp.json (workspace). VS Code uses the servers key (not
mcpServers); the type is inferred as stdio from command, so it's optional:
{
"servers": {
"naulon": { "command": "npx", "args": ["-y", "@naulon/wayfarer-mcp"] }
}
}
Cline
Cline → MCP Servers → Configure (cline_mcp_settings.json), key mcpServers,
same canonical block.
OpenCode
opencode.json in your project root. OpenCode uses the mcp key, a type of
local, and the command as one array:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"naulon": { "type": "local", "command": ["npx", "-y", "@naulon/wayfarer-mcp"] }
}
}
Environment variables go under environment, not env.
Codex
~/.codex/config.toml:
[mcp_servers.naulon]
command = "npx"
args = ["-y", "@naulon/wayfarer-mcp"]
codex mcp list shows it as enabled.
Gemini CLI
~/.gemini/settings.json (global) or .gemini/settings.json (per-project), key
mcpServers, the same canonical block. gemini mcp list shows it connected.
Any other MCP host
Spawn the stdio binary and speak MCP over its stdio transport:
command: npx args: ["-y", "@naulon/wayfarer-mcp"]
Hosted endpoint (no local wallet)
The hosted naulon service exposes the same brain over Streamable HTTP at
/_naulon/mcp, authenticated with an agent token. Tolls are signed by naulon's
custody-free session key, so no private key ever touches your machine. This
endpoint also adds the hosted-only naulon_ask tool + its ask prompt.
Clients that support remote/HTTP MCP with headers:
# Claude Code. `claude mcp add` refuses a name that exists, so clear it first;
# the same two lines then work again after you rotate the token.
claude mcp remove naulon -s local 2>/dev/null; claude mcp remove naulon -s user 2>/dev/null
claude mcp add --scope user --transport http naulon \
https://<your-naulon-host>/_naulon/mcp \
--header "Authorization: Bearer <AGENT_TOKEN>"
// Generic HTTP MCP config
{
"mcpServers": {
"naulon": {
"type": "http",
"url": "https://<your-naulon-host>/_naulon/mcp",
"headers": { "Authorization": "Bearer <AGENT_TOKEN>" }
}
}
}
// OpenCode (opencode.json)
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"naulon": {
"type": "remote",
"url": "https://<your-naulon-host>/_naulon/mcp",
"headers": { "Authorization": "Bearer <AGENT_TOKEN>" }
}
}
}
Mint the agent token from your naulon buyer wallet / dashboard. Spend is bounded by the server budget and the token's sub-cap, so the model can lower a run's budget, never raise it past either.
Configuration
Env read by the stdio server (all optional, so omit for the offline mock):
| Var | Purpose |
|---|---|
PAYMENT_MODE |
gateway to pay real tolls over Circle Gateway on Arc Network (default: mock). |
BUYER_PRIVATE_KEY |
The wallet the toll is paid from. BYO-key path; a hosted deploy signs through a cloud signer instead. |
TOLLGATE_URL |
The gate every payment resolves against. Payments only ever flow here, so a prompt-injected model cannot redirect them. |
WAYFARER_BUDGET_USDC |
The session spend ceiling. The model can never raise it. |
WAYFARER_ALLOW_DOMAINS / WAYFARER_DENY_DOMAINS |
Publisher allow/deny lists applied to every paid tool (naulon_quote, naulon_pay_and_read, naulon_research), not just research. A stated WAYFARER_ALLOW_DOMAINS replaces the single-gate identity pin, so one server can buy across many publishers. Blank/malformed reads as unset (no restriction); comma-separated hosts to allow. (Internally, a defined-but-empty allowlist denies all, and a blank env var can only ever read as unset, never empty.) |
WAYFARER_PER_DOMAIN_CAP |
Max paid reads per publisher per session. |
WAYFARER_KILL_SWITCH |
Hard stop: refuse all spend. |
Budget and wallet are server config, never tool arguments, so the model plans spend within the envelope but can't widen it.
Tools
| Tool | Cost | Does |
|---|---|---|
naulon_status |
free | Run this first. Reports the buyer wallet, where discovery is configured to look, and plain-language guidance for what to do next. On a hosted endpoint it also reports the spendable balance and the budget left, and ready is false when either is empty. |
naulon_discover |
free | Candidate teasers for a topic (slug, title, summary). Start here. |
naulon_appraise |
free | Relevance + rationale for teasers already held. |
naulon_quote |
free | The x402 402 probe: real price and terms, no spend. |
naulon_pay_and_read |
$ | Pays the toll, returns content + settlement ref + citation license, and proofUrl, the page a reader opens to see the author was paid. Cite it beside the source. |
naulon_read_held |
free | Re-read a held live license (PoP-signed if cnf-bound). Carries the same proofUrl. |
naulon_research |
$ | One composite that runs the whole discover→quote→pay→ground loop. |
naulon_ask* |
$ | Hosted-only reading agent: grounded, numbered-citation answer. |
* hosted endpoint only. Every tool states all four behaviour hints (readOnlyHint,
destructiveHint, idempotentHint, openWorldHint). The free ones are read-only; the ones that
spend are destructive, because a payment cannot be taken back, so a client that confirms
irreversible actions asks first.
naulon_discover returns match on each candidate: title when your words are in the title or
teaser, body when they are only in the text behind the toll, meaning when the source is near
your topic and your words are absent. No match means the source does not search.
The tool definition contract
A model picks a tool from tools/list alone, so every definition here is written to one order:
what the tool does and returns, when to call it and which sibling to call instead, what the
annotations cannot say (limits, cost, the empty result), then what an argument means beyond its
schema. The package exports the check that holds the part a program can decide:
import { toolContractProblems } from "@naulon/wayfarer-mcp";
const { tools } = await client.listTools();
const problems = toolContractProblems(tools, { prefix: "naulon_", instructions: client.getInstructions() });
// [] when every definition holds. Otherwise one sentence per problem, the tool named first.
It checks the name shape, the title, the description's length, a description on every argument,
outputSchema, all four hints, that each description names a sibling, and that no text names a
tool the server does not list. Run it over what your callers are sent, not over your source: a
host that builds a server with surface.tools and adds its own tools beside these is checking a
different listing than this package's.
Two more exports serve such a host. toolNamer(listed) names tools in a sentence and drops the
ones that are not listed, and TOOL_NAMES is every tool the full server lists. surface.notes
adds one sentence to a tool's description, which is how naulon_discover can send a caller to a
search tool the host mounts and this package has never heard of.
Host instructions
buildServer({ instructions }) puts a host's own text at the head of the server's instructions,
the text a client reads once on connecting. Use it to tell a model about tools you mount beside
these, before it reads anything else.
| Option | Type | Does |
|---|---|---|
instructions |
string, optional |
Your text, trimmed, then one blank line, then this package's instructions, whole. Absent, empty or whitespace only changes nothing. |
You add and never remove: the package's price and safety guidance always follows your text, and
priceOnly still picks which set that is. Text longer than MAX_HOST_INSTRUCTIONS_CHARS (1,200
characters after trimming) makes buildServer throw a RangeError. Some clients keep only the
first part of a server's instructions, so a long lead would push that guidance out.
Tool order
tools/list returns tools in the order they were registered, so a tool you mount after
buildServer returns is listed last. orderTools(server, names) states the order instead:
import { buildServer, orderTools } from "@naulon/wayfarer-mcp";
const server = buildServer({ surface: { tools: ["naulon_discover", "naulon_quote"] } });
server.registerTool("acme_search", definition, handler);
orderTools(server, ["acme_search", "naulon_discover"]);
// tools/list: acme_search, naulon_discover, naulon_quote
The names you give come first, in your order. Every other tool follows in registration order,
including one registered after the call. A name with no tool is ignored when a client lists, and
toolContractProblems(tools, { prefix, order: names }) reports it. Calling orderTools again
replaces the order. It changes the listing only, never tools/call. It throws when the server has
no tool yet, and when the installed MCP SDK has moved the one internal it reads.
A note on an empty discovery
naulon_discover returns { "candidates": [] } when nothing matched. A host with a second
catalogue sets surface.discoverEmptyNote, and that result carries it as emptyNote:
| Option | Type | Does |
|---|---|---|
surface.discoverEmptyNote |
string, optional |
One sentence, trimmed, returned as emptyNote only when discovery ran and found nothing. Absent, empty or whitespace only changes nothing, in the result or in the listing. |
It adds and never removes: candidates is still there, empty. A refused discovery keeps its own
note and never carries emptyNote. Text longer than MAX_EMPTY_NOTE_CHARS (300 characters
after trimming) makes buildServer throw a RangeError. The sentence is your own text and reaches
the caller as the server's word, so never fill it from a publisher, a search result or a request.
MIT.