fetchnode 0.4.2__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. {fetchnode-0.4.2 → fetchnode-0.5.0}/.gitignore +8 -1
  2. fetchnode-0.5.0/CHANGELOG.md +52 -0
  3. {fetchnode-0.4.2 → fetchnode-0.5.0}/PKG-INFO +110 -14
  4. {fetchnode-0.4.2 → fetchnode-0.5.0}/README.md +106 -10
  5. {fetchnode-0.4.2 → fetchnode-0.5.0}/pyproject.toml +5 -4
  6. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/apps.py +6 -2
  7. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/conf.py +1 -1
  8. fetchnode-0.5.0/src/fetchnode/management/__init__.py +1 -0
  9. fetchnode-0.5.0/src/fetchnode/management/commands/__init__.py +1 -0
  10. fetchnode-0.5.0/src/fetchnode/management/commands/fetchnode_mcp.py +243 -0
  11. fetchnode-0.5.0/src/fetchnode/mcp.py +276 -0
  12. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/version.py +1 -1
  13. fetchnode-0.5.0/src/fetchnode_client/apps.py +5 -0
  14. fetchnode-0.5.0/src/fetchnode_client/management/__init__.py +1 -0
  15. fetchnode-0.5.0/src/fetchnode_client/management/commands/__init__.py +1 -0
  16. fetchnode-0.5.0/src/fetchnode_client/management/commands/fetchnode_mcp.py +244 -0
  17. fetchnode-0.5.0/src/fetchnode_client/mcp.py +291 -0
  18. fetchnode-0.4.2/src/fetchnode_client/apps.py +0 -2
  19. {fetchnode-0.4.2 → fetchnode-0.5.0}/LICENSE +0 -0
  20. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/__init__.py +0 -0
  21. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/api.py +0 -0
  22. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/capture.py +0 -0
  23. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/celery.py +0 -0
  24. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/demo.py +0 -0
  25. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/excepthook.py +0 -0
  26. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/handlers.py +0 -0
  27. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/middleware.py +0 -0
  28. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/py.typed +0 -0
  29. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/query.py +0 -0
  30. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/scope.py +0 -0
  31. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/scrub.py +0 -0
  32. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/sender.py +0 -0
  33. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode/utils.py +0 -0
  34. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/__init__.py +0 -0
  35. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/api.py +0 -0
  36. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/capture.py +0 -0
  37. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/celery.py +0 -0
  38. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/conf.py +0 -0
  39. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/demo.py +0 -0
  40. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/excepthook.py +0 -0
  41. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/handlers.py +0 -0
  42. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/middleware.py +0 -0
  43. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/py.typed +0 -0
  44. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/query.py +0 -0
  45. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/scope.py +0 -0
  46. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/scrub.py +0 -0
  47. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/sender.py +0 -0
  48. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/utils.py +0 -0
  49. {fetchnode-0.4.2 → fetchnode-0.5.0}/src/fetchnode_client/version.py +0 -0
@@ -55,4 +55,11 @@ node_modules/
55
55
  .DS_Store
56
56
  Thumbs.db
57
57
  .agents/
58
-
58
+ backups/
59
+ public-export/
60
+ *.dump
61
+ *.rdb
62
+ *.sqlite3
63
+ *.sqlite3-*
64
+ *.pem
65
+ *.key
@@ -0,0 +1,52 @@
1
+ # FetchNode SDK changelog
2
+
3
+ ## 0.5.0 — 2026-10-16
4
+
5
+ ### Added
6
+
7
+ - Model Context Protocol (MCP) support for AI coding agents (Cursor, Windsurf, Claude Desktop, Cline).
8
+ - Django management command `python manage.py fetchnode_mcp` with `--setup [all|cursor|windsurf|cline|claude]`, `--print-config`, `--remote`, and `--status/--test`.
9
+ - Automatic guideline documentation injection into repository agent prompt files (`AGENTS.md`, `CLAUDE.md`, `.cursorrules`).
10
+ - Direct Python SDK helper functions in `fetchnode.mcp` and `fetchnode_client.mcp` (`get_seo_overview`, `get_keyword_opportunities`, `get_page_performance`, `get_declining_pages`, `get_technical_seo_health`).
11
+ - Stdio-to-remote JSON-RPC runner (`fetchnode.mcp.run_stdio_server`).
12
+
13
+ ### Upgrade
14
+
15
+ ```bash
16
+ python -m pip install --upgrade fetchnode==0.5.0
17
+ ```
18
+
19
+ ## 0.4.3 — 2026-09-29
20
+
21
+ ### Fixed
22
+
23
+ - Use `https://fetch-node.com/api/events/ingest/` as the default ingest endpoint.
24
+ - Let Django automatically discover the SDK AppConfig when `fetchnode` is in
25
+ `INSTALLED_APPS`, so startup installs logging and enabled instrumentation.
26
+ - Preserve automatic AppConfig discovery for the legacy `fetchnode_client` name.
27
+ - Correct the documentation URLs to the active FetchNode website.
28
+
29
+ ### Documentation
30
+
31
+ - Configure the private server key through `FETCHNODE_API_KEY` and supply an
32
+ explicit ingest URL. Keep private keys out of browser code and source control.
33
+ - Show explicit server conversion declarations and non-personal event properties.
34
+ - Verify reception after restarting or redeploying Django.
35
+
36
+ ### Release checks
37
+
38
+ - Test the installed wheel outside the repository, including Django AppConfig and
39
+ automatic logging setup.
40
+ - Exercise requests, exceptions, error logs and idempotent conversions against a
41
+ local FetchNode collector, with project isolation checks.
42
+ - Check distribution metadata and the release tag before uploading to PyPI.
43
+
44
+ ### Upgrade
45
+
46
+ ```bash
47
+ python -m pip install --upgrade fetchnode==0.4.3
48
+ ```
49
+
50
+ Update your dependency file or lockfile, restart or redeploy Django, and verify a
51
+ request and test error in FetchNode. Existing installations can set `API_URL`
52
+ explicitly if they use their own collector.
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: fetchnode
3
- Version: 0.4.2
3
+ Version: 0.5.0
4
4
  Summary: Official Django and Python client SDK for FetchNode monitoring
5
- Project-URL: Homepage, https://fetchnode.com
6
- Project-URL: Documentation, https://fetchnode.com/guide/
5
+ Project-URL: Homepage, https://fetch-node.com
6
+ Project-URL: Documentation, https://fetch-node.com/guide/
7
7
  Project-URL: Repository, https://github.com/remcovanwijk040/fetchnode
8
8
  Project-URL: Issues, https://github.com/remcovanwijk040/fetchnode/issues
9
- Project-URL: Changelog, https://fetchnode.com/changelog/
9
+ Project-URL: Changelog, https://pypi.org/project/fetchnode/0.5.0/#sdk-changelog
10
10
  Author-email: Remco van Wijk <remcovanwijk040@users.noreply.github.com>
11
11
  License-Expression: MIT
12
12
  License-File: LICENSE
@@ -43,7 +43,7 @@ Description-Content-Type: text/markdown
43
43
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
44
44
  [![Typing: Typed](https://img.shields.io/badge/typing-typed-green.svg)](https://peps.python.org/pep-0561/)
45
45
 
46
- Official Python and Django client SDK for [FetchNode](https://fetchnode.com) — the focused operations workspace for developers and teams managing multiple production Django websites.
46
+ Official Python and Django client SDK for [FetchNode](https://fetch-node.com) — the focused operations workspace for developers and teams managing multiple production Django websites.
47
47
 
48
48
  FetchNode captures unhandled exceptions, error logs, slow database queries, N+1 query patterns, Celery background tasks, and authoritative business conversions with zero bloat and privacy-safe defaults.
49
49
 
@@ -60,7 +60,9 @@ FetchNode captures unhandled exceptions, error logs, slow database queries, N+1
60
60
  - [Manual Exception Capture](#manual-exception-capture)
61
61
  - [Celery Job Monitoring](#celery-job-monitoring)
62
62
  - [Logging Handler](#logging-handler)
63
+ - [Model Context Protocol (MCP) for AI Agents](#model-context-protocol-mcp-for-ai-agents)
63
64
  - [Privacy & Security Defaults](#privacy--security-defaults)
65
+
64
66
  - [Testing in Development](#testing-in-development)
65
67
  - [Compatibility](#compatibility)
66
68
  - [Links & Resources](#links--resources)
@@ -70,6 +72,9 @@ FetchNode captures unhandled exceptions, error logs, slow database queries, N+1
70
72
 
71
73
  ## Installation
72
74
 
75
+ Version 0.5.0 adds Model Context Protocol (MCP) server support and agent integration.
76
+ See the [SDK changelog](#sdk-changelog) for changes and upgrade instructions.
77
+
73
78
  Install via `pip`:
74
79
 
75
80
  ```bash
@@ -114,13 +119,18 @@ MIDDLEWARE = [
114
119
  ### 3. Configure `settings.FETCHNODE`
115
120
 
116
121
  ```python
122
+ import os
123
+
117
124
  FETCHNODE = {
118
- "API_KEY": "fn_live_your_project_key_here",
125
+ "API_KEY": os.environ.get("FETCHNODE_API_KEY", ""),
126
+ "API_URL": "https://fetch-node.com/api/events/ingest/",
119
127
  "ENVIRONMENT": "production", # e.g. "production", "staging"
120
128
  }
121
129
  ```
122
130
 
123
- That's it! Django will automatically initialize FetchNode upon startup and capture unhandled exceptions, slow queries, and request telemetry.
131
+ Set `FETCHNODE_API_KEY` to your private server key in the deployment environment. Keep it out of source control and browser code. Restart or redeploy Django, then verify a request and test error in FetchNode.
132
+
133
+ Django will automatically initialize FetchNode upon startup and capture unhandled exceptions, slow queries, and request telemetry.
124
134
 
125
135
  ---
126
136
 
@@ -130,8 +140,8 @@ Configure via `settings.FETCHNODE` or environment variables:
130
140
 
131
141
  | Setting Key | Environment Variable | Default | Description |
132
142
  | :--- | :--- | :--- | :--- |
133
- | `API_KEY` | `FETCHNODE_API_KEY` | `""` | **Required.** Your FetchNode project key (starts with `fn_live_` or `fn_test_`). |
134
- | `ENDPOINT` / `API_URL` | `FETCHNODE_ENDPOINT` | `https://monitor.fetchnode.com/api/events/ingest/` | Processing server URL. Point to your self-hosted instance if applicable. |
143
+ | `API_KEY` | `FETCHNODE_API_KEY` | `""` | **Required.** Your private server key from project settings. Never use a public browser key here. |
144
+ | `ENDPOINT` / `API_URL` | `FETCHNODE_ENDPOINT` | `https://fetch-node.com/api/events/ingest/` | Processing server URL. Point to your self-hosted instance if applicable. |
135
145
  | `ENVIRONMENT` | `FETCHNODE_ENVIRONMENT` | `"development"` | Active environment name (`"production"`, `"staging"`). |
136
146
  | `RELEASE` | `FETCHNODE_RELEASE` | `""` | Release tag or git commit hash (e.g. `git rev-parse HEAD`). |
137
147
  | `ENABLED` | `FETCHNODE_ENABLED` | `True` if API_KEY present | Master toggle for event sending. |
@@ -163,8 +173,8 @@ def contact_view(request):
163
173
  "lead_submitted",
164
174
  request=request,
165
175
  idempotency_key=f"lead:{lead.id}",
166
- properties={"email": lead.email},
167
- conversion=True,
176
+ properties={"source": "contact_form"},
177
+ conversion={"display_name": "Lead submitted", "funnel_order": 1, "primary": True},
168
178
  )
169
179
  return redirect("thank_you")
170
180
  ```
@@ -230,8 +240,40 @@ LOGGING = {
230
240
 
231
241
  ---
232
242
 
243
+ ## Model Context Protocol (MCP) for AI Agents
244
+
245
+ FetchNode includes a native Model Context Protocol (MCP) server. When pair programming or maintaining websites with AI agents (Claude Desktop, Cursor, Windsurf, Cline, or Python agents), your agents can query live Google Search Console rankings and technical error health directly:
246
+
247
+ ```bash
248
+ python manage.py fetchnode_mcp --setup
249
+ ```
250
+
251
+ This single command configures your editor agent and automatically documents the available tools in `AGENTS.md` / `CLAUDE.md`.
252
+
253
+ ### Available MCP Tools
254
+
255
+ * **`get_seo_overview`**: Organic clicks, search views, CTR, average position, and period changes.
256
+ * **`get_keyword_opportunities`**: High-potential striking-distance queries (positions 4–20), low-CTR terms, and zero-click keywords.
257
+ * **`get_page_performance`**: Landing page traffic, conversions, conversion rate, and driving queries.
258
+ * **`get_declining_pages`**: Landing pages and search queries losing organic Google clicks.
259
+ * **`get_technical_seo_health`**: Open 500 server errors and 404s affecting landing paths.
260
+
261
+ ### In-Code Python Usage
262
+
263
+ You can also query MCP tools directly in Python (e.g. within Celery tasks, LangChain, CrewAI, or autonomous scripts):
264
+
265
+ ```python
266
+ from fetchnode.mcp import get_seo_overview, get_keyword_opportunities
267
+
268
+ overview = get_seo_overview(period_days=28)
269
+ opportunities = get_keyword_opportunities(category="striking_distance")
270
+ ```
271
+
272
+ ---
273
+
233
274
  ## Privacy & Security Defaults
234
275
 
276
+
235
277
  FetchNode is engineered with a strict **privacy-first architecture**:
236
278
  1. **Client-side Scrubbing:** Sensitive keys (`password`, `token`, `secret`, `api_key`, `authorization`, `cookie`, `csrfmiddlewaretoken`) and any compound keys like `user_password` or `client_secret` are scrubbed before payload transmission.
237
279
  2. **Safe SQL Normalization:** Raw SQL text is stripped of literals and parameters (`SELECT * FROM user WHERE id = 123` becomes `SELECT * FROM user WHERE id = ?`).
@@ -271,9 +313,9 @@ fetchnode.flush()
271
313
 
272
314
  ## Links & Resources
273
315
 
274
- - **Website & Cloud App:** [fetchnode.com](https://fetchnode.com)
275
- - **Documentation & Setup Guide:** [fetchnode.com/guide/](https://fetchnode.com/guide/)
276
- - **Changelog:** [fetchnode.com/changelog/](https://fetchnode.com/changelog/)
316
+ - **Website & Cloud App:** [fetchnode.com](https://fetch-node.com)
317
+ - **Documentation & Setup Guide:** [fetchnode.com/guide/](https://fetch-node.com/guide/)
318
+ - **Changelog:** [fetchnode.com/changelog/](https://fetch-node.com/changelog/)
277
319
  - **GitHub Repository:** [github.com/remcovanwijk040/fetchnode](https://github.com/remcovanwijk040/fetchnode)
278
320
  - **Issue Tracker:** [github.com/remcovanwijk040/fetchnode/issues](https://github.com/remcovanwijk040/fetchnode/issues)
279
321
 
@@ -282,3 +324,57 @@ fetchnode.flush()
282
324
  ## License
283
325
 
284
326
  MIT License. See [LICENSE](LICENSE) for details.
327
+
328
+
329
+ # SDK changelog
330
+
331
+ ## 0.5.0 — 2026-10-16
332
+
333
+ ### Added
334
+
335
+ - Model Context Protocol (MCP) support for AI coding agents (Cursor, Windsurf, Claude Desktop, Cline).
336
+ - Django management command `python manage.py fetchnode_mcp` with `--setup [all|cursor|windsurf|cline|claude]`, `--print-config`, `--remote`, and `--status/--test`.
337
+ - Automatic guideline documentation injection into repository agent prompt files (`AGENTS.md`, `CLAUDE.md`, `.cursorrules`).
338
+ - Direct Python SDK helper functions in `fetchnode.mcp` and `fetchnode_client.mcp` (`get_seo_overview`, `get_keyword_opportunities`, `get_page_performance`, `get_declining_pages`, `get_technical_seo_health`).
339
+ - Stdio-to-remote JSON-RPC runner (`fetchnode.mcp.run_stdio_server`).
340
+
341
+ ### Upgrade
342
+
343
+ ```bash
344
+ python -m pip install --upgrade fetchnode==0.5.0
345
+ ```
346
+
347
+ ## 0.4.3 — 2026-09-29
348
+
349
+ ### Fixed
350
+
351
+ - Use `https://fetch-node.com/api/events/ingest/` as the default ingest endpoint.
352
+ - Let Django automatically discover the SDK AppConfig when `fetchnode` is in
353
+ `INSTALLED_APPS`, so startup installs logging and enabled instrumentation.
354
+ - Preserve automatic AppConfig discovery for the legacy `fetchnode_client` name.
355
+ - Correct the documentation URLs to the active FetchNode website.
356
+
357
+ ### Documentation
358
+
359
+ - Configure the private server key through `FETCHNODE_API_KEY` and supply an
360
+ explicit ingest URL. Keep private keys out of browser code and source control.
361
+ - Show explicit server conversion declarations and non-personal event properties.
362
+ - Verify reception after restarting or redeploying Django.
363
+
364
+ ### Release checks
365
+
366
+ - Test the installed wheel outside the repository, including Django AppConfig and
367
+ automatic logging setup.
368
+ - Exercise requests, exceptions, error logs and idempotent conversions against a
369
+ local FetchNode collector, with project isolation checks.
370
+ - Check distribution metadata and the release tag before uploading to PyPI.
371
+
372
+ ### Upgrade
373
+
374
+ ```bash
375
+ python -m pip install --upgrade fetchnode==0.4.3
376
+ ```
377
+
378
+ Update your dependency file or lockfile, restart or redeploy Django, and verify a
379
+ request and test error in FetchNode. Existing installations can set `API_URL`
380
+ explicitly if they use their own collector.
@@ -6,7 +6,7 @@
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
7
  [![Typing: Typed](https://img.shields.io/badge/typing-typed-green.svg)](https://peps.python.org/pep-0561/)
8
8
 
9
- Official Python and Django client SDK for [FetchNode](https://fetchnode.com) — the focused operations workspace for developers and teams managing multiple production Django websites.
9
+ Official Python and Django client SDK for [FetchNode](https://fetch-node.com) — the focused operations workspace for developers and teams managing multiple production Django websites.
10
10
 
11
11
  FetchNode captures unhandled exceptions, error logs, slow database queries, N+1 query patterns, Celery background tasks, and authoritative business conversions with zero bloat and privacy-safe defaults.
12
12
 
@@ -23,7 +23,9 @@ FetchNode captures unhandled exceptions, error logs, slow database queries, N+1
23
23
  - [Manual Exception Capture](#manual-exception-capture)
24
24
  - [Celery Job Monitoring](#celery-job-monitoring)
25
25
  - [Logging Handler](#logging-handler)
26
+ - [Model Context Protocol (MCP) for AI Agents](#model-context-protocol-mcp-for-ai-agents)
26
27
  - [Privacy & Security Defaults](#privacy--security-defaults)
28
+
27
29
  - [Testing in Development](#testing-in-development)
28
30
  - [Compatibility](#compatibility)
29
31
  - [Links & Resources](#links--resources)
@@ -33,6 +35,9 @@ FetchNode captures unhandled exceptions, error logs, slow database queries, N+1
33
35
 
34
36
  ## Installation
35
37
 
38
+ Version 0.5.0 adds Model Context Protocol (MCP) server support and agent integration.
39
+ See the [SDK changelog](#sdk-changelog) for changes and upgrade instructions.
40
+
36
41
  Install via `pip`:
37
42
 
38
43
  ```bash
@@ -77,13 +82,18 @@ MIDDLEWARE = [
77
82
  ### 3. Configure `settings.FETCHNODE`
78
83
 
79
84
  ```python
85
+ import os
86
+
80
87
  FETCHNODE = {
81
- "API_KEY": "fn_live_your_project_key_here",
88
+ "API_KEY": os.environ.get("FETCHNODE_API_KEY", ""),
89
+ "API_URL": "https://fetch-node.com/api/events/ingest/",
82
90
  "ENVIRONMENT": "production", # e.g. "production", "staging"
83
91
  }
84
92
  ```
85
93
 
86
- That's it! Django will automatically initialize FetchNode upon startup and capture unhandled exceptions, slow queries, and request telemetry.
94
+ Set `FETCHNODE_API_KEY` to your private server key in the deployment environment. Keep it out of source control and browser code. Restart or redeploy Django, then verify a request and test error in FetchNode.
95
+
96
+ Django will automatically initialize FetchNode upon startup and capture unhandled exceptions, slow queries, and request telemetry.
87
97
 
88
98
  ---
89
99
 
@@ -93,8 +103,8 @@ Configure via `settings.FETCHNODE` or environment variables:
93
103
 
94
104
  | Setting Key | Environment Variable | Default | Description |
95
105
  | :--- | :--- | :--- | :--- |
96
- | `API_KEY` | `FETCHNODE_API_KEY` | `""` | **Required.** Your FetchNode project key (starts with `fn_live_` or `fn_test_`). |
97
- | `ENDPOINT` / `API_URL` | `FETCHNODE_ENDPOINT` | `https://monitor.fetchnode.com/api/events/ingest/` | Processing server URL. Point to your self-hosted instance if applicable. |
106
+ | `API_KEY` | `FETCHNODE_API_KEY` | `""` | **Required.** Your private server key from project settings. Never use a public browser key here. |
107
+ | `ENDPOINT` / `API_URL` | `FETCHNODE_ENDPOINT` | `https://fetch-node.com/api/events/ingest/` | Processing server URL. Point to your self-hosted instance if applicable. |
98
108
  | `ENVIRONMENT` | `FETCHNODE_ENVIRONMENT` | `"development"` | Active environment name (`"production"`, `"staging"`). |
99
109
  | `RELEASE` | `FETCHNODE_RELEASE` | `""` | Release tag or git commit hash (e.g. `git rev-parse HEAD`). |
100
110
  | `ENABLED` | `FETCHNODE_ENABLED` | `True` if API_KEY present | Master toggle for event sending. |
@@ -126,8 +136,8 @@ def contact_view(request):
126
136
  "lead_submitted",
127
137
  request=request,
128
138
  idempotency_key=f"lead:{lead.id}",
129
- properties={"email": lead.email},
130
- conversion=True,
139
+ properties={"source": "contact_form"},
140
+ conversion={"display_name": "Lead submitted", "funnel_order": 1, "primary": True},
131
141
  )
132
142
  return redirect("thank_you")
133
143
  ```
@@ -193,8 +203,40 @@ LOGGING = {
193
203
 
194
204
  ---
195
205
 
206
+ ## Model Context Protocol (MCP) for AI Agents
207
+
208
+ FetchNode includes a native Model Context Protocol (MCP) server. When pair programming or maintaining websites with AI agents (Claude Desktop, Cursor, Windsurf, Cline, or Python agents), your agents can query live Google Search Console rankings and technical error health directly:
209
+
210
+ ```bash
211
+ python manage.py fetchnode_mcp --setup
212
+ ```
213
+
214
+ This single command configures your editor agent and automatically documents the available tools in `AGENTS.md` / `CLAUDE.md`.
215
+
216
+ ### Available MCP Tools
217
+
218
+ * **`get_seo_overview`**: Organic clicks, search views, CTR, average position, and period changes.
219
+ * **`get_keyword_opportunities`**: High-potential striking-distance queries (positions 4–20), low-CTR terms, and zero-click keywords.
220
+ * **`get_page_performance`**: Landing page traffic, conversions, conversion rate, and driving queries.
221
+ * **`get_declining_pages`**: Landing pages and search queries losing organic Google clicks.
222
+ * **`get_technical_seo_health`**: Open 500 server errors and 404s affecting landing paths.
223
+
224
+ ### In-Code Python Usage
225
+
226
+ You can also query MCP tools directly in Python (e.g. within Celery tasks, LangChain, CrewAI, or autonomous scripts):
227
+
228
+ ```python
229
+ from fetchnode.mcp import get_seo_overview, get_keyword_opportunities
230
+
231
+ overview = get_seo_overview(period_days=28)
232
+ opportunities = get_keyword_opportunities(category="striking_distance")
233
+ ```
234
+
235
+ ---
236
+
196
237
  ## Privacy & Security Defaults
197
238
 
239
+
198
240
  FetchNode is engineered with a strict **privacy-first architecture**:
199
241
  1. **Client-side Scrubbing:** Sensitive keys (`password`, `token`, `secret`, `api_key`, `authorization`, `cookie`, `csrfmiddlewaretoken`) and any compound keys like `user_password` or `client_secret` are scrubbed before payload transmission.
200
242
  2. **Safe SQL Normalization:** Raw SQL text is stripped of literals and parameters (`SELECT * FROM user WHERE id = 123` becomes `SELECT * FROM user WHERE id = ?`).
@@ -234,9 +276,9 @@ fetchnode.flush()
234
276
 
235
277
  ## Links & Resources
236
278
 
237
- - **Website & Cloud App:** [fetchnode.com](https://fetchnode.com)
238
- - **Documentation & Setup Guide:** [fetchnode.com/guide/](https://fetchnode.com/guide/)
239
- - **Changelog:** [fetchnode.com/changelog/](https://fetchnode.com/changelog/)
279
+ - **Website & Cloud App:** [fetchnode.com](https://fetch-node.com)
280
+ - **Documentation & Setup Guide:** [fetchnode.com/guide/](https://fetch-node.com/guide/)
281
+ - **Changelog:** [fetchnode.com/changelog/](https://fetch-node.com/changelog/)
240
282
  - **GitHub Repository:** [github.com/remcovanwijk040/fetchnode](https://github.com/remcovanwijk040/fetchnode)
241
283
  - **Issue Tracker:** [github.com/remcovanwijk040/fetchnode/issues](https://github.com/remcovanwijk040/fetchnode/issues)
242
284
 
@@ -245,3 +287,57 @@ fetchnode.flush()
245
287
  ## License
246
288
 
247
289
  MIT License. See [LICENSE](LICENSE) for details.
290
+
291
+
292
+ # SDK changelog
293
+
294
+ ## 0.5.0 — 2026-10-16
295
+
296
+ ### Added
297
+
298
+ - Model Context Protocol (MCP) support for AI coding agents (Cursor, Windsurf, Claude Desktop, Cline).
299
+ - Django management command `python manage.py fetchnode_mcp` with `--setup [all|cursor|windsurf|cline|claude]`, `--print-config`, `--remote`, and `--status/--test`.
300
+ - Automatic guideline documentation injection into repository agent prompt files (`AGENTS.md`, `CLAUDE.md`, `.cursorrules`).
301
+ - Direct Python SDK helper functions in `fetchnode.mcp` and `fetchnode_client.mcp` (`get_seo_overview`, `get_keyword_opportunities`, `get_page_performance`, `get_declining_pages`, `get_technical_seo_health`).
302
+ - Stdio-to-remote JSON-RPC runner (`fetchnode.mcp.run_stdio_server`).
303
+
304
+ ### Upgrade
305
+
306
+ ```bash
307
+ python -m pip install --upgrade fetchnode==0.5.0
308
+ ```
309
+
310
+ ## 0.4.3 — 2026-09-29
311
+
312
+ ### Fixed
313
+
314
+ - Use `https://fetch-node.com/api/events/ingest/` as the default ingest endpoint.
315
+ - Let Django automatically discover the SDK AppConfig when `fetchnode` is in
316
+ `INSTALLED_APPS`, so startup installs logging and enabled instrumentation.
317
+ - Preserve automatic AppConfig discovery for the legacy `fetchnode_client` name.
318
+ - Correct the documentation URLs to the active FetchNode website.
319
+
320
+ ### Documentation
321
+
322
+ - Configure the private server key through `FETCHNODE_API_KEY` and supply an
323
+ explicit ingest URL. Keep private keys out of browser code and source control.
324
+ - Show explicit server conversion declarations and non-personal event properties.
325
+ - Verify reception after restarting or redeploying Django.
326
+
327
+ ### Release checks
328
+
329
+ - Test the installed wheel outside the repository, including Django AppConfig and
330
+ automatic logging setup.
331
+ - Exercise requests, exceptions, error logs and idempotent conversions against a
332
+ local FetchNode collector, with project isolation checks.
333
+ - Check distribution metadata and the release tag before uploading to PyPI.
334
+
335
+ ### Upgrade
336
+
337
+ ```bash
338
+ python -m pip install --upgrade fetchnode==0.4.3
339
+ ```
340
+
341
+ Update your dependency file or lockfile, restart or redeploy Django, and verify a
342
+ request and test error in FetchNode. Existing installations can set `API_URL`
343
+ explicitly if they use their own collector.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "fetchnode"
7
- version = "0.4.2"
7
+ version = "0.5.0"
8
8
  description = "Official Django and Python client SDK for FetchNode monitoring"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -43,11 +43,11 @@ celery = [
43
43
  ]
44
44
 
45
45
  [project.urls]
46
- Homepage = "https://fetchnode.com"
47
- Documentation = "https://fetchnode.com/guide/"
46
+ Homepage = "https://fetch-node.com"
47
+ Documentation = "https://fetch-node.com/guide/"
48
48
  Repository = "https://github.com/remcovanwijk040/fetchnode"
49
49
  Issues = "https://github.com/remcovanwijk040/fetchnode/issues"
50
- Changelog = "https://fetchnode.com/changelog/"
50
+ Changelog = "https://pypi.org/project/fetchnode/0.5.0/#sdk-changelog"
51
51
 
52
52
  [tool.hatch.build.targets.wheel]
53
53
  packages = ["src/fetchnode", "src/fetchnode_client"]
@@ -56,6 +56,7 @@ packages = ["src/fetchnode", "src/fetchnode_client"]
56
56
  include = [
57
57
  "/src",
58
58
  "/README.md",
59
+ "/CHANGELOG.md",
59
60
  "/LICENSE",
60
61
  "/pyproject.toml",
61
62
  ]
@@ -34,5 +34,9 @@ class FetchNodeConfig(AppConfig):
34
34
  install_excepthook_instrumentation()
35
35
 
36
36
 
37
- # Backwards compatibility alias
38
- FetchNodeClientConfig = FetchNodeConfig
37
+ def __getattr__(name):
38
+ # Keep explicit legacy imports working without exposing a second AppConfig
39
+ # candidate to Django's automatic application discovery.
40
+ if name == "FetchNodeClientConfig":
41
+ return FetchNodeConfig
42
+ raise AttributeError(name)
@@ -4,7 +4,7 @@ from django.conf import settings
4
4
 
5
5
  DEFAULTS = {
6
6
  "ENABLED": False,
7
- "API_URL": "https://monitor.fetchnode.com/api/events/ingest/",
7
+ "API_URL": "https://fetch-node.com/api/events/ingest/",
8
8
  "API_KEY": "",
9
9
  "ENVIRONMENT": "development",
10
10
  "RELEASE": "",
@@ -0,0 +1 @@
1
+ # Django management package
@@ -0,0 +1 @@
1
+ # Django management commands package