Skip to main content
Glama
jsharma103

natural-docs-mcp

by jsharma103

natural-docs-mcp

Search, read, and look up Natural API documentation from your AI agent.

Unofficial. Not affiliated with, endorsed by, or operated by Natural AI, Inc. A community companion to Natural's official operational MCP. It reads Natural's own published docs — it moves no money and needs no credentials.

Live endpoint: https://natural-docs-mcp.jsharma103.workers.dev/mcp


Why

Natural's official MCP server exposes 24 operational tools (payments, wallets, agents, transfers) but no way to read the docs. An agent mid-integration ends up fetching raw llms.txt over HTTP — which fails on hosts without web access, burns context on full-page dumps, and offers no ranked search.

This server adds the missing documentation surface: four read-only tools, one hosted URL, nothing to install. Docs are fetched live from docs.natural.com (cached 15 min), so answers are never stale and no snapshot is redistributed.

Related MCP server: UseKeen Documentation MCP Server

Tools

Tool

Answers

Notes

list_docs

"What docs exist?"

Sections → pages, a table of contents (~2KB)

search_docs

"Which page covers X?"

BM25 ranking, returns snippets not full pages

read_doc

"Give me that page."

Fetches a page as markdown by slug or URL

lookup_endpoint

"Exact shape of this endpoint?"

OpenAPI lookup; detail=true returns pruned parameter/request/response schemas

Install

No install, no auth — add one URL as a custom MCP server.

Claude Code

claude mcp add --transport http natural-docs https://natural-docs-mcp.jsharma103.workers.dev/mcp --scope user

Then /mcp to confirm natural-docs is connected. Try: "Search the Natural docs for idempotency."

Claude (claude.ai / Desktop)

Sidebar → CustomizeConnectorsAdd custom connector. Name Natural Docs, URL https://natural-docs-mcp.jsharma103.workers.dev/mcp.

Cursor

Settings → Tools & MCPs → New MCP Server, then merge:

{
  "mcpServers": {
    "natural-docs": { "url": "https://natural-docs-mcp.jsharma103.workers.dev/mcp" }
  }
}

How it works

Three published, machine-readable sources are fetched at runtime and cached in-isolate:

  • docs.natural.com/llms.txt — the section/page index (list_docs)

  • docs.natural.com/llms-full.txt — the full corpus, 164 pages, chunked per page and indexed with minisearch BM25 (search_docs)

  • docs.natural.com/api-reference/openapi.json — lazily parsed into an operations index; a single operation is pruned on demand — examples stripped, $refs resolved one level (lookup_endpoint)

No database, no vector store, no embeddings, no persistence. Just their own artifacts, indexed in memory.

Architecture

Layered so the documentation logic is portable, not welded to the host:

src/
  core/    parsing + search + OpenAPI pruning — platform-free (web-standard fetch only)
  tools/   the four tools as a transport-agnostic registry (zod shape + JSON Schema + handler)
  entry/
    worker.ts   Cloudflare Worker — stateless Streamable HTTP MCP (the live deployment)
    node.ts     stdio + official MCP SDK — offline/local fallback and test target

core/ and tools/ carry no platform dependency; the entry files are thin adapters. The Worker is stateless (no Durable Objects, no sessions) — each POST carries one JSON-RPC message, handled inline.

Develop

npm install
npm run build     # tsc -> dist/ (noEmitOnError gate)
npm run smoke     # spawn the stdio server, exercise all 4 tools + golden queries
npm start         # run the stdio server locally

npx wrangler dev      # run the Worker locally
npx wrangler deploy   # deploy the Worker

npm run smoke is the CI gate: it calls every tool and requires each golden integration query (idempotency, payment requests, vault, limits, errors) to surface the right page in the top 3.

See docs/EXAMPLES.md for real request/response transcripts.

Limitations

  • lookup_endpoint detail returns a representative subset of responses (primary 2xx + one error); other codes are listed under x-omitted-response-codes. Output is compact JSON capped at 14000 chars — enough for every current Natural operation.

  • First request after a cold start or cache expiry re-fetches the corpus/spec.

License

MIT © 2026 Jay Sharma. "Natural" and related marks belong to Natural AI, Inc.

Available Tools

4 tools
list_docsA

