mcpField
C
crowntowncompost-mcp

crowntowncompost-mcp

Local
github.com/chrischallOther0Updated 5d ago

About crowntowncompost-mcp

crowntowncompost-mcp connects customers to the Crown Town Compost portal for service, billing, and account tasks. It can read collection information and invoices, and changes require confirmation.

Key features

  1. 01View account and subscription details
  2. 02Check pickup schedules and service history
  3. 03List upcoming collections and invoices
  4. 04Skip service or report missed pickups
  5. 05Update account and contact support

Use cases

  1. 01Check the next pickup day and time window
  2. 02Review past collections and invoice status
  3. 03Skip an upcoming collection
  4. 04Report a missed pickup to the provider

MCP support

It exposes Crown Town Compost portal data and account actions as MCP tools. Reads and confirmation-gated writes use the portal’s pages and JSON endpoints, authenticated with a session cookie or portal credentials.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"chrischall-crowntowncompost": {
"command": "npx",
"args": [
"-y",
"crowntowncompost-mcp"
],
"env": {
"CROWNTOWN_SESSION_COOKIE": "<CROWNTOWN_SESSION_COOKIE>",
"CROWNTOWN_USERNAME": "<CROWNTOWN_USERNAME>",
"CROWNTOWN_PASSWORD": "<CROWNTOWN_PASSWORD>",
"CROWNTOWN_SESSION_CACHE": "<CROWNTOWN_SESSION_CACHE>",
"CROWNTOWN_SESSION_FILE": "<CROWNTOWN_SESSION_FILE>"
}
}
}
}
Run commandnpx -y crowntowncompost-mcp
Environment variables to set
CROWNTOWN_SESSION_COOKIESecretA Cookie header from an already-signed-in portal session ("sessionid=...; csrftoken=..."). Supply this and no password is needed — the login is skipped entirely.
CROWNTOWN_USERNAMEYour portal.crowntowncompost.com username or email address. Needed only if you are not supplying CROWNTOWN_SESSION_COOKIE.
CROWNTOWN_PASSWORDSecretYour Crown Town Compost customer-portal password. Needed only if you are not supplying CROWNTOWN_SESSION_COOKIE.
CROWNTOWN_SESSION_CACHESet to false to disable the on-disk session cache and re-authenticate on every process start. Defaults to enabled.
CROWNTOWN_SESSION_FILEAbsolute path for the session cache file. Defaults to $MCP_DATA_DIR/.crowntowncompost-mcp/session.json.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmcrowntowncompost-mcp1.1.7

Tools

11

Saved tool list · updated 2w ago

This tool takes no parameters.

Details

From the project README

crowntowncompost-mcp

MCP server for the Crown Town Compost customer portal — check your pickups, invoices, and upcoming collection days, skip a service, report a missed pickup, and update your account, all in natural language.

Developed and maintained by AI (Claude Code). Use at your own discretion.

What it talks to

crowntowncompost.com is a marketing site with no customer data. Everything lives at portal.crowntowncompost.com, a Django app (a white-labeled StopSuite hauler platform). This server authenticates server-side with a session cookie you already hold, or with your own portal username and password — a normal form login that returns one — and reads the same pages and JSON endpoints the website uses. No browser extension, no bot-wall workaround, no third-party service in the middle.

Install

npm install -g crowntowncompost-mcp

Then add it to your MCP host. Two configurations work — supply either a session cookie you already hold (nothing else needed), or the login pair so the server can mint one:

{
  "mcpServers": {
    "crowntowncompost": {
      "command": "npx",
      "args": ["-y", "crowntowncompost-mcp"],
      "env": {
        "CROWNTOWN_USERNAME": "[email protected]",
        "CROWNTOWN_PASSWORD": "your-portal-password"
      }
    }
  }
}

To use a session cookie instead, set CROWNTOWN_SESSION_COOKIE to a Cookie header value from a signed-in browser session (sessionid=…; csrftoken=…) and leave the username and password unset. The portal login is then never run, and no password is stored anywhere.

