Server data from the Official MCP Registry
Read-only MCP server for Trefle botanical API: species search, growing-condition filters & zones.
About
Read-only MCP server for Trefle botanical API: species search, growing-condition filters & zones.
Security Report
This is a small, read-only MCP server for the public Trefle botanical API that authenticates via a TREFLE_TOKEN environment variable sent as a Bearer header, with local allow-list validation and capped page sizes. No malicious patterns, shell execution, hardcoded secrets, or data exfiltration were found; the only network access is to the Trefle API, which matches the stated purpose. Minor observations concern the base URL being overridable via environment variable and the lack of retry or rate-limit handling, neither of which materially affects security. Supply chain analysis found 5 known vulnerabilities in dependencies (0 critical, 1 high severity).
6 files analyzed · 8 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Required
This plugin requests these system permissions. Most are normal for its category.
What You'll Need
Set these up before or after installing:
Environment variable: TREFLE_TOKEN
How to Install
Install command not verified. See the repository for install instructions.
View repositoryDocumentation
View on GitHubFrom the project's GitHub README.
trefle-mcp (proof of concept)
A small, read-only Model Context Protocol server for the public Trefle botanical REST API, built as a concrete answer to treflehq/trefle-api#225 ("Official MCP server exposing Trefle search and species data").
It is a clean-room implementation: written from the public API contract (routes, query keys, error envelope) and not derived from Trefle's source code. Not affiliated with or endorsed by Trefle.
Tools
| Tool | Trefle endpoint | Notes |
|---|---|---|
search_species(q, filters?, ranges?, page, limit) | GET /api/v1/species/search | full-text search, optional filter[...] / range[...] |
get_species(id_or_slug) | GET /api/v1/species/{id} | full species card |
list_plants(filters?, ranges?, page, limit) | GET /api/v1/plants | "plants by growing conditions" |
species_in_distribution(zone, establishment?, page, limit) | GET /api/v1/distributions/{zone}/species | native / introduced filter |
These are the four endpoints proposed in the issue (search, species show, plants list with filters, distributions).
Design decisions (the open questions in #225)
- Transport: stdio. Each user brings their own token, so there is no hosted state or shared quota. A Streamable HTTP mode is a small follow-up if Trefle wants a hosted endpoint.
- Auth:
TREFLE_TOKENenv var only. Sent asAuthorization: Bearer, never as?token=, so it does not leak into URLs, logs or tool output. The server fails fast with a clear message if it is missing. - Context budget: list results are trimmed to id/slug/names/family/genus/year/image and
limitis capped at 50 per call;has_next_pageandtotaltell the agent whether to paginate. - Validation: unknown
filter/rangekeys are rejected locally (same allow-list as the API) before any request, so the agent gets an actionable error without spending a request. - Errors: Trefle's
{error, code, message, details}envelope is returned to the agent as structured JSON instead of a stack trace. - Repo placement: works as a standalone package (
treflehq/trefle-mcp) or as a folder in the main repo.
Run
pip install -e ".[test]"
export TREFLE_TOKEN=... # from your trefle.io account
python -m trefle_mcp.server # stdio
Claude Desktop / Cursor config:
{ "mcpServers": { "trefle": { "command": "python", "args": ["-m", "trefle_mcp.server"],
"env": { "TREFLE_TOKEN": "<your token>" } } } }
Tests
Fully offline: HTTP is mocked with respx, and one test spawns the real stdio server and runs the MCP
handshake + tools/list against it. No token or network needed.
PYTHONDONTWRITEBYTECODE=1 python -B -m pytest -q
Not done yet (production scope)
Retry with Retry-After on 429/5xx, lang parameter for localized common names, species/{id}/facts
provenance tool, Streamable HTTP transport, packaging + CI publish, MCP Registry server.json.
License
MIT
Custom Enterprise MCP & Webhook Engineering
Need a production-hardened MCP server (OAuth 2.1, tenant scoping, annotation mutation guards, Official Registry server.json + Glama Grade-A) or replay-safe Stripe/HubSpot/n8n webhook integration?
- 48h Fixed Starter Slice: $145 via 0%-fee Contra Escrow (100% async — written spec, tested GitHub PR & 2-min walkthrough)
- Portfolio & Services: khoaphan.dev/services
Reviews
No reviews yet
Be the first to review this server!
More Developer Tools MCP Servers
Rea
Freeby Morluto · Developer Tools
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Paperclip
Freeby Paperclipai · Developer Tools
Trending hip-hop artist momentum scores across four cultural dimensions.
Scrapling
Freeby D4Vinci · Developer Tools
Web scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
Server Time
Freeby Modelcontextprotocol · Developer Tools
Current time lookup and conversion between IANA timezones
Toleno
Freeby Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
MCP Marketplace
Freeby mcp-marketplace · Developer Tools
Search and install MCP servers from inside your AI client.
