diff --git a/README.md b/README.md index eb882e0..a8be99d 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,11 @@ mcp_servers: - "openherbarium-mcp" timeout: 120 connect_timeout: 60 + env: + FIRECRAWL_API_URL: "http://localhost:3002" + FIRECRAWL_API_KEY: "" + BOTANICAL_ALLOWED_DOMAINS: "gbif.org,powo.science.kew.org,missouribotanicalgarden.org,tela-botanica.org,inpn.mnhn.fr,rhs.org.uk,edu,wikimedia.org,wikipedia.org" + OPENHERBARIUM_TIMEOUT: "20" ``` Restart Hermes Agent after editing `~/.hermes/config.yaml`. @@ -176,7 +181,13 @@ Hermes JSON-style snippet: "openherbarium-mcp" ], "timeout": 120, - "connect_timeout": 60 + "connect_timeout": 60, + "env": { + "FIRECRAWL_API_URL": "http://localhost:3002", + "FIRECRAWL_API_KEY": "", + "BOTANICAL_ALLOWED_DOMAINS": "gbif.org,powo.science.kew.org,missouribotanicalgarden.org,tela-botanica.org,inpn.mnhn.fr,rhs.org.uk,edu,wikimedia.org,wikipedia.org", + "OPENHERBARIUM_TIMEOUT": "20" + } } } } @@ -199,8 +210,20 @@ Generic `mcp.json` snippet used by many MCP clients: } ``` -If your client supports environment variables in MCP server definitions, you can -enable targeted Firecrawl search like this: +The MCP is configured through environment variables passed by the MCP client. +This lets you change endpoints and timeouts directly in `config.yaml`, `mcp.json` +or your client's MCP settings screen, without modifying the repository. + +Available parameters: + +| Environment variable | Required | Default | Purpose | +|---|---:|---|---| +| `FIRECRAWL_API_URL` | No | unset | Local Firecrawl base URL. Enables `search_botanical_sources` and richer source search in care/species tools. | +| `FIRECRAWL_API_KEY` | No | unset | Optional bearer token if your Firecrawl instance requires authentication. | +| `BOTANICAL_ALLOWED_DOMAINS` | No | built-in allow-list | Comma-separated source domains used to constrain targeted botanical searches. | +| `OPENHERBARIUM_TIMEOUT` | No | `20` | HTTP timeout in seconds for public APIs and Firecrawl calls. | + +Generic JSON example with all configurable parameters: ```json { @@ -214,7 +237,9 @@ enable targeted Firecrawl search like this: ], "env": { "FIRECRAWL_API_URL": "http://localhost:3002", - "FIRECRAWL_API_KEY": "" + "FIRECRAWL_API_KEY": "", + "BOTANICAL_ALLOWED_DOMAINS": "gbif.org,powo.science.kew.org,missouribotanicalgarden.org,tela-botanica.org,inpn.mnhn.fr,rhs.org.uk,edu,wikimedia.org,wikipedia.org", + "OPENHERBARIUM_TIMEOUT": "20" } } } @@ -261,6 +286,11 @@ mcp_servers: - "openherbarium-mcp" timeout: 120 connect_timeout: 60 + env: + FIRECRAWL_API_URL: "http://localhost:3002" + FIRECRAWL_API_KEY: "" + BOTANICAL_ALLOWED_DOMAINS: "gbif.org,powo.science.kew.org,missouribotanicalgarden.org,tela-botanica.org,inpn.mnhn.fr,rhs.org.uk,edu,wikimedia.org,wikipedia.org" + OPENHERBARIUM_TIMEOUT: "20" ``` Restart Hermes Agent. Tools will be exposed with names similar to: @@ -272,9 +302,10 @@ Restart Hermes Agent. Tools will be exposed with names similar to: - `mcp_openherbarium_get_image_sources` - `mcp_openherbarium_search_botanical_sources` -## Firecrawl configuration +## `.env` fallback for manual/local runs -Copy `.env.example` to `.env` and set: +For direct local execution outside an MCP client, you can also copy `.env.example` +to `.env` and set the same parameters there: ```bash FIRECRAWL_API_URL=http://localhost:3002 diff --git a/examples/claude-desktop-mcp.json b/examples/claude-desktop-mcp.json index 2946499..85cc0b7 100644 --- a/examples/claude-desktop-mcp.json +++ b/examples/claude-desktop-mcp.json @@ -8,7 +8,13 @@ "openherbarium-mcp" ], "timeout": 120, - "connect_timeout": 60 + "connect_timeout": 60, + "env": { + "FIRECRAWL_API_URL": "http://localhost:3002", + "FIRECRAWL_API_KEY": "", + "BOTANICAL_ALLOWED_DOMAINS": "gbif.org,powo.science.kew.org,missouribotanicalgarden.org,tela-botanica.org,inpn.mnhn.fr,rhs.org.uk,edu,wikimedia.org,wikipedia.org", + "OPENHERBARIUM_TIMEOUT": "20" + } } } } diff --git a/examples/cursor-mcp.json b/examples/cursor-mcp.json index 2946499..85cc0b7 100644 --- a/examples/cursor-mcp.json +++ b/examples/cursor-mcp.json @@ -8,7 +8,13 @@ "openherbarium-mcp" ], "timeout": 120, - "connect_timeout": 60 + "connect_timeout": 60, + "env": { + "FIRECRAWL_API_URL": "http://localhost:3002", + "FIRECRAWL_API_KEY": "", + "BOTANICAL_ALLOWED_DOMAINS": "gbif.org,powo.science.kew.org,missouribotanicalgarden.org,tela-botanica.org,inpn.mnhn.fr,rhs.org.uk,edu,wikimedia.org,wikipedia.org", + "OPENHERBARIUM_TIMEOUT": "20" + } } } } diff --git a/examples/generic-mcp.json b/examples/generic-mcp.json index 2946499..85cc0b7 100644 --- a/examples/generic-mcp.json +++ b/examples/generic-mcp.json @@ -8,7 +8,13 @@ "openherbarium-mcp" ], "timeout": 120, - "connect_timeout": 60 + "connect_timeout": 60, + "env": { + "FIRECRAWL_API_URL": "http://localhost:3002", + "FIRECRAWL_API_KEY": "", + "BOTANICAL_ALLOWED_DOMAINS": "gbif.org,powo.science.kew.org,missouribotanicalgarden.org,tela-botanica.org,inpn.mnhn.fr,rhs.org.uk,edu,wikimedia.org,wikipedia.org", + "OPENHERBARIUM_TIMEOUT": "20" + } } } } diff --git a/examples/hermes-mcp.json b/examples/hermes-mcp.json index 62d45f9..793d78f 100644 --- a/examples/hermes-mcp.json +++ b/examples/hermes-mcp.json @@ -8,7 +8,13 @@ "openherbarium-mcp" ], "timeout": 120, - "connect_timeout": 60 + "connect_timeout": 60, + "env": { + "FIRECRAWL_API_URL": "http://localhost:3002", + "FIRECRAWL_API_KEY": "", + "BOTANICAL_ALLOWED_DOMAINS": "gbif.org,powo.science.kew.org,missouribotanicalgarden.org,tela-botanica.org,inpn.mnhn.fr,rhs.org.uk,edu,wikimedia.org,wikipedia.org", + "OPENHERBARIUM_TIMEOUT": "20" + } } } } diff --git a/examples/hermes-openherbarium-uvx.yaml b/examples/hermes-openherbarium-uvx.yaml index aa6facf..80d20fe 100644 --- a/examples/hermes-openherbarium-uvx.yaml +++ b/examples/hermes-openherbarium-uvx.yaml @@ -8,7 +8,11 @@ openherbarium: - "openherbarium-mcp" timeout: 120 connect_timeout: 60 - # Optional, only needed for targeted source search: - # env: - # FIRECRAWL_API_URL: "http://localhost:3002" - # FIRECRAWL_API_KEY: "" + env: + # Optional: enable targeted botanical source search through your local Firecrawl. + FIRECRAWL_API_URL: "http://localhost:3002" + FIRECRAWL_API_KEY: "" + + # Optional: tune source filtering and HTTP timeout without editing code. + BOTANICAL_ALLOWED_DOMAINS: "gbif.org,powo.science.kew.org,missouribotanicalgarden.org,tela-botanica.org,inpn.mnhn.fr,rhs.org.uk,edu,wikimedia.org,wikipedia.org" + OPENHERBARIUM_TIMEOUT: "20" diff --git a/examples/local-dev-mcp.json b/examples/local-dev-mcp.json index 9556a19..642a6a7 100644 --- a/examples/local-dev-mcp.json +++ b/examples/local-dev-mcp.json @@ -9,7 +9,13 @@ "openherbarium-mcp" ], "timeout": 120, - "connect_timeout": 60 + "connect_timeout": 60, + "env": { + "FIRECRAWL_API_URL": "http://localhost:3002", + "FIRECRAWL_API_KEY": "", + "BOTANICAL_ALLOWED_DOMAINS": "gbif.org,powo.science.kew.org,missouribotanicalgarden.org,tela-botanica.org,inpn.mnhn.fr,rhs.org.uk,edu,wikimedia.org,wikipedia.org", + "OPENHERBARIUM_TIMEOUT": "20" + } } } } diff --git a/examples/windsurf-mcp.json b/examples/windsurf-mcp.json index 2946499..85cc0b7 100644 --- a/examples/windsurf-mcp.json +++ b/examples/windsurf-mcp.json @@ -8,7 +8,13 @@ "openherbarium-mcp" ], "timeout": 120, - "connect_timeout": 60 + "connect_timeout": 60, + "env": { + "FIRECRAWL_API_URL": "http://localhost:3002", + "FIRECRAWL_API_KEY": "", + "BOTANICAL_ALLOWED_DOMAINS": "gbif.org,powo.science.kew.org,missouribotanicalgarden.org,tela-botanica.org,inpn.mnhn.fr,rhs.org.uk,edu,wikimedia.org,wikipedia.org", + "OPENHERBARIUM_TIMEOUT": "20" + } } } }