AI agents and MCP
AI agents and MCP
The Fabrica MCP server gives AI agents read-only access to the data behind the Fabrica protocol: tokenized properties, the lending market, account portfolios, protocol-wide statistics, parcel geometry, and map images. It implements the Model Context Protocol (MCP), the open standard that assistants and agent frameworks such as Claude, ChatGPT, and Cursor use to call external tools, so any MCP client that supports remote servers can connect to it.
It serves two audiences: people who use an AI assistant and want it to answer questions about Fabrica properties from live data, and developers building agents that reason over tokenized real property.
Everything the server exposes is public data already available through the Fabrica GraphQL API. No API key, account, or wallet is required, and the server never asks for one.
Hosted Endpoints
| Network | URL | Data |
|---|---|---|
| Ethereum mainnet | https://mcp.fabrica.land/mcp | Real US parcels. Responses carry a legal notice. |
| Sepolia testnet | https://mcp-testnet.fabrica.land/mcp | Test properties only. |
The network is fixed per URL: an agent connected to the testnet server cannot reach mainnet data, and vice versa. Add both as separate servers if you want to try things on testnet before mainnet.
The hosted server is stateless. Each request is served by a fresh server instance with no session, the transport is Streamable HTTP with JSON responses, and only POST is accepted (a GET returns 405). The hosted endpoints are deployed from the main branch of the public repository, so they track its current tool set.
Connecting
Claude (claude.ai and the desktop app): Settings, then Connectors, then Add custom connector, and paste the URL.
Claude Code:
claude mcp add --transport http fabrica https://mcp.fabrica.land/mcp
claude mcp add --transport http fabrica-testnet https://mcp-testnet.fabrica.land/mcpCursor (.cursor/mcp.json):
{
"mcpServers": {
"fabrica": { "url": "https://mcp.fabrica.land/mcp" }
}
}Any other client that supports remote MCP servers over Streamable HTTP is configured the same way.
Running Locally
The server also runs locally over stdio from a clone of the repository. It is not published to npm, so install from source (Node 20 or later):
git clone https://github.com/fabrica-land/fabrica-mcp.git
cd fabrica-mcp
npm install
npm run buildThen point your client at the built entry point. With Claude Code:
claude mcp add fabrica -- node /absolute/path/to/fabrica-mcp/dist/index.jsWith Claude Desktop (claude_desktop_config.json), here selecting Sepolia:
{
"mcpServers": {
"fabrica": {
"command": "node",
"args": ["/absolute/path/to/fabrica-mcp/dist/index.js"],
"env": { "FABRICA_NETWORK": "sepolia" }
}
}
}A local server connects to Ethereum mainnet unless told otherwise. All environment variables are optional:
| Variable | Default | Purpose |
|---|---|---|
FABRICA_NETWORK | ethereum | ethereum or sepolia |
FABRICA_API_URL | https://api.fabrica.land/graphql | Fabrica GraphQL API the tools read from |
FABRICA_METASTREET_SUBGRAPH_URL | selected per network | Subgraph the server reads lending-pool statistics from |
FABRICA_MEDIA_URL | https://media.fabrica.land | Media service that renders the map images |
What the Server Can and Cannot Do
Every tool is read-only. The server queries the public Fabrica GraphQL API (plus a lending-pool subgraph for pool statistics and the Fabrica media service for map images) and returns formatted results. It holds no keys, signs nothing, and cannot transfer a token, list a property, place a bid, or open or repay a loan. An agent that wants to act on what it learns has to do so through the application or directly against the smart contracts with the user's own account.
Mainnet legal notice. On the mainnet endpoint, the server's instructions tell the connected agent that Fabrica tokens represent real property in the United States with real legal consequences, and that before a user acquires any token the agent must inform them that (1) they will become the beneficial owner and trustee of a real property trust, (2) they may incur legal liabilities and tax obligations, and (3) they should review the trust instrument and operating agreement attached to the token, whose URL is included in property details. Property search, property detail, and protocol statistics responses on mainnet also carry a short legal notice. The testnet server states instead that its properties are for testing only, with no real-world legal or financial implications.
Default filters. Property searches and protocol statistics exclude burned tokens, premints (properties still being added), and tokens below a minimum confidence score (2,142 by default, which drops tokens that fail basic validation), together with a small set of known spam entries. The minScore input of search_properties overrides the default.
Errors. Tools return an error field with a plain-language message instead of raising. A property that does not exist is reported as such; a failure of the underlying API is reported as an API error carrying the API's own message, so an agent can tell the two apart. The county outline in get_property_map is an extra layer: if it cannot be fetched, the parcel geometry is still returned and the failure is listed under warnings.
Tool Reference
Eleven tools, all read-only. Inputs marked with an asterisk are required; every other input is optional. Property tools accept either a tokenId or the property slug from its Fabrica URL (for example us/nevada/elko-county/elko/apn-063025003).
| Tool | Inputs | Returns |
|---|---|---|
search_properties | region (US state code), minAcres, maxAcres, minScore, hasListings, hasLoans, ownedBy (account address), limit (default 20, max 100), offset | Matching properties with location, acreage, confidence score, estimated value, listing price, loan flag, owner, and property link |
get_property | tokenId or slug | Full detail: location, legal description and trust name, operating agreement URL, valuation with score breakdown and per-source pricing, ownership and holders, active loans and pool liquidity, active listings and bids, media, recent activity, parcel GeoJSON, and warnings for recovery, default, or liquidation status |
get_property_map | tokenId or slug, includeCountyBounds (default true) | GeoJSON FeatureCollection with the parcel boundary (or a point when no boundary exists) and the county outline |
get_property_image | tokenId or slug, theme (dark by default, or light), width, height (100 to 1280 pixels, default 640) | Inline static map image of the parcel boundary, or a pin when no boundary exists |
explain_confidence_score | tokenId or score | Digit-by-digit breakdown of the five verification groups against the 75,342 maximum, with the individual checks when a token is given |
get_lending_market | status (active, repaid, liquidated, all), borrower, lender, since (ISO date), limit | Market summary (loans by status, total volume, average APR), Fabrica lending pool statistics (value locked, in use, available, utilization, loan counts), matching loans with their terms, and the ten most recent loan events |
get_borrow_quote | tokenId or slug | Fabrica lending pool availability for the property (advertised maximum principal in USDC, subject to available pool liquidity, and available durations) and any active loan on it |
get_portfolio | address* | Properties held, lending positions as borrower and as lender, credit history, marketplace activity, and total portfolio value for an account |
get_portfolio_image | address*, theme, width, height | Inline static map with every property held by the account plotted as points |
get_activity | tokenId, slug, or address; type (for example loan, transfer, sale, mint); limit | Event timeline for a property or an account: mints, transfers, sales, loans started, repaid, or liquidated, and configuration changes |
get_protocol_stats | none | Protocol-wide figures: token count and estimated value, states represented, loan counts and volume, lending-pool statistics, active listings, and contract addresses |
Monetary values are formatted in US dollars where the source provides a dollar figure; loan principals are stated in the loan's currency (USDC). Each loan and lending event names its venue: pool loans read "Pool-based lending", and loans made through the former peer-to-peer integration are labeled as retired. Borrow quotes list only the Fabrica lending pool, since that integration has shut down (see Peer-to-Peer Lending). Loan counts are reported by status; the server does not publish an aggregate repayment rate. This table is derived from the server source and checked against the hosted endpoints; the tools/list response of the deployment you are connected to is authoritative.
Repository
The server is developed in the public repository github.com/fabrica-land/fabrica-mcp under the MIT license. The repository also holds a checked-in snapshot of the GraphQL schema that every query is validated against, so an upstream API change surfaces as a reviewable diff rather than a runtime failure.
Documentation server
https://docs.fabrica.land/mcp gives agents this documentation and the API reference. Add it the same way when an agent needs to answer questions about the protocol, the trust, or the API.
Other resources for agents
fabrica.land/llms.txt: a summary of Fabrica written for language models- GraphQL API at
https://api.fabrica.land/graphql: public, no API key, introspection enabled
Related
- Build on Fabrica, the permissionless primitives on which an agent's findings can be acted
- Confidence Scoring System, how to read the score that
explain_confidence_scoredecodes - Property Valuation and Price Oracle, where the estimated values come from
- Fabrica API Reference, the REST surface alongside the GraphQL API the server reads
Updated about 1 hour ago