# ForgeMesh Library MCP [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/forgemeshlabs/library-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 1062  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/forgemesh-library-mcp

## Description
A paid public-domain knowledge base for AI agents: full-text search, book metadata, chapters.

## Tools
Capabilities this server exposes over MCP:

- **search_literature** — PREMIUM full-text search across the entire indexed public-domain corpus (17k+ books and growing). Returns the most relevant passages from ANY book, ranked by relevance, with title/author citations. Retrieval only — real cited passages, never LLM-generated or summarized. Costs $0.02 via x402 (requires WALLET_PRIVATE_KEY, USDC on Base).
- **search_books** — Search the indexed public-domain book corpus by title or author substring, e.g. 'Dickens' or 'Frankenstein'. Returns matching books ranked by historical popularity with book_id for drill-down into metadata, chapters, quotes, or full-text search. Costs $0.005 via x402 (requires WALLET_PRIVATE_KEY, USDC on Base).
- **get_book_metadata** — Full metadata for one indexed book by book_id: title, author, year, subjects, bookshelves, download rank, chunk count, and detected chapter range. Use search_books first to find a book_id. Costs $0.005 via x402 (requires WALLET_PRIVATE_KEY, USDC on Base).
- **get_chapter** — Full text of one chapter from an indexed book by book_id and chapter number. Chapter 0 is front matter before the first detected heading. Use get_book_metadata for the valid chapter range. Costs $0.005 via x402 (requires WALLET_PRIVATE_KEY, USDC on Base).
- **get_quotes** — Notable passages from one indexed book by book_id. Pass an optional theme to full-text search within that book, or omit it for a sample of short dialogue-bearing lines. Costs $0.005 via x402 (requires WALLET_PRIVATE_KEY, USDC on Base).
- **ask_book** — Ask a natural-language question about one of the flagship books and get back the most relevant passages from the book itself, with chapter/location citations. Retrieval only — never a generated summary. Pass any recognizable name for "book" (e.g. "Moby Dick", "the Odyssey") — it resolves to the matching route. Available flagship books: alice in wonderland, art of war, count of monte cristo, crime and punishment, don quixote, dracula, frankenstein, great expectations, grimms fairy tales, jane eyre, meditations, moby dick, picture of dorian gray, pride and prejudice, sherlock holmes, iliad, odyssey, republic, time machine, tom sawyer, treasure island, walden, war and peace, wuthering heights. Costs $0.01 via x402 (requires WALLET_PRIVATE_KEY, USDC on Base).
- **browse_shelf** — Browse a curated category/subject shelf: 10 hand-picked categories (adventure, childrens-classics, classic-literature, economics-and-politics, gothic-horror, history, philosophy, poetry, science-and-nature, shakespeare-and-drama) plus 100+ auto-generated shelves drawn from real Gutenberg subjects/bookshelves (e.g. 'gothic-fiction', 'russian-literature', 'detective-fiction'). Returns a ranked list of books with book_id for drill-down. Full shelf catalog is discoverable free at https://library.forgemesh.io/llms.txt. Costs $0.005 via x402 (requires WALLET_PRIVATE_KEY, USDC on Base).
- **book_of_the_day** — Deterministic daily book pick from the indexed corpus, date-seeded so every caller gets the same answer on the same UTC day. Optional date override for backfill. Costs $0.005 via x402 (requires WALLET_PRIVATE_KEY, USDC on Base).

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "forgemesh-library-mcp": {
    "command": "npx",
    "args": ["-y","@forgemeshlabs/library-mcp"],
    "env": {
      "WALLET_PRIVATE_KEY": ""
    }
  }
}
```

**Requires environment variables:** `WALLET_PRIVATE_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What ForgeMesh Library MCP does

ForgeMesh Library MCP gives MCP-compatible agents access to a public-domain literature corpus. Its retrieval tools can locate passages across the corpus, find books by title or author, inspect metadata, retrieve chapter text, and return notable quotations. The service also includes curated subject shelves and a date-seeded book recommendation.

The `ask_book` tool provides a focused question-and-answer route for a hand-curated set of flagship works, including *Moby-Dick*, *The Republic*, *Sherlock Holmes*, *Pride and Prejudice*, and other major titles. It returns cited passages from the selected book. For books outside that set, agents can combine corpus search with metadata, chapter, or quote retrieval.

## How it works

The MCP package communicates with the hosted Library service. Tool calls use retrieval over an indexed collection of real book text; responses are not generated summaries. Payment is handled through x402: when a request receives an HTTP 402 challenge, the server signs a USDC authorization and retries the request. Settlement information may appear in the response under `_payment`.

Payments use USDC on Base mainnet. No account, subscription, or separate API key is needed. The corpus includes material drawn in part from Project Gutenberg, but the service is not affiliated with or endorsed by Project Gutenberg. Its catalog is growing, so agents should query the live index rather than rely on a fixed book count.

## Setup and configuration

Run the package with Node.js 20 or newer and a dedicated, low-balance Base wallet funded with USDC. A typical MCP configuration starts the package through `npx` and passes `WALLET_PRIVATE_KEY` in the server environment:

```json
{
  "mcpServers": {
    "library": {
      "command": "npx",
      "args": ["-y", "@forgemeshlabs/library-mcp"],
      "env": {
        "WALLET_PRIVATE_KEY": "0x..."
      }
    }
  }
}
```

Use a wallet dedicated to these payments rather than a primary wallet. The signer is restricted to the Library payee, Base mainnet, USDC, and the service's payment limits. `X402_MAX_PRICE_USD` and `X402_SESSION_BUDGET_USD` can reduce the per-call and session ceilings, but cannot raise them. The package supports Claude Desktop, Claude Code, and MCP clients that can launch a standard stdio server.

## Tools and capabilities

- `search_literature` searches the full corpus for passages from any indexed book.
- `search_books` finds books using title or author substrings.
- `get_book_metadata` returns title, author, year, subjects, shelves, and chapter range for a book ID.
- `get_chapter` retrieves the complete text of a selected chapter.
- `get_quotes` returns notable passages, with optional thematic filtering.
- `ask_book` answers questions about supported flagship books using cited passages.
- `browse_shelf` lists books from curated categories and subject shelves, including more than 100 auto-generated shelves.
- `book_of_the_day` selects a deterministic daily book based on the date.

The live service also publishes agent-readable `llms.txt`, OpenAPI, and x402 discovery documents. These expose the direct HTTP surface, route schemas, shelf catalog, and payment metadata for applications that do not use MCP.

## Limitations and notes

Tool calls are paid, and the service's displayed prices can change because the actual charge comes from the x402 challenge at request time. Requests time out after 60 seconds, are limited to 2 MB, and do not follow redirects. The server will not sign payments outside its approved payee, network, asset, or configured limits.

`ask_book` is limited to its hand-curated flagship titles. Other books require a search-based workflow. The corpus is public-domain material, and the service provides retrieval rather than LLM-generated interpretation or summarization. The full shelf catalog can be browsed without a paid tool call at the published Library endpoints.

_Full upstream README: https://allmcps.com/mcp/forgemesh-library-mcp/readme_

