Skip to content

v0.7.0

Latest

Choose a tag to compare

@nickclyde nickclyde released this 04 Sep 18:31
8182af3

Highlights

  • mcp 2.x support. The server now runs on the MCP Python SDK 2.x MCPServer API and requires mcp>=2.1.1,<3, lifting the <2 cap from v0.6.1. Existing configuration, transports, and tool interfaces are unchanged. (#61, #68)
  • Configurable rate limiting. Search and fetch caps are now settable (DDG_SEARCH_RPM, DDG_FETCH_RPM), with an optional per-host fetch cap (DDG_FETCH_HOST_RPM, off by default) and a token_bucket strategy alongside the default sliding window. HTTP 429 responses honor Retry-After and retry once. The sliding-window limiter is now serialized so concurrent calls cannot exceed the cap. Thanks @tonythethompson. (#66)
  • Fetch cache and parse modes. fetch_content keeps the parsed page in an in-memory TTL/LRU cache (default 5 minutes, 64 entries) so paginating with start_index downloads once. A new parse_mode parameter offers text (default, unchanged), main (primary article only), and markdown (headings, lists, links, code). Thanks @tonythethompson. (#67)
  • Long URL shortening. Search results replace URLs longer than 120 characters (DDG_REF_URL_THRESHOLD, 0 disables) with short ref://<id> tokens. fetch_content accepts a token directly, and a new expand_link tool returns the full URL. (#43, #69)

Upgrade notes

  • pip install -U duckduckgo-mcp-server pulls in mcp 2.x. If you pin mcp yourself, move to >=2.1.1,<3.
  • Output of fetch_content is unchanged in the default text mode. The content trailer gains cache=hit|miss while the cache is enabled.
  • All new settings have CLI flags: --rate-limit-strategy, --search-rpm, --fetch-rpm, --fetch-host-rpm, --cache-ttl, --cache-max-entries, --parse-mode, --ref-url-threshold.

What's Changed

  • feat(rate-limit): token bucket, per-host caps, and 429 retry by @tonythethompson in #66
  • feat(fetch): cache paginated fetch_content and add parse_mode extractors by @tonythethompson in #67
  • feat(deps): migrate to mcp 2.x (MCPServer API) by @nickclyde in #68
  • feat: shorten long result URLs to ref:// tokens with expand_link tool by @nickclyde in #69

New Contributors

Full Changelog: v0.6.1...v0.7.0