@maasy-ai/mcp-server 1.0.0 → 1.1.0

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.
package/README.md CHANGED
@@ -1,170 +1,129 @@
1
- # 🐙 @maasy/mcp-server
1
+ # @maasy-ai/mcp-server
2
2
 
3
- **MCP server for Maasy AI Marketing Copilot** — connect Claude to your marketing intelligence.
3
+ **MCP server for Maasy** — connect Claude to your marketing intelligence.
4
4
 
5
- ## What it does
6
-
7
- This MCP server exposes maasy's marketing AI capabilities as tools that Claude (Desktop, Code, or any MCP client) can use directly. Think of it as giving Claude a direct line to your marketing operations.
8
-
9
- ### 18 Tools Available
10
-
11
- **Brand Intelligence (3)**
12
- | Tool | Description |
13
- |------|-------------|
14
- | `maasy_list_brands` | List all brands with health status |
15
- | `maasy_scan_brand` | Deep health scan: DNA, campaigns, content, CRM, SEO, alerts |
16
- | `maasy_get_brand_context` | Full brand DNA: tone, ICP, value prop, assets, references |
17
-
18
- **Skills Management (5)** — Teach maasy new marketing knowledge
19
- | Tool | Description |
20
- |------|-------------|
21
- | `maasy_list_skills` | Browse all knowledge skills by category |
22
- | `maasy_get_skill` | Read a skill's full content |
23
- | `maasy_create_skill` | Create new marketing knowledge (auto-generates quick action pills) |
24
- | `maasy_update_skill` | Update skill content, category, or priority |
25
- | `maasy_delete_skill` | Remove a skill permanently |
26
-
27
- **Marketing Intelligence (10)**
28
- | Tool | Description |
29
- |------|-------------|
30
- | `maasy_get_alerts` | Pending copilot alerts (anomalies, opportunities, gaps) |
31
- | `maasy_get_campaign_metrics` | Ad performance: spend, CTR, CPC, ROAS |
32
- | `maasy_get_crm_summary` | CRM pipeline: leads, contacts, opportunities |
33
- | `maasy_get_content_pipeline` | Content status: drafts, scheduled, published |
34
- | `maasy_get_seo_status` | SEO/GEO scores and keyword rankings |
35
- | `maasy_generate_content` | Generate on-brand social content |
36
- | `maasy_discover_keywords` | AI keyword discovery |
37
- | `maasy_get_daily_summary` | Today's operations summary |
38
- | `maasy_execute_action` | Execute actions: reports, budget, creatives, leads |
39
-
40
- ### 3 Prompt Templates
41
-
42
- | Prompt | Description |
43
- |--------|-------------|
44
- | `brand-audit` | Complete marketing audit with recommendations |
45
- | `teach-maasy` | Create a new skill to teach maasy expertise |
46
- | `weekly-strategy` | Day-by-day marketing action plan |
47
-
48
- ### 2 Resources
49
-
50
- | Resource | URI |
51
- |----------|-----|
52
- | Active Brand Context | `maasy://brand/active` |
53
- | Skills Catalog | `maasy://skills/catalog` |
5
+ Give Claude direct access to your brand DNA, campaigns, CRM, SEO, and content pipeline. Ask Claude to scan your brand, generate content, redistribute ad budget, or create marketing skills — all from Claude Desktop or Claude Code.
54
6
 
55
7
  ---
56
8
 
57
- ## Setup
9
+ ## Quick install
58
10
 
59
- ### 1. Get your credentials
11
+ ### Claude Desktop (one click)
60
12
 
61
- You only need your **maasy login credentials** (same email/password you use in the app):
13
+ Go to **Maasy Settings API / MCP** and click **"Instalar en Claude Desktop"**. Done.
62
14
 
63
- - **Email**: Your maasy account email
64
- - **Password**: Your maasy account password
65
- - **Project ID**: (Optional) Your default brand UUID — if omitted, you'll need to pass it to each tool
15
+ ### Manual setup
66
16
 