Setting both is also valid, and is the most robust configuration: the cookie is used first, and when the portal eventually expires it the login quietly mints a replacement. With a cookie alone, an expired session is reported as expired — the server says so plainly rather than claiming nothing is configured.

Locally you can instead copy .env.example to .env. The server boots without credentials (so a host's install-time probe succeeds); the configuration error surfaces on the first tool call.

Tools

Reads
ToolWhat it returns
crowntown_healthcheckWhether credentials work, plus account status; on failure error.kind says which hop broke (no_credential, credential_rejected, session_expired, edge_blocked, timeout, transport, http)
crowntown_get_dashboardAccount status, subscription (plan, price, renewal date), next service date, service addresses + pickup days, and your environmental impact
crowntown_get_accountContact details and notification preferences
crowntown_get_pickup_schedulePickup day(s) and time window per address — the official set-out-by time plus an observed arrival window (earliest/latest/typical, consistent vs varies) derived from your collection history
crowntown_list_service_historyPast collection stops — date, outcome, time, weight, services. Paginated; filter by success/missing/empty/inaccessible/unacceptable
crowntown_list_upcoming_servicesUpcoming collection days, each with the ids needed to skip it
crowntown_list_invoicesBilling history with amounts, status, and Stripe payment links
Writes (all confirmation-gated)
ToolWhat it does
crowntown_skip_serviceSkip or un-skip an upcoming collection day
crowntown_update_accountUpdate contact details / notification preferences
crowntown_report_missed_pickupReport that a collection was missed
crowntown_contact_supportSend a message to customer support

Every mutating tool asks you to confirm before it writes anything. A client that can show a confirmation prompt (Claude Code) gets that prompt (unless MCP_CONFIRM_ELICITATION=off). Elsewhere (claude.ai, Claude Desktop) the first call sends nothing and returns status: "confirmation-required" with a preview of exactly what would be sent plus a confirmToken; only a repeat call with the same arguments and that token proceeds. The token works once, expires, and is refused (DRAFT_CHANGED) if what would be sent changed in between — including values the tool reads first, such as the account form crowntown_update_account re-saves or the reply-to email/phone the support form pre-fills. Where a re-read can prove the change stuck (skips, account updates) the tool re-reads and reports verified; where it can't (support messages, missed-pickup reports) it says so rather than claiming success.

Confirmations
variabledefault
MCP_CONFIRM_MODEask-userWhat a write does on a client that cannot show a confirmation prompt (claude.ai, Claude Desktop). ask-user: two steps — the first call does nothing and returns a preview plus a token, and the model must get your approval in chat before calling again with it. auto: the same two steps, but the model may use the token after reviewing the preview itself. refuse: writes are refused on such clients. A client that can show prompts (Claude Code) always gets the real prompt, unless MCP_CONFIRM_ELICITATION=off. An unrecognised value is treated as refuse.
MCP_CONFIRM_ELICITATIONonoff never shows a confirmation prompt, so every client gets the MCP_CONFIRM_MODE behaviour. Set it for a client that says it can show prompts but never does (the write hangs — opencode 2.0.x). Any other value is treated as on, with a warning on stderr.
MCP_CONFIRM_TTL_SECONDS600How long a token stays valid.
MCP_CONFIRM_SECRETrandom per processSigning key; set it only if tokens must survive a server restart.

Payments are deliberately out of scope — crowntown_list_invoices returns the hosted invoice URL for you to open in a browser.

Without the MCP

The skills/crowntown-portal skill does the same things with curl in a shell — useful in scripts or on a machine where this server isn't installed. It documents the Django CSRF handshake, both JSON endpoints, and every write's field list.

Development

npm install
npm run build
npm test

Tests mock the network — no credentials needed and nothing hits the live portal. tests/server-boot.test.ts spawns the real built artifacts (the npm bin and the bundle, the latter without node_modules) and runs the MCP handshake against them.

Endpoint shapes are documented in docs/CROWNTOWN-API.md, including which parts are live-verified and which are not.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.