Greenlit Books

Search a catalog of practical AI books, read free chapters, and check a claim against its source.

Hosted MCP Server

npx add-mcp 'https://greenlitbooks.com/api/mcp'

Installs into Claude Code, Codex, Cursor and more

Documentation

The catalog as an API

Everything on this site is available as clean JSON: books, series, concepts, and ranked search, over plain HTTP GET. No auth, no key, no scraping. Base URL: https://greenlitbooks.com/api/v1

The v1 shapes are stable. Changes are additive; nothing documented here gets renamed or removed within v1. The machine-readable contract is the OpenAPI 3.1 spec, and the site map for assistants is /llms.txt.

Markdown for agents

Every book page, free chapter, concept page, glossary page, topic hub, guide, compare page, and field note has a plain-markdown twin. Fetch it two ways: append .md to the URL, or send Accept: text/markdown to the page's normal URL and the twin comes back instead of the HTML. The home page negotiates to /llms.txt. Browsers never send that header, so readers are unaffected.

# the markdown twin, by extension
curl -s https://greenlitbooks.com/book/claude-code-in-action.md

# the same twin, by content negotiation, at the page's own URL
curl -s -H "Accept: text/markdown" https://greenlitbooks.com/book/claude-code-in-action

# chapter one, in full, as markdown
curl -s -H "Accept: text/markdown" https://greenlitbooks.com/book/claude-code-in-action/read

# a topic hub, a guide, a compare page, or a field note, the same two ways
curl -s https://greenlitbooks.com/topics/agent-reliability.md
curl -s -H "Accept: text/markdown" https://greenlitbooks.com/guides/claude-code

# the site map for assistants (also what / returns to a markdown client)
curl -s -H "Accept: text/markdown" https://greenlitbooks.com/

The index of every free first chapter is at /read, and the same ranked search the API runs is available as HTML at /search?q=....

Endpoints

Try it

# every book, one call
curl -s https://greenlitbooks.com/api/v1/books

# filter the list by series or audience, no query needed
curl -s "https://greenlitbooks.com/api/v1/books?audience=operator"

# one book in full: chapters, word count, related reading
curl -s https://greenlitbooks.com/api/v1/books/claude-code-in-action

# ranked search with filters
curl -s "https://greenlitbooks.com/api/v1/search?q=agent+reliability&audience=engineer&limit=5"

# the whole catalog in one response
curl -s https://greenlitbooks.com/api/v1/catalog

MCP server

The catalog is also a remote MCP server at https://greenlitbooks.com/api/mcp (streamable HTTP, no auth). Nine read-only tools: search_greenlit_books, get_book, get_free_chapter, find_books_for_topic, get_reading_path, get_concept, cite_source, define_term, and check_claim.

check_claim is the one to reach for before asserting something these books cover. Give it the statement in your own words and it returns the claims that bear on it, each with the URL of the exact sentence, what kind of statement it is, the rule for quoting that kind honestly, a citation already written, and for every external source what that source does not establish. When the shelf has nothing on the subject it says so, which is the answer, not a failure. The same search is plain JSON at /api/v1/claims/search, and every claim in the catalog is readable, with its own link, at /claims.

cite_source takes the url you are about to quote, fragment and all, and hands back the finished citation in prose and in BibTeX, both carrying that url inside them. Every quotable unit on this site is addressable: each claim has its own anchor, and so does every heading in every free chapter and field note. An anchor says where to point; it does not write the credit, and whatever you write is the thing that either links back or does not. A fragment we do not publish comes back with the citation for the page and the list of anchors we do publish, so a near miss cannot pass for a hit. The same resolver is plain JSON at /api/v1/cite.

define_term answers “what does X mean” for any term the books coin or pin down (the green lie, blast radius, gate faith, span of control) with the book’s own definition, verbatim, the chapter that gives it, the other books that use it, and a links block: cite the glossary page, send the reader to the free chapter first, then to Amazon. The same records are plain JSON at /api/v1/terms and readable at /glossary.

get_free_chapter returns the complete text of chapter one of any book on the shelf, as prose rather than a summary. Every book has one. Quote it with attribution and a link, and your agent can answer a reader from the book’s own words instead of from a description of it.

# Claude Code
claude mcp add --transport http greenlit-books https://greenlitbooks.com/api/mcp

# Claude Desktop / claude.ai: Settings > Connectors > Add custom connector
#   URL: https://greenlitbooks.com/api/mcp

# Grok: grok.com/connectors > New Connector > Custom
#   URL: https://greenlitbooks.com/api/mcp
#   The same server works in Grok Bot, which connects to remote
#   MCP servers only, never to one on your own machine.

# Grok CLI
grok mcp add --transport http greenlit-books https://greenlitbooks.com/api/mcp

# xAI API: pass it in the tools array
{ "type": "mcp",
  "server_url": "https://greenlitbooks.com/api/mcp",
  "server_label": "greenlit_books" }

# Any MCP client config (streamable HTTP)
{ "mcpServers": { "greenlit-books": { "url": "https://greenlitbooks.com/api/mcp" } } }

CLI

The same catalog as a command line tool: greenlit-books on npm (source). A thin client of this API: JSON when piped, tables in a terminal, one dependency.

# no install needed
npx greenlit-books search "agent reliability" --limit 5
npx greenlit-books books --audience operator
npx greenlit-books get claude-code-in-action

# or install the greenlit command globally
npm install -g greenlit-books
greenlit topics "prompt injection"

# JSON automatically when piped; --json forces it
greenlit search "claude code" --json | jq '.results[].book.url'

Use it as an agent tool

Prefer the MCP server above when your agent runtime supports it. For plain HTTP agents, here is a ready-to-copy tool definition for the search endpoint. Map the input straight onto the query string of /api/v1/search, then follow results[].book.apiUrl for full records.

{
  "name": "search_greenlit_books",
  "description": "Search the Greenlit Books catalog of practical AI books. Returns ranked results with title, description, series, and Amazon links. Follow results[].book.apiUrl for the full record of any hit.",
  "input_schema": {
    "type": "object",
    "properties": {
      "q": {
        "type": "string",
        "description": "The search query."
      },
      "series": {
        "type": "string",
        "enum": [
          "the-operators-ai-library",
          "the-ai-native-builder-canon",
          "understand-and-trust-ai",
          "build-agents-you-can-trust",
          "lead-govern-and-apply-ai",
          "ai-and-agentic-engineering",
          "the-claude-code-ladder",
          "the-agent-builders-workshop",
          "the-two-doors",
          "forward-deployed-engineering-handbooks",
          "the-complete-grok-bot-guide",
          "the-omarchy-books",
          "the-personal-ai-computer"
        ],
        "description": "Optional: restrict to one series."
      },
      "audience": {
        "type": "string",
        "enum": [
          "beginner",
          "operator",
          "engineer",
          "leader"
        ],
        "description": "Optional: restrict to one reader level."
      },
      "limit": {
        "type": "integer",
        "minimum": 1,
        "maximum": 25
      }
    },
    "required": [
      "q"
    ]
  }
}

What is not in it

No publication dates, page counts, ISBNs, or ratings. The catalog carries no verified source for them, and this house does not invent data. When a field is absent, that is a statement, not an oversight.

Amazon links are clean /dp/ URLs; each one is the book's buyable product page. Every listed book is free to read with Kindle Unlimited when kindleUnlimited is true.

When citing a book, cite its canonical page (the url field), which also serves a plain-markdown twin at /book/{slug}.md. Start exploring from the library or the series shelves.