Evictions API

For AI agents

Evictions API has an MCP server, so an AI agent can read about the service and work with eviction cases for the person it is helping.

Start with a prompt

Paste this into your AI agent to give it Evictions API. It tells the agent where to connect and what to ask you first.

Starter prompt for your agent
You can use Evictions API to look up the published eviction facts of each US state, see what a case costs, and start and track an eviction case for a rental property of mine in any US state or DC.
To use it, connect to https://evictionsapi.com/mcp as an MCP server (Streamable HTTP); the setup for each client is in https://evictionsapi.com/docs/agents.md.
The tools that work with cases need my account: ask me to sign in when the client prompts, or use the API key I give you.
Before you submit or withdraw a real case, ask me, and never fill in a case’s attestations yourself: they are my own statements.
Evictions API is not a law firm and does not give legal advice.

What an agent can do

An agent connected to Evictions API can say what the service is and what it costs, look up the facts published for a state, and, with the person’s API key, create a draft case from the facts the person gives, check it, submit it, follow its state, read and send its messages and get the link where the person pays. It can also send the person’s files: evictions_add_case_document adds a document to a draft case, and evictions_send_intake_file sends a file, before any case exists, to the person’s inbox, where they start the case from it. After you submit a case, we engage a licensed attorney in the property’s state for it and confirm by email. Nothing is served on a tenant or filed in court until that attorney has reviewed the case.

Evictions API is operated by Future Cities LLC. It is not a law firm and does not give legal advice.

The MCP server

The server speaks the Model Context Protocol over Streamable HTTP at one address. The tools that describe the service need no key. The tools that work with cases need the person’s account: in Claude and ChatGPT the person signs in when the client asks and approves access to the organization’s real cases (an owner of the organization can) or, for developer testing, a test key; other MCP clients send the person’s API key as Authorization: Bearer eak_....

Signing in gives the app the same access as an API key: a live key for your organization’s real cases if you are an owner of it, or a test key for developer testing on fictional cases. It can work with your cases, and it can also create and revoke API keys and add webhook endpoints. The key is named on the API keys page for the app, where it sends you back and who approved it. Connecting the same app again replaces its earlier key. To remove its access, revoke its key on the API keys page of your account.

MCP server URL
https://evictionsapi.com/mcp

Test keys are free, for developers trying the API: fictional cases in the fictional state ZZ. A person gets one by signing up; the evictions_get_started tool gives an agent the same link.

Set up a client

Each client is set up once, with the URL above.

Claude

  1. On the web or in the desktop app, open Customize, then Connectors. On a Team or Enterprise plan an owner adds the connector under Organization settings, then Connectors.
  2. Choose Add custom connector, give it a name and paste the server URL: https://evictionsapi.com/mcp. Under Authentication choose Sign in when needed, even if Claude suggests No sign-in, and keep the recommended OAuth client.
  3. The tools that need no key work right away. The first time Claude uses a tool that works with cases, it asks you to connect: sign in to Evictions API and approve access to your real cases (or, for developer testing, a test key). Claude then repeats the call.

Claude Code

  1. Run this in a terminal.
  2. Inside Claude Code, run /mcp, choose evictions-api and sign in to Evictions API in the browser when it asks, to use the tools that work with cases. The tools that need no key work without signing in.
  3. To use a key instead of signing in, add --header "Authorization: Bearer eak_test_..." to the command.
Add the server to Claude Code
claude mcp add --transport http evictions-api https://evictionsapi.com/mcp

ChatGPT

  1. In ChatGPT’s settings, turn on Developer mode. It is offered on paid plans.
  2. Create an app for an MCP server: give it a name, paste https://evictionsapi.com/mcp as the server URL and choose OAuth as the authentication.
  3. ChatGPT then asks you to sign in to Evictions API: sign in and approve access to your real cases (or, for developer testing, a test key). Every tool then works in ChatGPT.

Cursor

  1. Put this in .cursor/mcp.json in a project, or in ~/.cursor/mcp.json for every project. Leave headers out to use only the tools that need no key.
  2. Keep a real key out of a file you commit.
.cursor/mcp.json
{
  "mcpServers": {
    "evictions-api": {
      "url": "https://evictionsapi.com/mcp",
      "headers": {
        "Authorization": "Bearer eak_test_..."
      }
    }
  }
}

VS Code

  1. Put this in .vscode/mcp.json in a workspace. VS Code asks for the key the first time the server starts and stores it; the key is not written into the file.
  2. Leave headers and inputs out to use only the tools that need no key.
.vscode/mcp.json
{
  "servers": {
    "evictions-api": {
      "type": "http",
      "url": "https://evictionsapi.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:evictions-api-key}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "evictions-api-key",
      "description": "Evictions API key (eak_test_...)",
      "password": true
    }
  ]
}

Tools

Every result for a case carries its state and nextAction, which say who the case is waiting on and for what.

For a property manager, evictions_list_landlords lists the owners the organization acts for, as saved in the app; an owner’s landlordId passed to evictions_create_case opens the case for that owner with its saved management agreement attached, and passed to evictions_list_cases lists that owner’s cases. Owners are real people and companies, so this needs live access: with a test key the list is empty and a test case cannot take an owner.

ToolWhat it doesAPI key
evictions_get_service_overviewUse this when the person asks what Evictions API is, what is available today, how a real case is handled or who operates it. Takes no input. Returns the service’s description, its current status and who operates it, in the site’s own words, with links to the home and how-it-works pages. Do not use this for fees (use evictions_get_pricing) or for one state’s rules (use evictions_get_state_eviction_facts). No key needed.Not needed
evictions_get_pricingUse this when the person asks what a case costs or about refunds. Takes no input. Returns the platform fee, the costs that are separate from it and the refund rule, word for word as the pricing page says them, with its link. Do not use this for the charges already on a case (use evictions_list_case_charges). No key needed.Not needed
evictions_list_statesUse this when you need every place the service covers, or the exact code or slug of a state. Takes no input. Returns the 50 states and DC, each with its two-letter code, name, slug and page on the site. Do not use this for one state’s eviction rules (use evictions_get_state_eviction_facts). No key needed.Not needed
evictions_get_state_eviction_factsUse this when the person asks how eviction works in one state, such as the notice for nonpayment of rent or the court. Input: state, as a two-letter code, a name or a slug. Returns the page’s opening answer and only the facts published as verified and sourced for that state, each with its citation, source link, the date it was checked and a short quote of the cited text where there is one (a fact checked more than 90 days ago is left out), plus the state’s page and a notice that this is general information, not legal advice; a state with none says so. Do not use this for whether a case can be opened at an address (use evictions_resolve_jurisdiction) or for advice on a particular case. No key needed.Not needed
evictions_get_startedUse this when the person has no account or key yet, or asks how to connect an agent. Takes no input. Returns the sign-up link, what test and live keys are, how this MCP server is reached and signed in to, and the links to the docs and the OpenAPI document. Do not use this to check a key the person already has: any tool that works with cases says so when its key is missing or refused. No key needed.Not needed
evictions_resolve_jurisdictionUse this when you need to know, before creating a case, whether a case can be opened for a property’s location and which facts each ground of eviction needs there. Input: state, and county and city when known. Returns whether the jurisdiction is served and, for each ground, the facts a case needs, and with a test key also the notice rules of the fictional state ZZ. Do not use this for a state’s published facts with their sources (use evictions_get_state_eviction_facts, which needs no key). Next: evictions_create_case. Needs the person’s account: sign-in or an API key.Needed
evictions_create_caseUse this when the person wants to start an eviction case and has given you its facts: the ground, where the case starts, the property, the parties and their own attestations. Creates a draft case in the person’s account. Nothing is submitted. The result’s handling says how the case is handled; the property’s place decides. For agent_filed, the person finishes it in the app (facts, authorization, card) before it is submitted. Add its documents with evictions_add_case_document. Pass an idempotencyKey and reuse it if you repeat the call, so a retry never makes a second case. For a property manager, landlordId (from evictions_list_landlords) names the owner the case is for and adds its saved management agreement to the case. Do not use this to change a case that already exists (use evictions_update_case). The result is the case, with state and nextAction (who it is waiting on and for what). Next: evictions_validate_case. Needs the person’s account: sign-in or an API key.Needed
evictions_update_caseUse this when a draft’s facts need correcting or completing, for example after evictions_validate_case says what is missing. Input: the case id and only the fields to change; each one replaces the stored value, and an object such as property is replaced whole. Works only on a draft, and ground and entryPoint cannot change (create a new case instead). Do not use this on a submitted case (use evictions_send_case_message to tell the team what changed). The result is the case, with state and nextAction (who it is waiting on and for what). Next: evictions_validate_case. Needs the person’s account: sign-in or an API key.Needed
evictions_get_caseUse this when you need one case in full: where it stands and what it is waiting on. Input: the case id. Returns its facts, deadlines, documents and, for a live case, the attorney once recorded. Do not use this to find a case whose id you do not have (use evictions_list_cases) or for its history (use evictions_get_case_events). The result is the case, with state and nextAction (who it is waiting on and for what). Needs the person’s account: sign-in or an API key.Needed
evictions_list_casesUse this when you need the person’s cases, or the id of a case you do not have. Input: optional limit and cursor, and landlordId for only one landlord’s cases (none for the cases with no landlord). Returns the cases of the key’s organization and mode (test or live), newest first, a page at a time, each with its state and nextAction, and nextCursor for the next page (null on the last). Do not use this when you already have the case id (use evictions_get_case). Needs the person’s account: sign-in or an API key.Needed
evictions_list_landlordsUse this when the person is a property manager and you need the owner a case is for, or to list one owner’s cases. Input: optional includeArchived. Returns the organization’s landlords (the owners it acts for, saved in the app), by name, each with its id, name, whether it is archived and how many cases in this mode name it; their contact details stay in the app. Live keys only: with a test key the list is always empty, since landlords are real owners, and a test case cannot take one. Do not use this to add or change a landlord (the person does that on the Landlords page of the app). Next: evictions_create_case with landlordId, or evictions_list_cases with landlordId. Needs the person’s account: sign-in or an API key.Needed
evictions_validate_caseUse this when a draft looks complete, before asking the person to confirm its submission. Input: the case id. Runs the submission checks on a draft and returns each check’s result, with the reason when it does not pass, and whether all passed; missing names what is still needed (with, for an item that was looked for in the person’s documents and not found, a sentence in missingReasons saying why and what to do), and filledFromDocuments names the answers that were read from the person’s uploaded documents, to check with the person. Changes nothing. Do not use this to submit (use evictions_submit_case). Next: evictions_update_case to fill a gap, or the person’s yes and then evictions_submit_case. Needs the person’s account: sign-in or an API key.Needed
evictions_submit_caseUse this when the person has said yes to submitting a draft that passes every check. Input: the case id and confirmedByPerson. A live case is submitted when its platform fee is paid: until then this answers payment_required with the charge (chargeId) and it stays a draft. Once the person pays (evictions_get_payment_link), it moves to submitted and a licensed attorney in the property’s state is engaged for it; nothing is served or filed until that attorney has reviewed it. An agent_filed case is refused until the person finishes it in the app (facts, authorization, card). A test case is fictional, its review simulated. With a live key this acts on a real case. Confirm with the person first, then pass confirmedByPerson: true. The case’s attestations must be the person’s own statements; never fill them in yourself. Do not use this to check a draft (use evictions_validate_case). Returns the case and its check results. Needs the person’s account: sign-in or an API key.Needed
evictions_get_case_eventsUse this when the person asks what has happened on a case so far. Input: the case id. Returns the events the person may see, oldest first, each with what happened, the state before and after, and when. Do not use this for where the case stands now (use evictions_get_case) or for messages (use evictions_list_case_messages). Needs the person’s account: sign-in or an API key.Needed
evictions_list_case_chargesUse this when the person asks what they owe on a case or whether a charge is paid. Input: the case id. Returns the charges on a case, oldest first, each with its id, kind, amount in cents and status (due, paid, void or refunded), and whether online payment is available. Do not use this for the published prices (use evictions_get_pricing). Next: evictions_get_payment_link for a due charge. Needs the person’s account: sign-in or an API key.Needed
evictions_get_payment_linkUse this when the person wants to pay a due charge on a case, or after evictions_submit_case answered payment_required. Input: the case id and the chargeId from that answer or from evictions_list_case_charges. Opens a hosted checkout for one due charge and returns its URL; asked again while that checkout is open, it returns the same URL. Give the URL to the person: paying is theirs to do, and no tool takes card details. Paying a draft’s platform fee submits the case: it moves to submitted when the payment arrives. Refused when the charge is not due or online payment is off, and, with authorization_required, until the person has signed the case’s authorization for us to act as their agent: then give the person the case page link in the error’s details (signAt), where they read and sign it themselves, and ask again. Do not use this to see whether a charge is paid (use evictions_list_case_charges). Needs the person’s account: sign-in or an API key.Needed
evictions_list_case_messagesUse this when the person asks whether the Evictions API team has written about a case, or before writing to it. Input: the case id. Returns the messages on a case, the person’s own and the team’s, oldest first, each with its author, text and time. Do not use this for the case’s events (use evictions_get_case_events). Next: evictions_send_case_message to reply. Needs the person’s account: sign-in or an API key.Needed
evictions_send_case_messageUse this when the person asks you to write to the Evictions API team about one of their live cases. Input: the case id and body. Sends the team a message about a live case, in the person’s name, and the team is told by email. Send only what the person asked to say. Each call sends one more message; a test case is refused, and an organization can send at most 20 every 10 minutes. Returns the message as stored. Do not use this to change a draft (use evictions_update_case). Needs the person’s account: sign-in or an API key.Needed
evictions_withdraw_caseUse this when the person has decided to withdraw a case and stop it. Input: the case id and confirmedByPerson. A live case with an attorney already engaged goes on hold instead and is withdrawn once the attorney has confirmed that all work has stopped. With a live key this acts on a real case. Confirm with the person first, then pass confirmedByPerson: true. Do not use this to report that the tenant has paid or to ask a question (use evictions_send_case_message). The result is the case, with state and nextAction (who it is waiting on and for what). Needs the person’s account: sign-in or an API key.Needed
evictions_add_case_documentUse this when the person asks you to add a document to a draft case: the lease, the tenant ledger, emails or messages with the tenant, proof that they own or manage the property, or a notice already served and its proof of service. Input: the case id, filename, purpose and contentBase64 (a PDF, JPEG or PNG of about 700 KB at most through this server; a file up to 4 MB goes through POST /v1/cases/{id}/documents with the person’s key). Adds the document to the case; each call adds one more, but a repeat with the same idempotencyKey is safe (it returns the first answer). Works on a draft; after a live case is submitted, only a document with the purpose other can be added. Returns the document as stored. Do not use this when no case exists yet (use evictions_send_intake_file) or to change the case’s facts (use evictions_update_case). Next: evictions_validate_case. Needs the person’s account: sign-in or an API key.Needed
evictions_send_intake_fileUse this when the person asks you to send a file (their lease, the tenant ledger, emails or messages with the tenant) to Evictions API before a case exists. Input: filename, contentBase64 (a PDF, JPEG or PNG of about 700 KB at most through this server; a file up to 4 MB goes through POST /v1/intake/files with the person’s key) and optionally purpose and a short note. The file waits in the person’s inbox, where they start a case from it. Needs a live key: with a test key, create a test case and use evictions_add_case_document. Returns the file’s id, its type, the purpose guessed for it and when it leaves the inbox if no case is started from it. Each call sends one more file, but a repeat with the same idempotencyKey is safe (it returns the first answer). Do not use this when the case already exists (use evictions_add_case_document), and do not create the case yourself: the person starts it from the inbox. Needs the person’s account: sign-in or an API key.Needed

