Skip to content

Configuration

Vitor edited this page Dec 3, 2026 · 3 revisions

botticelli

Configuration

Status: the environment variables and the project config file botticelli.config.json are built (M1, M3a, M3b). The cookie variable and the Are.na token are planned.

In one minute

botticelli reads a few environment variables (a proxy, a timeout, a folder for learned endpoints and a folder for the cache) and one optional file, botticelli.config.json, for the default filters, the search size and the Library folder. Everything has a default, so you set none of them unless you need to.

Environment variables (built)

Variable Default What it does Defined in
BOTTICELLI_PROXY none HTTP(S) proxy URL for every Pinterest request. Wins over the standard variables src/sources/pinterest/transport.ts:14
HTTPS_PROXY, https_proxy, HTTP_PROXY, http_proxy none Used when BOTTICELLI_PROXY is empty, in this order src/sources/pinterest/transport.ts:14
BOTTICELLI_TIMEOUT_MS 20000 Longest wait for response headers, and longest silence between body chunks. Zero or a non-number falls back to the default. A negative value is not rejected today, so set a positive one src/sources/pinterest/transport.ts:18 (default at line 10)
BOTTICELLI_ENDPOINTS_FILE ~/.config/botticelli/endpoints.json Where learned Candidates are saved and read src/sources/pinterest/registry.ts:30
BOTTICELLI_CACHE_DIR ~/.cache/botticelli Root of the disk cache src/cache/disk.ts:45

An empty value counts as unset for all of them. ~ is the home directory of the user running the process.

Example:

BOTTICELLI_PROXY=http://127.0.0.1:8080 \
BOTTICELLI_TIMEOUT_MS=40000 \
BOTTICELLI_CACHE_DIR=/tmp/botticelli-cache \
npm run test:live

Project config file: botticelli.config.json

The server looks for botticelli.config.json in the folder it starts in (its working directory). With claude mcp add -s project, that is the project folder. A missing file means all defaults. The file is read once, when the server starts, so restart the server after you change it.

{
  "library": "./refs",
  "filters": {
    "minWidth": 600,
    "orientation": "portrait",
    "excludeLowRes": true,
    "media": "image",
    "blockDomains": ["etsy.com", "shutterstock.com"]
  },
  "search": { "limit": 24 }
}
Key Type Default What it does
library string, not empty <cwd>/refs Folder of the Library. A relative path is resolved against the working directory
filters.minWidth whole number above 0 none Drop refs narrower than this
filters.orientation any, portrait, landscape, square any Keep one orientation
filters.excludeLowRes boolean true Drop refs the Source marks low-res
filters.media any, image, video any Keep one kind of media. It is also sent to the Source with the search
filters.blockDomains string[] the built-in list of shops and stock sites Replaces that list
search.limit whole number, 1 to 100 24 How many refs search, related and collection return when the call has no limit. The Pinterest adapter's own defaults (20, and 25 for a board) apply only when you call it from code (Sources)

These are defaults. Filters passed in a search call override the file. See Tools.

The file is strict. An unknown key, at any level, is an error. This is on purpose: a cookie or a token has no place in it (Login uses a separate cookie file). A bad file stops the server at start. The message names the file and the key path ((root) for a key at the top), and never repeats your value:

[botticelli] botticelli.config.json: filters.minWidth: Too small: expected number to be >0
[botticelli] botticelli.config.json: (root): Unrecognized key: "cookie"

library is your own setting, so it may point outside the project (for example ../shared-refs). Everything the tools write still stays inside that folder. If you leave library out, the MCP server's save and moodboard refuse to run when the default refs/ folder is itself a symlink (a cloned repo could point it at a folder you did not mean to write to); a symlink at a path you set in library is allowed, because that path is your choice.

Options in code (built)

These are not environment variables. They are arguments to the functions, for scripts and tests.

Option Where Default
registryFile createPinterestSource({ registryFile }) BOTTICELLI_ENDPOINTS_FILE, then the path above
locale createPinterestSource({ locale }) en-US. Sent as Accept-Language
transport createPinterestSource({ transport }) undici fetch, through the proxy if set
dir, maxBytes, now createDiskCache({ … }) env or ~/.cache/botticelli, 200 MB, Date.now
maxBytes saveRef({ … }) 30 MB
configured libraryRoot({ cwd, configured }) <cwd>/refs. The server passes library from the config file

Planned

Status: planned. Names may change.

Setting Source Notes
BOTTICELLI_PINTEREST_COOKIE_FILE environment Path to a cookie file, chmod 600. See Login. M5
Are.na token variable environment Name not decided. M6

Troubleshooting / FAQ

I set BOTTICELLI_TIMEOUT_MS=0 and nothing changed. Zero and non-numbers fall back to 20000.

Which proxy wins? BOTTICELLI_PROXY, then HTTPS_PROXY, https_proxy, HTTP_PROXY, http_proxy.

Where is my configuration file? botticelli.config.json, in the folder the server starts in. It is optional. The server does not search parent folders.

I changed the file and nothing happened. The server reads it at start. Restart the server.

The server exits with [botticelli] botticelli.config.json: …. The file has bad JSON, an unknown key or a value out of range. The message names the key. Fix it and start again.

Can I change the Library folder? Yes. Set library in botticelli.config.json. The default is refs/ in the working directory.

Does the cache folder grow without limit? No. It holds at most 200 MB and prunes the oldest entries.

Clone this wiki locally