List Natural documentation sections and pages (title, slug, one-line description). No input. Use as a table of contents before read_doc.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, description discloses that it returns title, slug, and description, and requires no input. Since it's a listing tool, behavior is clear and non-destructive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no wasted words. Purpose, input requirement, and usage guidance are all front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and no parameters, the description covers purpose, output fields, input requirement, and usage guidance comprehensively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, so description adds value by stating 'No input.' Baseline for zero parameters is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it lists documentation sections and pages with specific fields (title, slug, description). Includes a usage hint that distinguishes it from siblings like read_doc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly advises using as table of contents before read_doc, providing clear context for when to use. Does not specify when not to use, but the hint is sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lookup_endpointA

Look up Natural REST API endpoints from the OpenAPI spec. Query by path fragment, "METHOD /path", or keyword. detail=true on a single match returns the pruned operation: parameters, request body, and a representative subset of responses (primary 2xx plus one error; examples stripped, $refs resolved one level, other response codes listed under x-omitted-response-codes).

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesPath fragment, "POST /payments", or operation keyword.
detailNoReturn full pruned schema for a single match.

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description bears full burden. It discloses significant behavior: detail=true returns a 'pruned operation' with specific elements (parameters, request body, representative responses, $ref resolution, x-omitted-response-codes). This is thorough, though it doesn't mention whether the operation is read-only or idempotent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the main action and uses three well-formed sentences. It could be slightly more concise by removing 'representative subset of responses' detail, but overall it efficiently conveys necessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description compensates well by detailing query formats and the effect of 'detail', but it does not specify the return structure when detail=false (likely a list of matches), leaving a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description adds substantial value beyond the schema: for 'query' it provides valid formats (path fragment, 'METHOD /path', keyword), and for 'detail' it explains the full meaning of the 'pruned operation' output.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies a precise action ('Look up Natural REST API endpoints'), identifies the source ('OpenAPI spec'), and details input formats (path fragment, 'METHOD /path', keyword), clearly distinguishing it from sibling tools that handle documentation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage (for endpoint lookup vs. doc browsing via siblings), but lacks explicit guidance on when to set detail=true vs false or when to prefer this over alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_docA

Fetch one Natural documentation page as markdown by slug (e.g. "guides/concepts/payments") or full docs URL. Truncated at 40000 chars.

ParametersJSON Schema
NameRequiredDescriptionDefault
pageYesDoc slug or full docs.natural.com URL.

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses that responses are truncated at 40000 characters, which is a key behavioral trait. However, it does not mention error handling, permissions, or other side effects. Without annotations, the description carries the full burden, and it is adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the main purpose, and every sentence adds necessary information. There is no fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity of the tool (one parameter, no output schema), the description provides sufficient context: input format, output format (markdown), and a key limitation (truncation). It covers what an agent needs to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds a helpful example ('guides/concepts/payments') that clarifies the slug format. This adds some value beyond the schema but is not extensive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Fetch', the resource 'Natural documentation page', the output format 'as markdown', and the input types 'slug' or 'full docs URL'. This is specific and distinguishes it from sibling tools like list_docs or search_docs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives. The usage is implied (fetch a specific page by slug or URL), but no guidance is given on when to prefer read_doc over list_docs or search_docs, which leaves some ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_docsA

Full-text search across Natural docs; returns ranked pages with title, slug, and a snippet. Use to find which page covers a topic.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMax results, default 5, max 10.
queryYesSearch terms.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses that results are ranked and returns specific fields, but doesn't explicitly state it's read-only or safe.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core action, no wasted words. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple search tool with two well-documented parameters, the description covers purpose, output, and usage context. Could mention pagination but not necessary given limit parameter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with parameter descriptions. The description adds that results are ranked and include specific fields, but doesn't significantly enhance parameter understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it performs full-text search across Natural docs, returning ranked pages with title, slug, and snippet. This distinguishes it from siblings like list_docs and read_doc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a specific use case: 'Use to find which page covers a topic.' While it doesn't explicitly list when not to use or alternatives, the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.0
    • First observedlist_docs
    • First observedlookup_endpoint
    • First observedread_doc
    • First observedsearch_docs

TDQS

A4.3/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: listing docs, searching docs, reading a specific doc, and looking up API endpoints. No overlap or ambiguity.

Naming Consistency5/5

All tool names use a consistent verb_noun pattern in snake_case: list_docs, search_docs, read_doc, lookup_endpoint. No naming conventions are mixed.

Tool Count5/5

With 4 tools, the server is well-scoped for providing documentation and API endpoint lookup. Each tool is necessary and justified.

Completeness4/5

The tool surface covers listing, searching, reading docs, and querying endpoints. A minor gap is the lack of a way to list all endpoints without a search query, but the set is otherwise complete for its purpose.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers