-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/blog mcp #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/blog mcp #92
Conversation
- Introduced a new workspace for the blog-mcp module, including package.json and README. - Implemented content extraction using Firecrawl and state persistence with Supabase. - Added tools for processing URLs, checking updates, and managing watermarks. - Created necessary TypeScript configurations and utility functions for content normalization and fingerprinting. - Updated bun.lock and package.json to include new dependencies for the blog-mcp module.
- Added SUPABASE binding in wrangler.toml for enhanced database integration. - Updated StateSchema to reflect the use of Supabase via MCP binding. - Refactored Supabase client implementation to utilize the new binding for state persistence, including content management and watermark handling. - Adjusted client retrieval in blog tools to accommodate the new storage method.
- Updated `deco-cli` version to `0.28.0` across multiple packages for improved functionality. - Added new MCPs: `google-calendar`, `grain-official`, `mcp-studio`, `meta-ads`, and `reddit`, including their respective configurations and initial implementations. - Introduced new app.json and README files for the newly added MCPs to provide necessary documentation and metadata. - Enhanced existing workflows by adding `META_ACCESS_TOKEN` to deployment configurations for better integration. - Cleaned up and organized project structure by removing unnecessary files and ensuring consistency across configurations.
🚀 Preview Deployments Ready!Your changes have been deployed to preview environments: 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 15 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="blog-mcp/server/tools/blog.ts">
<violation number="1" location="blog-mcp/server/tools/blog.ts:214">
P2: Potential duplicate entries when both `domain` and `urls` are provided. If a URL belongs to the specified domain, it will appear twice in the results. Consider deduplicating by URL or using `else if` to make the filters mutually exclusive.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
content-scraper/server/tools/blog.ts
Outdated
| } | ||
| } | ||
|
|
||
| if (input.urls) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Potential duplicate entries when both domain and urls are provided. If a URL belongs to the specified domain, it will appear twice in the results. Consider deduplicating by URL or using else if to make the filters mutually exclusive.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At blog-mcp/server/tools/blog.ts, line 214:
<comment>Potential duplicate entries when both `domain` and `urls` are provided. If a URL belongs to the specified domain, it will appear twice in the results. Consider deduplicating by URL or using `else if` to make the filters mutually exclusive.</comment>
<file context>
@@ -0,0 +1,288 @@
+ }
+ }
+
+ if (input.urls) {
+ for (const url of input.urls) {
+ const dedup = await storage.checkFingerprint(url, "");
</file context>
…ion and summarization MCP - Introduced package.json for project dependencies and scripts. - Added README.md detailing features, setup instructions, and available tools. - Implemented TypeScript configuration in tsconfig.json. - Created Vite configuration for building the project. - Developed core server logic in main.ts, including state schema and environment setup. - Implemented content processing utilities in content.ts for normalization and summarization. - Added Firecrawl API client in firecrawl.ts for content extraction. - Integrated Supabase for state persistence in supabase.ts. - Developed tools for processing URLs, checking updates, and managing watermarks in scraper.ts. - Generated types for Deco integration in deco.gen.ts. - Established project structure with organized directories for server, shared, and tools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 issues found across 45 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="google-tag-manager/server/tools/tags.ts">
<violation number="1">
P2: Tag object mapping is duplicated 4 times. Consider extracting to a helper function to improve maintainability and reduce the risk of inconsistent updates.</violation>
</file>
<file name="google-tag-manager/server/constants.ts">
<violation number="1">
P1: Duplicate value "jsm" assigned to both `JAVASCRIPT_VARIABLE` and `CUSTOM_JAVASCRIPT`. In Google Tag Manager API, JavaScript Variable type is typically "j" (for reading global JS variables), while Custom JavaScript is "jsm" (for custom code snippets). Having identical values makes these constants indistinguishable.</violation>
</file>
<file name="mcp-studio/server/tools/execution.ts">
<violation number="1">
P1: Silent failure when `workflow_collection_id` doesn't resolve to a valid collection. If the user provides a `workflow_collection_id` but the collection doesn't exist, the code silently continues with empty steps instead of throwing an error. This could create executions that unexpectedly do nothing.</violation>
</file>
<file name="google-tag-manager/server/main.ts">
<violation number="1">
P1: Using module-level state `lastRedirectUri` creates a race condition. In concurrent scenarios, one user's redirect URI could be overwritten by another user before token exchange completes. Consider passing the redirect_uri through the OAuth state parameter (encrypted) or having the framework provide it during `exchangeCode`.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
… remove unused components - Updated the content scraper to utilize n8n for web content extraction. - Removed Firecrawl API client and related content processing utilities. - Simplified the state schema and eliminated contract-related types and bindings. - Streamlined the tools for scraping content, focusing on the new n8n integration. - Cleaned up the project by deleting unused files and code related to previous implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 issues found across 10 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="content-scraper/wrangler.toml">
<violation number="1" location="content-scraper/wrangler.toml:14">
P2: Description mentions 'n8n workflow automation' but the README and PR description indicate this MCP uses Firecrawl and Supabase. This creates a misleading user-facing description that doesn't match the actual implementation.</violation>
</file>
<file name="content-scraper/server/tools/scraper.ts">
<violation number="1" location="content-scraper/server/tools/scraper.ts:8">
P1: The URL contains `webhook-test` which is n8n's test endpoint path. Test webhooks in n8n are only active when the workflow editor is open. For production, use the production webhook path (`webhook` instead of `webhook-test`).</violation>
<violation number="2" location="content-scraper/server/tools/scraper.ts:9">
P1: Hardcoded webhook URL should be moved to environment configuration. External service endpoints should come from `env` (which is already passed but unused) to support different environments and avoid exposing infrastructure details in source code.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| import { createTool } from "@decocms/runtime/mastra"; | ||
| import type { Env } from "../main.ts"; | ||
|
|
||
| const N8N_WEBHOOK_URL = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: The URL contains webhook-test which is n8n's test endpoint path. Test webhooks in n8n are only active when the workflow editor is open. For production, use the production webhook path (webhook instead of webhook-test).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At content-scraper/server/tools/scraper.ts, line 8:
<comment>The URL contains `webhook-test` which is n8n's test endpoint path. Test webhooks in n8n are only active when the workflow editor is open. For production, use the production webhook path (`webhook` instead of `webhook-test`).</comment>
<file context>
@@ -1,292 +1,60 @@
- return { processed: results, stats };
- },
- });
+const N8N_WEBHOOK_URL =
+ "https://ventura29.app.n8n.cloud/webhook-test/get-content-scrape";
</file context>
✅ Addressed in da4b640
| import type { Env } from "../main.ts"; | ||
|
|
||
| const N8N_WEBHOOK_URL = | ||
| "https://ventura29.app.n8n.cloud/webhook-test/get-content-scrape"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: Hardcoded webhook URL should be moved to environment configuration. External service endpoints should come from env (which is already passed but unused) to support different environments and avoid exposing infrastructure details in source code.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At content-scraper/server/tools/scraper.ts, line 9:
<comment>Hardcoded webhook URL should be moved to environment configuration. External service endpoints should come from `env` (which is already passed but unused) to support different environments and avoid exposing infrastructure details in source code.</comment>
<file context>
@@ -1,292 +1,60 @@
- },
- });
+const N8N_WEBHOOK_URL =
+ "https://ventura29.app.n8n.cloud/webhook-test/get-content-scrape";
/**
</file context>
✅ Addressed in da4b640
content-scraper/wrangler.toml
Outdated
| local = false | ||
|
|
||
| [deco.integration] | ||
| description = "Scrape web content from URLs using n8n workflow automation." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Description mentions 'n8n workflow automation' but the README and PR description indicate this MCP uses Firecrawl and Supabase. This creates a misleading user-facing description that doesn't match the actual implementation.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At content-scraper/wrangler.toml, line 14:
<comment>Description mentions 'n8n workflow automation' but the README and PR description indicate this MCP uses Firecrawl and Supabase. This creates a misleading user-facing description that doesn't match the actual implementation.</comment>
<file context>
@@ -11,29 +11,6 @@ enable_workflows = false
[deco.integration]
-description = "Extract, deduplicate and summarize web content from URLs using Firecrawl. Persists state in Supabase to avoid reprocessing."
+description = "Scrape web content from URLs using n8n workflow automation."
icon = "https://assets.decocache.com/mcp/content-scraper-icon.svg"
friendlyName = "Content Scraper"
</file context>
| description = "Scrape web content from URLs using n8n workflow automation." | |
| description = "Extract, deduplicate and summarize web content from URLs using Firecrawl. Persists state in Supabase to avoid reprocessing." |
✅ Addressed in 02a55bf
…m deco.gen.ts - Eliminated unused types and interfaces from the generated TypeScript file. - Cleaned up the file to streamline the codebase and improve maintainability. - Ensured that the file remains auto-generated and should not be manually edited.
- Replaced deprecated createTool with createPrivateTool in scraper.ts. - Adjusted function signature for scrapeContentTool to improve clarity and maintainability.
- Deleted the deco.gen.ts file as part of the ongoing cleanup and refactoring efforts. - This removal aligns with the previous commit to eliminate deprecated types and interfaces, further streamlining the codebase.
… and schemas - Added a new deco.gen.ts file containing generated types for MCP and an empty StateSchema. - Defined the Env interface for environment variables and included an empty Scopes object. - This update aligns with the ongoing efforts to streamline the codebase while providing necessary type definitions for future development.
…ate dependencies - Renamed the workspace from "blog-mcp" to "content-scraper" in package.json and bun.lock. - Updated dependencies in content-scraper's package.json, including @decocms/runtime to version ^1.1.0 and zod to version ^4.0.0. - Introduced app.json for the content-scraper with connection details and description. - Removed outdated Vite and Wrangler configuration files to streamline the project structure. - Adjusted TypeScript configuration to reflect the new project structure and dependencies.
- Introduced a new build script for the server targeting Bun, allowing for a more streamlined build process. - Updated the existing build script to run the new server build command, enhancing project structure and maintainability.
…hook URL - Modified the scrapeContentTool to retrieve the n8n webhook URL from the environment state instead of a hardcoded value. - Updated the StateSchema to include the n8nWebhookUrl, enhancing flexibility and configurability for content scraping.
Summary by cubic
Adds a new Content Scraper MCP that scrapes web pages via an n8n workflow. Provides a scrape_content tool to fetch and return extracted data from a URL.
Written for commit da4b640. Summary will update on new commits.