@wisewandtools/mcp-server 2.0.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/LICENSE +21 -0
- package/README.md +727 -0
- package/dist/index.d.ts +317 -0
- package/dist/index.js +5651 -0
- package/dist/index.js.map +1 -0
- package/package.json +83 -0
package/README.md
ADDED
|
@@ -0,0 +1,727 @@
|
|
|
1
|
+
# Wisewand MCP Server
|
|
2
|
+
|
|
3
|
+
Production-ready Model Context Protocol (MCP) server for Wisewand API, enabling AI assistants like Claude to generate SEO-optimized content through natural conversation.
|
|
4
|
+
|
|
5
|
+
> **📚 Choose Your Guide:**
|
|
6
|
+
> - 🏁 [**Getting Started (5 min)**](./GETTING_STARTED.md) - Quickest path to your first article
|
|
7
|
+
> - 🚀 [**Installation Guide**](./INSTALL.md) - Detailed step-by-step for beginners
|
|
8
|
+
> - ⚡ [**Quick Reference**](./QUICK_REFERENCE.md) - Cheat sheet for common tasks
|
|
9
|
+
> - 📖 **Full Documentation** - See below
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- 🚀 **Complete API Coverage**: All Wisewand API endpoints wrapped as MCP tools
|
|
14
|
+
- 🔄 **Robust Error Handling**: Automatic retries with exponential backoff
|
|
15
|
+
- 💾 **Intelligent Caching**: Multi-tier caching (memory + Redis)
|
|
16
|
+
- 🔒 **Security First**: Rate limiting, API key management, input validation
|
|
17
|
+
- 📊 **Comprehensive Monitoring**: Prometheus metrics, health checks, logging
|
|
18
|
+
- 🎯 **SEO Optimization**: Built-in support for all Wisewand SEO features
|
|
19
|
+
- 📦 **Bulk Operations**: Efficient batch processing for large-scale content
|
|
20
|
+
- 🌍 **Multi-language**: Support for French and English with localization
|
|
21
|
+
- 📱 **Social Media**: Generate posts for Instagram, Facebook, X, LinkedIn
|
|
22
|
+
- 🎨 **Image Generation**: Custom images with color palettes and ratios
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
> 👉 **New to MCP servers?** Start with the [Step-by-Step Installation Guide (INSTALL.md)](./INSTALL.md) - it's beginner-friendly!
|
|
27
|
+
|
|
28
|
+
### Prerequisites
|
|
29
|
+
|
|
30
|
+
- **Node.js 20+** (check with `node --version`)
|
|
31
|
+
- **npm** (comes with Node.js)
|
|
32
|
+
- **Wisewand API key** ([Get yours here](https://wisewand.ai))
|
|
33
|
+
- **Claude Desktop** (for using with Claude AI)
|
|
34
|
+
|
|
35
|
+
### NPM Installation (Easiest) ⭐
|
|
36
|
+
|
|
37
|
+
Install globally via npm:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install -g @wisewand/mcp-server
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Or use with **npx** (no installation needed - recommended):
|
|
44
|
+
|
|
45
|
+
#### Configure Claude Desktop
|
|
46
|
+
|
|
47
|
+
**Find your configuration file:**
|
|
48
|
+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
49
|
+
- **Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
|
|
50
|
+
- **Linux**: `~/.config/Claude/claude_desktop_config.json`
|
|
51
|
+
|
|
52
|
+
**Add this configuration:**
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"mcpServers": {
|
|
57
|
+
"wisewand": {
|
|
58
|
+
"command": "npx",
|
|
59
|
+
"args": ["-y", "@wisewand/mcp-server"],
|
|
60
|
+
"env": {
|
|
61
|
+
"WISEWAND_API_KEY": "sk_live_YOUR_API_KEY_HERE"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Restart Claude Desktop** and you're ready to go! 🎉
|
|
69
|
+
|
|
70
|
+
> 💡 **Tip**: With npx, the package is always downloaded fresh, so you automatically get the latest version.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
### Local Installation (For Development)
|
|
75
|
+
|
|
76
|
+
#### Step 1: Clone and Setup
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Clone the repository
|
|
80
|
+
git clone https://github.com/wisewand/mcp-wisewand.git
|
|
81
|
+
cd mcp-wisewand
|
|
82
|
+
|
|
83
|
+
# Install dependencies
|
|
84
|
+
npm install
|
|
85
|
+
|
|
86
|
+
# Copy environment template
|
|
87
|
+
cp .env.example .env
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### Step 2: Configure Your API Key
|
|
91
|
+
|
|
92
|
+
Edit `.env` file and add your Wisewand API key:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Required
|
|
96
|
+
WISEWAND_API_KEY=sk_live_YOUR_API_KEY_HERE
|
|
97
|
+
|
|
98
|
+
# Optional (recommended for production)
|
|
99
|
+
NODE_ENV=production
|
|
100
|
+
LOG_LEVEL=error
|
|
101
|
+
ENABLE_CACHE=true
|
|
102
|
+
CACHE_STRATEGY=memory
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
#### Step 3: Build the Project
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npm run build
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
This compiles TypeScript to JavaScript in the `dist/` folder.
|
|
112
|
+
|
|
113
|
+
#### Step 4: Configure Claude Desktop
|
|
114
|
+
|
|
115
|
+
**Find your Claude configuration file:**
|
|
116
|
+
|
|
117
|
+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
118
|
+
- **Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
|
|
119
|
+
- **Linux**: `~/.config/Claude/claude_desktop_config.json`
|
|
120
|
+
|
|
121
|
+
**Add this configuration** (see [claude-desktop-config-example.json](./claude-desktop-config-example.json)):
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"mcpServers": {
|
|
126
|
+
"wisewand": {
|
|
127
|
+
"command": "npx",
|
|
128
|
+
"args": ["tsx", "/absolute/path/to/mcp-wisewand/src/index.ts"],
|
|
129
|
+
"env": {
|
|
130
|
+
"WISEWAND_API_KEY": "sk_live_YOUR_API_KEY_HERE",
|
|
131
|
+
"NODE_ENV": "production",
|
|
132
|
+
"MCP_MODE": "stdio",
|
|
133
|
+
"LOG_LEVEL": "error",
|
|
134
|
+
"ENABLE_CACHE": "true",
|
|
135
|
+
"ENABLE_METRICS": "false"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**⚠️ IMPORTANT REPLACEMENTS:**
|
|
143
|
+
1. Replace `/absolute/path/to/mcp-wisewand/src/index.ts` with your actual path (use `pwd` to get it)
|
|
144
|
+
2. Replace `sk_live_YOUR_API_KEY_HERE` with your Wisewand API key
|
|
145
|
+
|
|
146
|
+
**💡 Pro Tip**: Use `npx tsx` instead of `node dist/index.js` for development - it automatically recompiles on changes!
|
|
147
|
+
|
|
148
|
+
#### Step 5: Restart Claude Desktop
|
|
149
|
+
|
|
150
|
+
1. **Quit Claude Desktop completely** (Cmd+Q on macOS)
|
|
151
|
+
2. **Reopen Claude Desktop**
|
|
152
|
+
3. Look for the **🔌 MCP icon** at the bottom of the chat window
|
|
153
|
+
4. You should see **"wisewand"** listed as a connected server
|
|
154
|
+
|
|
155
|
+
#### Step 6: Verify Installation
|
|
156
|
+
|
|
157
|
+
In Claude Desktop, type:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
Can you list all available Wisewand tools?
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
You should see 43 tools including `create_article`, `generate_article`, `publish_to_wordpress`, etc.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Installation Verification Checklist
|
|
168
|
+
|
|
169
|
+
After installation, verify everything works:
|
|
170
|
+
|
|
171
|
+
- [ ] **Dependencies installed**: `npm install` completed without errors
|
|
172
|
+
- [ ] **Build successful**: `npm run build` completed
|
|
173
|
+
- [ ] **Server starts**: `npx tsx src/index.ts` runs without errors (Ctrl+C to stop)
|
|
174
|
+
- [ ] **Claude Desktop config**: File exists and has wisewand entry
|
|
175
|
+
- [ ] **Absolute path**: Path in config points to your installation directory
|
|
176
|
+
- [ ] **API key set**: Both `.env` and `claude_desktop_config.json` have valid key
|
|
177
|
+
- [ ] **Claude restarted**: Fully quit and reopened Claude Desktop
|
|
178
|
+
- [ ] **MCP connected**: 🔌 icon shows wisewand server in Claude
|
|
179
|
+
- [ ] **Tools available**: Ask Claude "List Wisewand tools" shows 43 tools
|
|
180
|
+
|
|
181
|
+
### Need Help?
|
|
182
|
+
|
|
183
|
+
If any checkbox fails, see the [Troubleshooting](#troubleshooting) section below.
|
|
184
|
+
|
|
185
|
+
### Docker Installation (Alternative)
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Using Docker Compose
|
|
189
|
+
docker-compose up -d
|
|
190
|
+
|
|
191
|
+
# Or using Docker directly
|
|
192
|
+
docker build -t wisewand-mcp .
|
|
193
|
+
docker run -p 3000:3000 -p 9090:9090 \
|
|
194
|
+
-e WISEWAND_API_KEY=your_key \
|
|
195
|
+
wisewand-mcp
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Configuration
|
|
199
|
+
|
|
200
|
+
### Environment Variables
|
|
201
|
+
|
|
202
|
+
| Variable | Description | Default |
|
|
203
|
+
|----------|-------------|---------|
|
|
204
|
+
| `WISEWAND_API_KEY` | Your Wisewand API key (required) | - |
|
|
205
|
+
| `NODE_ENV` | Environment (development/production) | production |
|
|
206
|
+
| `LOG_LEVEL` | Logging level (error/warn/info/debug) | info |
|
|
207
|
+
| `ENABLE_CACHE` | Enable caching | true |
|
|
208
|
+
| `CACHE_STRATEGY` | Cache strategy (memory/redis/hybrid) | memory |
|
|
209
|
+
| `REDIS_HOST` | Redis host | localhost |
|
|
210
|
+
| `REDIS_PORT` | Redis port | 6379 |
|
|
211
|
+
| `MAX_REQUESTS_PER_MINUTE` | Rate limit | 60 |
|
|
212
|
+
| `ENABLE_METRICS` | Enable Prometheus metrics | true |
|
|
213
|
+
| `METRICS_PORT` | Metrics server port | 9090 |
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## How to Use
|
|
218
|
+
|
|
219
|
+
### Basic Workflow
|
|
220
|
+
|
|
221
|
+
Once installed, you can use Wisewand through natural conversation with Claude:
|
|
222
|
+
|
|
223
|
+
#### **1. Create an Article**
|
|
224
|
+
|
|
225
|
+
Simply ask Claude:
|
|
226
|
+
```
|
|
227
|
+
Create a blog article about "10 Best SEO Tips for 2024" targeting the keyword "SEO tips 2024" with FAQ and table of contents
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Claude will use the `create_article` tool with the appropriate parameters.
|
|
231
|
+
|
|
232
|
+
#### **2. Generate Content**
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
Generate the article we just created and wait for completion
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Claude will use `generate_article` to process your content (takes 30-180 seconds).
|
|
239
|
+
|
|
240
|
+
#### **3. Get the Content**
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
Show me the full article content
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Claude will use `get_article_output` to retrieve the generated markdown/HTML.
|
|
247
|
+
|
|
248
|
+
#### **4. Publish to WordPress** (optional)
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
Publish this article to WordPress as a draft
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Claude will use `publish_to_wordpress` if you have a WordPress connection configured.
|
|
255
|
+
|
|
256
|
+
### Advanced Usage
|
|
257
|
+
|
|
258
|
+
#### **Create Project for Organization**
|
|
259
|
+
```
|
|
260
|
+
Create a project called "My Tech Blog" for website techblog.com with English as default language
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
#### **Define Custom Writing Style**
|
|
264
|
+
```
|
|
265
|
+
Create a persona called "Tech Expert" with an authoritative tone, technical style, and first-person plural voice
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
#### **Bulk Content Generation**
|
|
269
|
+
```
|
|
270
|
+
Create 5 blog articles about: AI basics, Machine Learning, Neural Networks, Deep Learning, and Computer Vision. Auto-generate all of them.
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
#### **Social Media Generation** (NEW!)
|
|
274
|
+
```
|
|
275
|
+
Create an article about "AI in Healthcare 2024" with social media posts for Instagram and LinkedIn
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
#### **Custom Image Generation**
|
|
279
|
+
```
|
|
280
|
+
Create an article with a featured image using color palette #FF6B6B and #4ECDC4, and inline images with landscape ratio
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
## Complete Workflow Example
|
|
286
|
+
|
|
287
|
+
Here's a complete example of creating and publishing an article:
|
|
288
|
+
|
|
289
|
+
### Conversation with Claude:
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
You: "I need to create an SEO article about '10 Best AI Tools for Content Creation'
|
|
293
|
+
targeting the keyword 'AI content tools 2024'. Include FAQ, table of contents,
|
|
294
|
+
and generate a featured image with inline images."
|
|
295
|
+
|
|
296
|
+
Claude: [Uses create_article tool]
|
|
297
|
+
✅ Article created with ID: abc-123-def
|
|
298
|
+
|
|
299
|
+
You: "Great! Now generate the content and wait until it's ready."
|
|
300
|
+
|
|
301
|
+
Claude: [Uses generate_article tool with wait_for_completion: true]
|
|
302
|
+
⏳ Generating... (this takes ~60-120 seconds)
|
|
303
|
+
✅ Article generated successfully!
|
|
304
|
+
- Word count: 2,847 words
|
|
305
|
+
- SEO score: 94/100
|
|
306
|
+
- FAQ: 8 questions generated
|
|
307
|
+
- Images: 1 featured + 3 inline images
|
|
308
|
+
|
|
309
|
+
You: "Show me the title and excerpt"
|
|
310
|
+
|
|
311
|
+
Claude: [Uses get_article_output tool]
|
|
312
|
+
📄 Title: "10 Best AI Tools for Content Creation in 2024"
|
|
313
|
+
📝 Excerpt: "Discover the most powerful AI tools transforming
|
|
314
|
+
content creation. From writing assistants to image generators..."
|
|
315
|
+
|
|
316
|
+
You: "Perfect! Publish this to WordPress as a draft."
|
|
317
|
+
|
|
318
|
+
Claude: [Uses publish_to_wordpress tool]
|
|
319
|
+
✅ Published to WordPress as draft
|
|
320
|
+
🔗 URL: https://yourblog.com/wp-admin/post.php?post=456
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### What Just Happened?
|
|
324
|
+
|
|
325
|
+
1. **Created** an article with SEO configuration
|
|
326
|
+
2. **Generated** content using Wisewand AI (with FAQ, TOC, images)
|
|
327
|
+
3. **Retrieved** the output to preview
|
|
328
|
+
4. **Published** to WordPress automatically
|
|
329
|
+
|
|
330
|
+
All through natural conversation! 🎉
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## Alternative Installation Methods
|
|
335
|
+
|
|
336
|
+
## Available Tools (43 Total - Complete API Coverage!)
|
|
337
|
+
|
|
338
|
+
### 📝 Content Generation (7 tools)
|
|
339
|
+
- `create_article` - Create SEO-optimized articles with 54 configuration options
|
|
340
|
+
- `generate_article` - Generate content for articles (async, waits for completion)
|
|
341
|
+
- `get_article` - Retrieve article details and status
|
|
342
|
+
- `list_articles` - List and search articles with filtering
|
|
343
|
+
- `update_article` - Update article settings
|
|
344
|
+
- `get_article_output` - Get generated content (markdown/HTML)
|
|
345
|
+
- `estimate_article_cost` - Calculate generation costs before creating
|
|
346
|
+
|
|
347
|
+
### 📁 Project Management (5 tools)
|
|
348
|
+
- `create_project` - Create content projects for organization
|
|
349
|
+
- `get_project` - Get project details
|
|
350
|
+
- `list_projects` - List all projects
|
|
351
|
+
- `update_project` - Update project settings
|
|
352
|
+
- `delete_project` - Delete projects (requires confirmation)
|
|
353
|
+
|
|
354
|
+
### ✍️ Personas & Style (5 tools)
|
|
355
|
+
- `create_persona` - Define custom writing styles and voices
|
|
356
|
+
- `get_persona` - Get persona details
|
|
357
|
+
- `list_personas` - List all personas
|
|
358
|
+
- `update_persona` - Update persona settings
|
|
359
|
+
- `delete_persona` - Delete personas (requires confirmation)
|
|
360
|
+
|
|
361
|
+
### 🔌 Connections (5 tools)
|
|
362
|
+
- `list_connections` - List all WordPress and webhook connections
|
|
363
|
+
- `get_connection` - Get connection details by ID
|
|
364
|
+
- `create_connection` - Create new WordPress or webhook connection
|
|
365
|
+
- `update_connection` - Update existing connection configuration
|
|
366
|
+
- `delete_connection` - Delete connection (requires confirmation)
|
|
367
|
+
|
|
368
|
+
### 🚀 Publishing (2 tools)
|
|
369
|
+
- `publish_to_wordpress` - Publish to WordPress sites
|
|
370
|
+
- `trigger_webhook` - Send content via webhooks
|
|
371
|
+
|
|
372
|
+
### 📦 Bulk Operations (2 tools)
|
|
373
|
+
- `bulk_create_articles` - Create multiple articles at once (up to 100)
|
|
374
|
+
- `bulk_estimate_cost` - Estimate costs for bulk generation
|
|
375
|
+
|
|
376
|
+
### 🏪 E-commerce Content (8 tools)
|
|
377
|
+
|
|
378
|
+
**Category Pages:**
|
|
379
|
+
- `create_category_page` - Create SEO-optimized category landing pages
|
|
380
|
+
- `get_category_page` - Get category page details and status
|
|
381
|
+
- `generate_category_page` - Generate category page content
|
|
382
|
+
- `get_category_page_output` - Get generated category page content
|
|
383
|
+
|
|
384
|
+
**Product Pages:**
|
|
385
|
+
- `create_product_page` - Create product description pages
|
|
386
|
+
- `get_product_page` - Get product page details and status
|
|
387
|
+
- `generate_product_page` - Generate product page content
|
|
388
|
+
- `get_product_page_output` - Get generated product page content
|
|
389
|
+
|
|
390
|
+
### 🔍 Content Discovery & Automation (6 tools)
|
|
391
|
+
|
|
392
|
+
**Content Discovery:**
|
|
393
|
+
- `discover_content` - AI-powered content topic and keyword discovery
|
|
394
|
+
- `get_discover_result` - Get discovery results and suggestions
|
|
395
|
+
- `run_discovery` - Execute content discovery process
|
|
396
|
+
|
|
397
|
+
**RSS Automation:**
|
|
398
|
+
- `create_rss_trigger` - Create automated RSS-to-content trigger
|
|
399
|
+
- `get_rss_trigger` - Get RSS trigger configuration and status
|
|
400
|
+
- `run_rss_trigger` - Manually execute RSS feed processing
|
|
401
|
+
|
|
402
|
+
### 🛠️ Utility Tools (3 tools)
|
|
403
|
+
- `get_authors` - Get available WordPress authors for publishing
|
|
404
|
+
- `get_categories` - Get available WordPress categories
|
|
405
|
+
- `get_usage_summary` - Get account usage statistics and limits
|
|
406
|
+
|
|
407
|
+
## Usage Examples
|
|
408
|
+
|
|
409
|
+
### Create and Generate an Article
|
|
410
|
+
|
|
411
|
+
```javascript
|
|
412
|
+
// Create article
|
|
413
|
+
const article = await create_article({
|
|
414
|
+
subject: "10 Best SEO Tips for 2024",
|
|
415
|
+
target_keyword: "SEO tips 2024",
|
|
416
|
+
lang: "en",
|
|
417
|
+
seo_features: {
|
|
418
|
+
use_faq: true,
|
|
419
|
+
use_toc: true,
|
|
420
|
+
use_boldkeywords: true
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
// Generate content
|
|
425
|
+
await generate_article({
|
|
426
|
+
article_id: article.article_id,
|
|
427
|
+
wait_for_completion: true
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
// Get output
|
|
431
|
+
const output = await get_article_output({
|
|
432
|
+
article_id: article.article_id
|
|
433
|
+
});
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
### Bulk Content Generation
|
|
437
|
+
|
|
438
|
+
```javascript
|
|
439
|
+
// Create multiple articles
|
|
440
|
+
await bulk_create_articles({
|
|
441
|
+
articles: [
|
|
442
|
+
{ subject: "Topic 1", target_keyword: "keyword1" },
|
|
443
|
+
{ subject: "Topic 2", target_keyword: "keyword2" },
|
|
444
|
+
{ subject: "Topic 3", target_keyword: "keyword3" }
|
|
445
|
+
],
|
|
446
|
+
auto_generate: true
|
|
447
|
+
});
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
## API Documentation
|
|
451
|
+
|
|
452
|
+
### Tool Response Format
|
|
453
|
+
|
|
454
|
+
All tools return responses in this format:
|
|
455
|
+
|
|
456
|
+
```json
|
|
457
|
+
{
|
|
458
|
+
"success": true,
|
|
459
|
+
"data": {},
|
|
460
|
+
"message": "Operation completed successfully"
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
Error responses:
|
|
465
|
+
|
|
466
|
+
```json
|
|
467
|
+
{
|
|
468
|
+
"error": true,
|
|
469
|
+
"message": "Error description",
|
|
470
|
+
"details": {}
|
|
471
|
+
}
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
## Monitoring
|
|
475
|
+
|
|
476
|
+
### Health Check
|
|
477
|
+
```bash
|
|
478
|
+
curl http://localhost:9090/health
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
### Metrics
|
|
482
|
+
```bash
|
|
483
|
+
curl http://localhost:9090/metrics
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
### Available Metrics
|
|
487
|
+
- `mcp_tool_calls_total` - Total tool calls
|
|
488
|
+
- `mcp_tool_call_duration_ms` - Tool execution time
|
|
489
|
+
- `wisewand_api_calls_total` - API calls to Wisewand
|
|
490
|
+
- `cache_hits_total` - Cache hit rate
|
|
491
|
+
- `mcp_active_connections` - Active connections
|
|
492
|
+
|
|
493
|
+
## Development
|
|
494
|
+
|
|
495
|
+
### Running in Development Mode
|
|
496
|
+
```bash
|
|
497
|
+
npm run dev
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
### Running Tests
|
|
501
|
+
```bash
|
|
502
|
+
npm test
|
|
503
|
+
npm run test:coverage
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
### Linting
|
|
507
|
+
```bash
|
|
508
|
+
npm run lint
|
|
509
|
+
npm run format
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
### Type Checking
|
|
513
|
+
```bash
|
|
514
|
+
npm run typecheck
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
## Architecture
|
|
518
|
+
|
|
519
|
+
```
|
|
520
|
+
src/
|
|
521
|
+
├── server/ # Core MCP server
|
|
522
|
+
│ └── WisewandMCPServer.ts
|
|
523
|
+
├── clients/ # API clients
|
|
524
|
+
│ └── WisewandAPIClient.ts
|
|
525
|
+
├── handlers/ # Request handlers
|
|
526
|
+
│ ├── tools/ # Tool implementations
|
|
527
|
+
│ ├── resources/ # Resource handlers
|
|
528
|
+
│ └── prompts/ # Prompt templates
|
|
529
|
+
├── services/ # Core services
|
|
530
|
+
│ ├── CacheManager.ts
|
|
531
|
+
│ └── RateLimiter.ts
|
|
532
|
+
├── monitoring/ # Monitoring & metrics
|
|
533
|
+
│ ├── MetricsCollector.ts
|
|
534
|
+
│ └── HealthChecker.ts
|
|
535
|
+
├── types/ # TypeScript definitions
|
|
536
|
+
└── utils/ # Utilities
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
## Performance
|
|
540
|
+
|
|
541
|
+
- **Response Time**: < 2s for standard operations
|
|
542
|
+
- **Throughput**: 60 requests/minute (configurable)
|
|
543
|
+
- **Caching**: 5-minute TTL for frequently accessed data
|
|
544
|
+
- **Concurrency**: Handles 100+ simultaneous connections
|
|
545
|
+
- **Memory Usage**: < 500MB typical, < 1GB peak
|
|
546
|
+
|
|
547
|
+
## Security
|
|
548
|
+
|
|
549
|
+
- ✅ API key authentication
|
|
550
|
+
- ✅ Rate limiting per client
|
|
551
|
+
- ✅ Input validation with Zod
|
|
552
|
+
- ✅ Secure error handling
|
|
553
|
+
- ✅ No sensitive data in logs
|
|
554
|
+
- ✅ Docker security best practices
|
|
555
|
+
- ✅ Non-root container execution
|
|
556
|
+
|
|
557
|
+
## Troubleshooting
|
|
558
|
+
|
|
559
|
+
### Claude Desktop Integration Issues
|
|
560
|
+
|
|
561
|
+
#### **Problem: MCP server not showing up in Claude**
|
|
562
|
+
|
|
563
|
+
**Solutions:**
|
|
564
|
+
1. **Verify configuration file location**
|
|
565
|
+
```bash
|
|
566
|
+
# macOS - check if file exists
|
|
567
|
+
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json
|
|
568
|
+
|
|
569
|
+
# Should show your wisewand configuration
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
2. **Check absolute path**
|
|
573
|
+
```bash
|
|
574
|
+
# Get absolute path of your installation
|
|
575
|
+
cd /path/to/mcp-wisewand
|
|
576
|
+
pwd
|
|
577
|
+
# Use this EXACT path in claude_desktop_config.json
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
3. **Verify API key format**
|
|
581
|
+
- Must start with `sk_live_`
|
|
582
|
+
- No extra spaces or quotes
|
|
583
|
+
- Check at [wisewand.ai/dashboard](https://wisewand.ai/dashboard)
|
|
584
|
+
|
|
585
|
+
4. **Check server logs**
|
|
586
|
+
```bash
|
|
587
|
+
# Test server manually
|
|
588
|
+
MCP_MODE=stdio LOG_LEVEL=error npx tsx src/index.ts
|
|
589
|
+
# Should start without errors
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
5. **Restart Claude Desktop properly**
|
|
593
|
+
- Fully quit (Cmd+Q, not just close window)
|
|
594
|
+
- Wait 5 seconds
|
|
595
|
+
- Reopen Claude Desktop
|
|
596
|
+
- Check MCP icon 🔌 at bottom
|
|
597
|
+
|
|
598
|
+
#### **Problem: "Module not found" errors**
|
|
599
|
+
|
|
600
|
+
**Solution:**
|
|
601
|
+
```bash
|
|
602
|
+
# Reinstall dependencies
|
|
603
|
+
rm -rf node_modules package-lock.json
|
|
604
|
+
npm install
|
|
605
|
+
|
|
606
|
+
# Rebuild
|
|
607
|
+
npm run build
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
#### **Problem: API key authentication fails**
|
|
611
|
+
|
|
612
|
+
**Solutions:**
|
|
613
|
+
1. Verify key in `.env` matches `claude_desktop_config.json`
|
|
614
|
+
2. Check key hasn't expired at Wisewand dashboard
|
|
615
|
+
3. Test API key directly:
|
|
616
|
+
```bash
|
|
617
|
+
curl https://api.wisewand.ai/v1/articles/ \
|
|
618
|
+
-H "Authorization: Bearer sk_live_YOUR_KEY"
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
#### **Problem: Tools not appearing in Claude**
|
|
622
|
+
|
|
623
|
+
**Solutions:**
|
|
624
|
+
1. Check MCP connection status in Claude Desktop
|
|
625
|
+
2. Look for error messages in Claude's developer console:
|
|
626
|
+
- **macOS**: `~/Library/Logs/Claude/mcp*.log`
|
|
627
|
+
3. Verify all 43 tools are loaded:
|
|
628
|
+
```bash
|
|
629
|
+
# Ask Claude: "List all Wisewand tools"
|
|
630
|
+
# Should show: create_article, generate_article, etc.
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
### General Issues
|
|
634
|
+
|
|
635
|
+
1. **Rate Limiting (429 errors)**
|
|
636
|
+
- Wisewand API: 60 requests/minute
|
|
637
|
+
- Adjust `MAX_REQUESTS_PER_MINUTE` in `.env`
|
|
638
|
+
- Use bulk operations for multiple articles
|
|
639
|
+
|
|
640
|
+
2. **Connection Timeouts**
|
|
641
|
+
- Article generation takes 30-180 seconds
|
|
642
|
+
- Increase `WISEWAND_TIMEOUT` in `.env` (default: 30000ms)
|
|
643
|
+
- Use `wait_for_completion: true` in generate_article
|
|
644
|
+
|
|
645
|
+
3. **Cache Issues**
|
|
646
|
+
- Clear cache: Restart MCP server (restart Claude Desktop)
|
|
647
|
+
- Disable cache: Set `ENABLE_CACHE=false` in config
|
|
648
|
+
- Check Redis connection if using Redis strategy
|
|
649
|
+
|
|
650
|
+
4. **Memory Usage**
|
|
651
|
+
- Monitor with: Ask Claude "Check Wisewand server health"
|
|
652
|
+
- Reduce `MAX_CACHE_SIZE_MB` if needed
|
|
653
|
+
- Use Redis instead of memory cache for large operations
|
|
654
|
+
|
|
655
|
+
## Contributing
|
|
656
|
+
|
|
657
|
+
1. Fork the repository
|
|
658
|
+
2. Create a feature branch
|
|
659
|
+
3. Commit your changes
|
|
660
|
+
4. Push to the branch
|
|
661
|
+
5. Open a Pull Request
|
|
662
|
+
|
|
663
|
+
## License
|
|
664
|
+
|
|
665
|
+
MIT License - see [LICENSE](LICENSE) file for details
|
|
666
|
+
|
|
667
|
+
## Support
|
|
668
|
+
|
|
669
|
+
- **Documentation**: [https://api.wisewand.ai/docs](https://api.wisewand.ai/docs)
|
|
670
|
+
- **Issues**: [GitHub Issues](https://github.com/wisewand/mcp-wisewand/issues)
|
|
671
|
+
- **Email**: support@wisewand.ai
|
|
672
|
+
|
|
673
|
+
## Changelog
|
|
674
|
+
|
|
675
|
+
### v1.2.0 (2025-09-30) - COMPLETE API COVERAGE
|
|
676
|
+
- 🚀 **COMPLETE**: Added 26 missing MCP tools - now 43 total (100% API coverage)!
|
|
677
|
+
- ✨ **NEW CATEGORY**: Connections tools (5) - list, get, create, update, delete
|
|
678
|
+
- ✨ **NEW CATEGORY**: E-commerce tools (8) - Category & Product pages with generation
|
|
679
|
+
- ✨ **NEW CATEGORY**: Content Discovery tools (3) - AI-powered topic discovery
|
|
680
|
+
- ✨ **NEW CATEGORY**: RSS Automation tools (3) - Automated content from feeds
|
|
681
|
+
- ✨ **NEW CATEGORY**: Utility tools (3) - Authors, categories, usage stats
|
|
682
|
+
- 📊 **ENHANCED**: 11 tool handler files (was 5, now 11)
|
|
683
|
+
- 📊 **COVERAGE**: From 40% to 100% API endpoint coverage
|
|
684
|
+
- 📚 **UPDATED**: All documentation reflects complete tool set
|
|
685
|
+
|
|
686
|
+
### v1.1.0 (2025-09-30)
|
|
687
|
+
- ✨ **NEW**: Social media post generation (`use_social`, `social_networks`)
|
|
688
|
+
- ✨ **NEW**: Inline images ratio control (`inline_images_ratio`)
|
|
689
|
+
- ✨ **NEW**: Source restriction control (`information_search_only_from_subject_sources`)
|
|
690
|
+
- 🔧 **FIXED**: Renamed `use_inlineimages` to `use_inline_images` for API compatibility
|
|
691
|
+
- 🔧 **UPDATED**: Audio voice ID default value to `jSrrwmj13CIlQAXPpk4X`
|
|
692
|
+
- 📚 **IMPROVED**: README with detailed local installation guide
|
|
693
|
+
- 📚 **IMPROVED**: Claude Desktop setup instructions and troubleshooting
|
|
694
|
+
|
|
695
|
+
### v1.0.0 (2024-12-27)
|
|
696
|
+
- 🎉 Initial release
|
|
697
|
+
- 🚀 Complete Wisewand API coverage (51 endpoints)
|
|
698
|
+
- 🏗️ Production-ready implementation
|
|
699
|
+
- 🐳 Docker support with multi-stage builds
|
|
700
|
+
- 📊 Comprehensive monitoring (Prometheus, health checks)
|
|
701
|
+
- 🔒 Security features (rate limiting, validation)
|
|
702
|
+
- 💾 Multi-tier caching (memory/Redis/hybrid)
|
|
703
|
+
|
|
704
|
+
---
|
|
705
|
+
|
|
706
|
+
## FAQ
|
|
707
|
+
|
|
708
|
+
### How much does it cost to generate articles?
|
|
709
|
+
Use the `estimate_article_cost` tool to calculate costs before generation. Typical costs:
|
|
710
|
+
- Blog post (1000 words): ~10-20 credits
|
|
711
|
+
- With images: +5-10 credits
|
|
712
|
+
- With social media posts: +2-5 credits
|
|
713
|
+
|
|
714
|
+
### Can I use this without Claude Desktop?
|
|
715
|
+
Yes! The server can run standalone via Docker or Node.js and be accessed through the MCP protocol from any MCP-compatible client.
|
|
716
|
+
|
|
717
|
+
### Where can I get a Wisewand API key?
|
|
718
|
+
Visit [wisewand.ai](https://wisewand.ai) and sign up for an account. API keys are available in your dashboard.
|
|
719
|
+
|
|
720
|
+
### How long does article generation take?
|
|
721
|
+
- Article creation: ~1 second
|
|
722
|
+
- Content generation: 30-180 seconds (depending on length and features)
|
|
723
|
+
- Use `wait_for_completion: true` to wait automatically
|
|
724
|
+
|
|
725
|
+
---
|
|
726
|
+
|
|
727
|
+
Built with ❤️ by Wisewand Team
|