# Alexandria knowledge tools through MCP

> Use Firecrawl's Alexandria data library from an MCP client, a coding agent, or the AnyRouter mini app.


# Alexandria knowledge tools through MCP

Alexandria is Firecrawl's library of structured data providers. An authenticated Firecrawl session can discover a capability, read its input contract, then run it. Sources cover job postings, people and company profiles, company financials, product prices, public records, and prediction markets such as Polymarket.

## What you need

A Firecrawl account on a team with Alexandria enabled, and an API key from that team. Keyless MCP sessions get only `firecrawl_search`, `firecrawl_scrape`, and `firecrawl_parse`; Alexandria tools are not listed and calls to them return `This tool needs a Firecrawl account`.

## Connect through AnyRouter

Add Firecrawl in **Dashboard → MCP Gateway** with your API key. The connection's tools appear at `https://anyrouter.dev/api/v1/mcp` with the `firecrawl__` namespace, so an agent pointed at that endpoint can use them alongside your other tools. See the [MCP gateway guide](/mcp/gateway) for connection steps.

A focused three-step flow works in any MCP client:

1. **Discover.** Call `firecrawl_search` with `{ "query": "…", "sources": ["alexandria"] }`. Results include matching tools with their provider, capability, and description.
2. **Inspect.** Call `alexandria_library_search` with a read-only command such as `cat /library/README.md`, then open the contract for the chosen capability. Discovery and library reads are free.
3. **Run.** Call `alexandria_library_read` with `calls`, an array of up to ten `{ provider, capability, options }` objects. Each result carries `data` or an `error` in the same order.

Recruiting agents can call `jobs_search` for open roles and `people_company_search` or `people_company_enrich` for profiles. Enrichment tries providers in price order and stops at the first hit; set `max_credits` to cap a call.

## Try it in the browser

The [Alexandria mini app](/apps/alexandria) runs the same MCP calls through AnyRouter's same-origin proxy. Paste your own Firecrawl key to try capability discovery, recruiting searches, or a public Polymarket query. The key stays in page memory: the app sends it only as the upstream bearer to Firecrawl, never in a URL, a log, or browser storage.

## Raw API shape

The documented SDK and REST path also accepts an `alexandria` object on `/v2/scrape`. This older shape still works, but new integrations should use the two library tools above.

```
curl https://api.firecrawl.dev/v2/scrape \
  -H "Authorization: Bearer $FIRECRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "alexandria": {
      "provider": "polymarket",
      "capability": "markets/list",
      "options": { "limit": 5 }
    }
  }'
```

## Cost and provider terms

Discovery is free. Each execution costs the price listed on its tool, billed to the Firecrawl account. Some Firecrawl indexes are free and share per-minute and daily limits. If a provider returns `THIRD_PARTY_DATA_TERMS_REQUIRED`, an organization admin must accept the terms at the `requiresAction.url` before the call can succeed.


## Related

- [AnyRouter MCP Overview](/docs/mcp.md)
- [MCP Gateway — connect your tools once](/docs/mcp/gateway.md)
- [AnyRouter MCP with Claude Code](/docs/mcp/claude-code.md)
- [MCP API Reference](/docs/api-reference/mcp.md)