67
- No service role key needed. The MCP server authenticates like a normal user.
68
-
69
- ### 2. Configure Claude Desktop
70
-
71
- Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
72
-
73
- ```json
74
- {
75
- "mcpServers": {
76
- "maasy": {
77
- "command": "node",
78
- "args": ["/path/to/maas-core-engine-main/mcp-server/dist/index.js"],
79
- "env": {
80
- "MAASY_SUPABASE_URL": "https://vdlaoswrgppbimjykugn.supabase.co",
81
- "MAASY_SUPABASE_ANON_KEY": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
82
- "MAASY_EMAIL": "you@email.com",
83
- "MAASY_PASSWORD": "yourpassword"
84
- }
85
- }
86
- }
87
- }
88
- ```
17
+ **Step 1:** Get your API key from [Maasy Settings API / MCP](https://app.maasy.io/settings?tab=api)
89
18
 
90
- ### 3. Configure Claude Code
19
+ **Step 2:** Add to your Claude Desktop config:
91
20
 
92
- Add to `.claude/settings.local.json` or project MCP config:
21
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
22
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
93
23
 
94
24
  ```json
95
25
  {
96
26
  "mcpServers": {
97
27
  "maasy": {
98
- "command": "node",
99
- "args": ["./mcp-server/dist/index.js"],
28
+ "command": "npx",
29
+ "args": ["@maasy-ai/mcp-server"],
100
30
  "env": {
101
31
  "MAASY_SUPABASE_URL": "https://vdlaoswrgppbimjykugn.supabase.co",
102
- "MAASY_SUPABASE_ANON_KEY": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
103
- "MAASY_EMAIL": "you@email.com",
104
- "MAASY_PASSWORD": "yourpassword"
32
+ "MAASY_API_KEY": "msy_your_api_key_here"
105
33
  }
106
34
  }
107
35
  }
108
36
  }
109
37
  ```
110
38
 
111
- ### 4. Restart Claude
112
-
113
- After configuring, restart Claude Desktop or Claude Code. You should see the maasy tools appear.
39
+ **Step 3:** Restart Claude Desktop. Maasy appears in your MCP connectors.
114
40
 
115
41
  ---
116
42
 
117
- ## Usage Examples
118
-
119
- ### Ask Claude to audit your brand
120
- > "Use maasy to scan my brand health and give me a marketing action plan"
121
-
122
- ### Teach maasy new knowledge
123
- > "Create a maasy skill about TikTok viral content strategies for e-commerce brands"
124
-
125
- ### Get marketing intelligence
126
- > "What are my pending marketing alerts? Which campaigns need attention?"
127
-
128
- ### Generate content via Claude
129
- > "Generate 5 Instagram posts for my brand using maasy, focused on our new product launch"
130
-
131
- ### Cross-brand analysis (agency use)
132
- > "List all my brands in maasy, scan each one, and tell me which needs the most attention this week"
43
+ ## What you can do
44
+
45
+ ### Brand intelligence
46
+ - Scan brand health: DNA completeness, campaigns, content, CRM, SEO, alerts
47
+ - Get full brand DNA: tone of voice, ICP, value proposition, assets, references
48
+ - List all brands with traffic-light status
49
+
50
+ ### Marketing actions
51
+ - Generate on-brand social content for any platform
52
+ - Discover SEO keywords
53
+ - Rotate fatigued ad creatives
54
+ - Redistribute budget between campaigns
55
+ - Diagnose underperforming campaigns
56
+ - Recalculate CRM lead scores
57
+ - Fill content calendar gaps
58
+
59
+ ### Skills — teach Maasy new knowledge
60
+ - Create specialized skills (e.g. "TikTok expert for pet brands")
61
+ - List, edit, and delete existing skills
62
+ - Maasy uses skills in the copilot automatically
63
+
64
+ ### Daily intelligence
65
+ - Campaign metrics: spend, CTR, CPC, ROAS
66
+ - CRM summary: hot leads, contacts, opportunities, pipeline value
67
+ - Content pipeline by status and network
68
+ - SEO/GEO visibility, mentions, citations
69
+ - Pending alerts that need attention
70
+ - Daily consolidated operations summary
133
71
 
134
72
  ---
135
73
 
136
- ## Development
74
+ ## Example prompts
137
75
 
138
- ```bash
139
- # Install dependencies
140
- npm install
76
+ ```
77
+ Scan my brand in Maasy
78
+ ```
79
+ ```
80
+ What pending alerts does my brand have?
81
+ ```
82
+ ```
83
+ Give me campaign metrics for the last 7 days
84
+ ```
85
+ ```
86
+ Generate 3 Instagram posts about my main product
87
+ ```
88
+ ```
89
+ Create a Maasy skill about email marketing for e-commerce
90
+ ```
91
+ ```
92
+ Give me today's daily summary for my main brand
93
+ ```
141
94
 
142
- # Build
143
- npm run build
95
+ ---
144
96
 
145
- # Run in dev mode (with tsx)
146
- npm run dev
97
+ ## Tools reference
147
98
 
148
- # Test manually
149
- echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | MAASY_SUPABASE_URL=... MAASY_SUPABASE_SERVICE_KEY=... node dist/index.js
150
- ```
99
+ | Tool | Description |
100
+ |------|-------------|
101
+ | `maasy_list_brands` | List all brands with basic info and health status |
102
+ | `maasy_scan_brand` | Deep health scan across DNA, campaigns, content, CRM, SEO |
103
+ | `maasy_get_brand_context` | Full brand DNA: tone, ICP, value prop, colors, assets |
104
+ | `maasy_get_alerts` | Pending copilot alerts: anomalies, opportunities, gaps |
105
+ | `maasy_get_campaign_metrics` | Ad performance: spend, CTR, CPC, ROAS by period |
106
+ | `maasy_get_crm_summary` | CRM pipeline: hot leads, contacts, opportunities, value |
107
+ | `maasy_get_content_pipeline` | Content status by network and publication state |
108
+ | `maasy_get_seo_status` | SEO/GEO scores, keyword rankings, citations |
109
+ | `maasy_get_daily_summary` | Consolidated daily summary of all operations |
110
+ | `maasy_generate_content` | Generate on-brand content for any platform |
111
+ | `maasy_discover_keywords` | AI-powered keyword discovery for SEO |
112
+ | `maasy_execute_action` | Execute actions: reports, budget, creatives, lead scoring |
113
+ | `maasy_list_skills` | Browse all Maasy copilot skills by category |
114
+ | `maasy_get_skill` | Read a skill's full content |
115
+ | `maasy_create_skill` | Create new marketing knowledge skill |
116
+ | `maasy_update_skill` | Update skill content, category, or priority |
117
+ | `maasy_delete_skill` | Remove a skill permanently |
151
118
 
152
119
  ---
153
120
 
154
- ## Architecture
155
-
156
- ```
157
- Claude Desktop / Claude Code / Any MCP Client
158
- ↓ MCP Protocol (stdio)
159
- @maasy/mcp-server (Node.js)
160
- ↓ Supabase Client (service role)
161
- Supabase PostgreSQL + Edge Functions
162
-
163
- maasy AI Engine (Gemini 2.5 Flash/Pro)
164
- ```
121
+ ## Requirements
165
122
 
166
- The MCP server reuses the same Supabase infrastructure that powers the maasy web app. Skills created via MCP are immediately available in the web copilot, and vice versa.
123
+ - Node.js 18+
124
+ - A [Maasy](https://maasy.io) account
125
+ - Claude Desktop or any MCP-compatible client
167
126
 
168
127
  ---
169
128
 
170
- Built with 🐙 by the maasy team
129
+ Built by the [Maasy](https://maasy.io) team
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Gateway client — calls mcp-gateway edge function with API key auth.
3
- * No service role key or email/password needed.
2
+ * Gateway client — calls mcp-gateway edge function.
3
+ * Auth priority: MAASY_ACCESS_TOKEN (OAuth) MAASY_API_KEY (legacy API key)
4
4
  */
5
5
  export declare function initGateway(): void;
6
6
  /**
package/dist/supabase.js CHANGED
@@ -1,21 +1,33 @@
1
1
  /**
2
- * Gateway client — calls mcp-gateway edge function with API key auth.
3
- * No service role key or email/password needed.
2
+ * Gateway client — calls mcp-gateway edge function.
3
+ * Auth priority: MAASY_ACCESS_TOKEN (OAuth) MAASY_API_KEY (legacy API key)
4
4
  */
5
5
  const GATEWAY_URL_TEMPLATE = "{base}/functions/v1/mcp-gateway";
6
6
  let gatewayUrl = "";
7
- let apiKey = "";
7
+ let authHeader;
8
8
  export function initGateway() {
9
9
  const base = process.env.MAASY_SUPABASE_URL;
10
- apiKey = process.env.MAASY_API_KEY || "";
10
+ const oauthToken = process.env.MAASY_ACCESS_TOKEN;
11
+ const apiKey = process.env.MAASY_API_KEY;
11
12
  if (!base) {
12
13
  throw new Error("Missing MAASY_SUPABASE_URL.\n" + "Set it to: https://vdlaoswrgppbimjykugn.supabase.co");
13
14
  }
14
- if (!apiKey) {
15
- throw new Error("Missing MAASY_API_KEY.\n" + "Generate one in maasy Settings API Key, then add it to your MCP config.");
15
+ if (oauthToken) {
16
+ // OAuth path token was set by Claude Desktop after the OAuth flow
17
+ authHeader = { name: "Authorization", value: `Bearer ${oauthToken}` };
18
+ console.error("✅ Gateway (OAuth): authenticated");
19
+ }
20
+ else if (apiKey) {
21
+ // Legacy API key path
22
+ authHeader = { name: "x-api-key", value: apiKey };
23
+ console.error("✅ Gateway (API key): authenticated");
24
+ }
25
+ else {
26
+ throw new Error("Missing authentication.\n" +
27
+ "Either complete the OAuth flow in MAASY → Settings → API / MCP\n" +
28
+ "or set MAASY_API_KEY to your API key.");
16
29
  }
17
30
  gatewayUrl = GATEWAY_URL_TEMPLATE.replace("{base}", base);
18
- console.error(`✅ Gateway: ${gatewayUrl}`);
19
31
  }
20
32
  /**
21
33
  * Call a tool via the mcp-gateway edge function.
@@ -25,7 +37,7 @@ export async function callGateway(tool, args = {}) {
25
37
  method: "POST",
26
38
  headers: {
27
39
  "Content-Type": "application/json",
28
- "x-api-key": apiKey,
40
+ [authHeader.name]: authHeader.value,
29
41
  },
30
42
  body: JSON.stringify({ tool, args }),
31
43
  });
@@ -1 +1 @@
1
- {"version":3,"file":"supabase.js","sourceRoot":"","sources":["../src/supabase.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,oBAAoB,GAAG,iCAAiC,CAAC;AAE/D,IAAI,UAAU,GAAG,EAAE,CAAC;AACpB,IAAI,MAAM,GAAG,EAAE,CAAC;AAEhB,MAAM,UAAU,WAAW;IACzB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;IAC5C,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC;IAEzC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,+BAA+B,GAAG,qDAAqD,CAAC,CAAC;IAC3G,CAAC;IACD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,0BAA0B,GAAG,6EAA6E,CAC3G,CAAC;IACJ,CAAC;IAED,UAAU,GAAG,oBAAoB,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC1D,OAAO,CAAC,KAAK,CAAC,cAAc,UAAU,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAY,EAAE,OAAgC,EAAE;IAChF,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,UAAU,EAAE;QAClC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,WAAW,EAAE,MAAM;SACpB;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;KACrC,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAA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oB,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAY,EAAE,OAAgC,EAAE;IAChF,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,UAAU,EAAE;QAClC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,KAAK;SACpC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;KACrC,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IAE9B,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,kBAAkB,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maasy-ai/mcp-server",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "MCP server for Maasy AI Marketing Copilot — connect Claude to your marketing intelligence",
5
5
  "type": "module",
6
6
  "bin": {
@@ -19,7 +19,7 @@
19
19
  "homepage": "https://maasy.io",
20
20
  "repository": {
21
21
  "type": "git",
22
- "url": "https://github.com/maasy-ai/mcp-server"
22
+ "url": "https://github.com/Jbelieve/mcp-server"
23
23
  },
24
24
  "bugs": {
25
25
  "url": "https://github.com/maasy-ai/mcp-server/issues"