Acting for a person

An agent with a key acts for the person the key belongs to. A live key can be created only by an owner of the organization, signed in on the site, and giving it to an agent, or approving an agent’s sign-in for real cases, is that person’s authorization for the agent to act on real cases. A test key, for developers trying the API, acts only on fictional cases in the fictional state ZZ.

  • Confirm with the person before calling evictions_submit_case or evictions_withdraw_case with a live key: both act on a real case.
  • A case’s attestations are the person’s own statements. An agent passes on what the person has confirmed and never fills them in itself.
  • Paying is the person’s to do. evictions_get_payment_link returns the address of a hosted checkout for the person to open; no tool takes card details.
  • A live case is submitted when its platform fee is paid. evictions_submit_case answers payment_required with the charge, evictions_get_payment_link returns the checkout for that charge, and the case moves to submitted when the person’s payment arrives. Before that it is a draft.
  • A file the person asks you to send goes onto a draft case with evictions_add_case_document or, before a case exists, into the person’s inbox with evictions_send_intake_file, where the person starts the case from it. Send only the files the person asked you to send.

After you submit a case, we engage a licensed attorney in the property’s state for it and confirm by email. Nothing is served on a tenant or filed in court until that attorney has reviewed the case.

The REST API instead

Everything the tools with a key do is one call to the REST API, which an agent that can make HTTP requests can use directly. The quickstart takes a test case from a key to closed, the API reference has every endpoint, and the same reference is in machine-readable form as the OpenAPI document. A short description of the site for a model is at /llms.txt.