mcpscraper-memory-sdk (Python)
Official Python clients for the unified mcpscraper.dev MCP catalog. The direct Memory manifest remains checked for runtime compatibility.
This is a thin JSON-RPC client generated against ../../contracts/memory.tools.json, the public contract for the hosted API. It contains no product source — only typed request/response plumbing.
Install
pip install mcpscraper-memory-sdk
Usage
import os
from mcpscraper_memory import MemoryClient, MemoryApiError
client = MemoryClient(api_key=os.environ["MCP_SCRAPER_API_KEY"])
try:
result = client.memory.search(query="competitor pricing pages")
for hit in result.results or []:
print(hit["source"], hit["score"])
except MemoryApiError as err:
print(f"memory call failed: {err}")
Namespaces
client.access, client.capture, client.channels, client.crm, client.facts, client.files, client.graph, client.library, client.memory, client.recall, client.research, client.artifacts, client.storage, client.tables, client.tags, client.vaults, client.video, client.webhooks — one method per tool, snake_case, typed with generated Pydantic models. Use Research for sourced knowledge and CRM for an actual relationship; counterpart operations link records without copying fields. External CRM providers remain unavailable, with no setup or write wrapper. Original Gmail attachment bytes saved to Memory are available through client.files.file_asset_save(...) and client.files.file_asset_get(...).
Use the same key with McpToolsClient for all unified scraper and Memory tools.
Use client.call_tool_result(name, args) for native MCP image, audio, or resource blocks. The existing call_tool method keeps returning the parsed structured/text value.
The unified MCP client accepts pages=2 on
client.other.harvest_paa_start(...). It keeps one page as the default, adds
page-two organic results when available, and expands PAA only on the preserved
first page. Poll the same job with harvest_paa_status; pagination remains
nullable for results saved under older contracts.
Authentication
Set MCP_SCRAPER_API_KEY once. MemoryClient, McpToolsClient, and the scraper SDK all use that
same customer credential against https://mcpscraper.dev/mcp.
Regenerating models
src/mcpscraper_memory/models/ and _generated_client.py are generated from ../../contracts/memory.tools.json. After editing the manifest, regenerate with:
python scripts/generate_models.py
See also
Repo README (multi-language examples with real sample output) · mcpscraper-memory-sdk on npm (Node) · mcpscraper-sdk on PyPI (also reaches these Memory tools via a scraper key) · mcpscraper-cli
Release changes: SDK 0.55.1 release notes.
Client attribution and full results
Clients accept client_attribution={"install_channel": ..., "ai_client": ..., "ai_model": ...} and default to calling surface sdk. Set only known caller labels; unspecified labels stay unknown. on_response receives a metadata dictionary with request_id and status per response, and errors keep their own request_id. These options also apply to McpToolsClient and MemoryClient; labels are reporting declarations, not authorization.
Generated output unions return the matching model directly, preserving attributes such as transcript_text. Use pydantic.TypeAdapter(Output) when independently validating an output union. Large outputs may have delivery, scope and recovery instead of inline data. Preserve them, then use tools.artifacts.describe, read_retained (follow next_offset to None), or download with the artifact ID. The legacy artifacts.read method remains the report reader. call_tool_result preserves native content/resource links. Download URL expiry differs from retention; renew through download without rerunning acquisition. Use the returned capability for binary files.
Artifact delivery may include optional delivery.availableExports handles. Use the
export artifact ID with artifact_download, artifact_read or artifact_describe
to generate Markdown from retained JSON without repeating acquisition. The
on-demand export example
shows the complete flow and preserves a retry key for uncertain search responses.
For page content, start extract_site directly; it discovers pages during extraction. Use map_site_urls when you need the URL inventory itself. See the direct site-export example for retry keys, status and complete page reads.
Release changes: SDK 0.56.0 release notes.
Reddit discovery and known threads
Use reddit_trending with window:"year" to discover past-year search candidates and
select relevant threads before collecting comments. Set maxThreads to bound the
number selected and maxCommentsPerThread:20 for a per-thread capture limit.
Twenty is a request limit; inspect returned coverage because fewer accessible text
comments can produce a partial result. Publication dates are optional when unknown.
Pass a known Reddit thread URL directly to reddit_thread with maxComments:20;
it does not require a discovery call first. Trending returns ranked summaries and
questions; the thread tool returns full comment bodies. Preserve each operation's
retry key and exact inputs after an uncertain response.
The past-year and direct-thread example shows both paths.
Saved Maps reviews
Server 0.100.1 improves Maps discovery, review text and list collection through the existing interfaces. Use the exact name and location returned by discovery. Read the saved run and its review pages before considering a new acquisition. An explicit resume uses a fresh browser and reopens the profile and reviews; it retains saved review IDs. A new resume key authorizes a separately billed attempt, while repeating that key reads the same run.
Metadata
Release files for mcpscraper-memory-sdk 0.51.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcpscraper_memory_sdk-0.51.0.tar.gz | 322.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcpscraper_memory_sdk-0.51.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.2 MB
Release files / mcpscraper_memory_sdk-0.51.0.tar.gz
| Download URL | mcpscraper_memory_sdk-0.51.0.tar.gz |
|---|---|
| Size | 322.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1ad9880a37a4019d76203c2b122cc6b8c6c3006ffb030f75016bd6bbe0bb58b
|
|
BLAKE2b-256 checksum How to use checksums |
b0cb632907ec545a5f426265d53856eaf967272047542e6dd4a0fcb255d0342f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / mcpscraper_memory_sdk-0.51.0-py3-none-any.whl
| Download URL | mcpscraper_memory_sdk-0.51.0-py3-none-any.whl |
|---|---|
| Size | 894.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
deeb49eebd0c8a421e16128c839cd91784ad25f05517e2bcefd9e9b3f5102d19
|
|
BLAKE2b-256 checksum How to use checksums |
217979054349a4403ebb5e954f62bc153c040a87445277de8f4f675cf15218ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for mcpscraper-memory-sdk 0.51.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.