@misarblog/mcp 1.0.4 → 1.0.6
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 +192 -53
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -13
- package/dist/index.js.map +1 -1
- package/dist/lib/auth.js +1 -1
- package/dist/lib/auth.js.map +1 -1
- package/dist/tools/ai.d.ts +3 -0
- package/dist/tools/ai.d.ts.map +1 -0
- package/dist/tools/ai.js +104 -0
- package/dist/tools/ai.js.map +1 -0
- package/dist/tools/comments.d.ts +3 -0
- package/dist/tools/comments.d.ts.map +1 -0
- package/dist/tools/comments.js +26 -0
- package/dist/tools/comments.js.map +1 -0
- package/dist/tools/follows.d.ts +3 -0
- package/dist/tools/follows.d.ts.map +1 -0
- package/dist/tools/follows.js +21 -0
- package/dist/tools/follows.js.map +1 -0
- package/dist/tools/login.d.ts.map +1 -1
- package/dist/tools/login.js +22 -2
- package/dist/tools/login.js.map +1 -1
- package/dist/tools/newsletter.d.ts +3 -0
- package/dist/tools/newsletter.d.ts.map +1 -0
- package/dist/tools/newsletter.js +28 -0
- package/dist/tools/newsletter.js.map +1 -0
- package/dist/tools/reactions.d.ts +3 -0
- package/dist/tools/reactions.d.ts.map +1 -0
- package/dist/tools/reactions.js +46 -0
- package/dist/tools/reactions.js.map +1 -0
- package/dist/tools/status.d.ts +3 -0
- package/dist/tools/status.d.ts.map +1 -0
- package/dist/tools/status.js +35 -0
- package/dist/tools/status.js.map +1 -0
- package/package.json +3 -3
- package/smithery.yaml +1 -1
package/README.md
CHANGED
|
@@ -45,13 +45,13 @@ chmod +x ~/.claude/scripts/misarblog-mcp.py
|
|
|
45
45
|
|
|
46
46
|
# 2. Add to Claude Code MCP settings (see below)
|
|
47
47
|
|
|
48
|
-
# 3. Run
|
|
48
|
+
# 3. Run login in Claude Code to authenticate via browser
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
**Fastest path — npx + any MCP client:**
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
|
-
# No install needed — just add the config below and run
|
|
54
|
+
# No install needed — just add the config below and run login
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
---
|
|
@@ -101,7 +101,7 @@ If you're on macOS with an older system Python, use Homebrew: `brew install pyth
|
|
|
101
101
|
}
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
> You can omit `MISARBLOG_API_KEY` if you plan to use the `
|
|
104
|
+
> You can omit `MISARBLOG_API_KEY` if you plan to use the `login` browser flow.
|
|
105
105
|
|
|
106
106
|
---
|
|
107
107
|
|
|
@@ -197,7 +197,7 @@ code ~/.claude/settings.json
|
|
|
197
197
|
**Verify the connection:**
|
|
198
198
|
|
|
199
199
|
```text
|
|
200
|
-
> call
|
|
200
|
+
> call get_profile
|
|
201
201
|
```
|
|
202
202
|
|
|
203
203
|
Claude Code should return your username, display name, and account status.
|
|
@@ -236,7 +236,7 @@ project (project-scoped, takes priority).
|
|
|
236
236
|
- **Env**: `MISARBLOG_API_KEY=mbk_your_key_here`
|
|
237
237
|
4. Click **Save** — Cursor restarts the MCP daemon automatically.
|
|
238
238
|
|
|
239
|
-
Verify: open Cursor Agent mode → type `use
|
|
239
|
+
Verify: open Cursor Agent mode → type `use get_profile` — the tool card should appear.
|
|
240
240
|
|
|
241
241
|
---
|
|
242
242
|
|
|
@@ -303,7 +303,7 @@ VS Code reads MCP config from `.vscode/mcp.json` in the workspace root, or from
|
|
|
303
303
|
}
|
|
304
304
|
```
|
|
305
305
|
|
|
306
|
-
Restart VS Code after saving. The
|
|
306
|
+
Restart VS Code after saving. The Misar.Blog tools appear in GitHub Copilot Chat when
|
|
307
307
|
you enable **Agent mode** (the `@` icon in the chat panel).
|
|
308
308
|
|
|
309
309
|
---
|
|
@@ -315,7 +315,7 @@ Any MCP-compatible client that supports stdio servers works with the same patter
|
|
|
315
315
|
- **Command**: `python3` (Python) or `npx` (npm)
|
|
316
316
|
- **Args**: `["~/.claude/scripts/misarblog-mcp.py"]` or `["-y", "@misarblog/mcp"]`
|
|
317
317
|
- **Transport**: `stdio`
|
|
318
|
-
- **Env**: `MISARBLOG_API_KEY=mbk_...` (or use `
|
|
318
|
+
- **Env**: `MISARBLOG_API_KEY=mbk_...` (or use `login` after connecting)
|
|
319
319
|
|
|
320
320
|
---
|
|
321
321
|
|
|
@@ -332,13 +332,13 @@ Keys have a 100 req/min rate limit. You can revoke and regenerate at any time fr
|
|
|
332
332
|
**Precedence order:**
|
|
333
333
|
|
|
334
334
|
```text
|
|
335
|
-
MISARBLOG_API_KEY env var → ~/.misarblog/config.json → prompt to run
|
|
335
|
+
MISARBLOG_API_KEY env var → ~/.misarblog/config.json → prompt to run login
|
|
336
336
|
```
|
|
337
337
|
|
|
338
338
|
### Browser login (no copy-paste)
|
|
339
339
|
|
|
340
340
|
If you'd rather not handle the key manually, omit `MISARBLOG_API_KEY` from the config and run
|
|
341
|
-
`
|
|
341
|
+
`login` as your first tool call. The flow:
|
|
342
342
|
|
|
343
343
|
1. The MCP server starts a temporary HTTP listener on `127.0.0.1` (random port 9001–9099)
|
|
344
344
|
2. Your default browser opens to `https://www.misar.blog/dashboard/settings/api?mcp_port=<port>`
|
|
@@ -352,7 +352,7 @@ The listener accepts connections from `127.0.0.1` only and shuts down after 120
|
|
|
352
352
|
**Example prompt:**
|
|
353
353
|
|
|
354
354
|
```text
|
|
355
|
-
Connect my Misar.Blog account using
|
|
355
|
+
Connect my Misar.Blog account using login
|
|
356
356
|
```
|
|
357
357
|
|
|
358
358
|
Claude will call the tool, open your browser, and confirm once you've authorized.
|
|
@@ -361,85 +361,224 @@ Claude will call the tool, open your browser, and confirm once you've authorized
|
|
|
361
361
|
|
|
362
362
|
## Tools reference
|
|
363
363
|
|
|
364
|
+
The server exposes **23 tools**. Names are unprefixed — call them exactly as
|
|
365
|
+
shown (e.g. `login`, `publish_article`, `get_analytics_summary`).
|
|
366
|
+
|
|
367
|
+
### Auth
|
|
368
|
+
|
|
369
|
+
| Tool | Description | Required params |
|
|
370
|
+
| ---- | ----------- | --------------- |
|
|
371
|
+
| `login` | Browser-based auth — saves key to `~/.misarblog/config.json` | — |
|
|
372
|
+
| `status` | Check whether you're authenticated and which account is connected | — |
|
|
373
|
+
|
|
374
|
+
### Articles
|
|
375
|
+
|
|
364
376
|
| Tool | Description | Required params |
|
|
365
377
|
| ---- | ----------- | --------------- |
|
|
366
|
-
| `
|
|
367
|
-
| `
|
|
368
|
-
| `
|
|
369
|
-
| `
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
|
374
|
-
|
|
|
375
|
-
| `
|
|
376
|
-
| `
|
|
377
|
-
| `
|
|
378
|
+
| `list_my_articles` | List your articles, optionally filtered by status | — |
|
|
379
|
+
| `get_article` | Fetch a single article by slug, including full markdown | `slug` |
|
|
380
|
+
| `publish_article` | Publish now or schedule via ISO 8601 datetime | `title`, `body_markdown` |
|
|
381
|
+
| `create_draft` | Save a draft for review in the web editor | `title`, `body_markdown` |
|
|
382
|
+
|
|
383
|
+
### AI
|
|
384
|
+
|
|
385
|
+
| Tool | Description | Required params |
|
|
386
|
+
| ---- | ----------- | --------------- |
|
|
387
|
+
| `research_topic` | Research a topic — insights, sources, and a content outline | `query` |
|
|
388
|
+
| `generate_title_seo` | Generate 5 SEO/AEO/GEO-optimized titles from a topic or keyword | `prompt` |
|
|
389
|
+
| `suggest_titles` | Generate 5 title options from your existing article content | `context` |
|
|
390
|
+
|
|
391
|
+
### Images
|
|
392
|
+
|
|
393
|
+
| Tool | Description | Required params |
|
|
394
|
+
| ---- | ----------- | --------------- |
|
|
395
|
+
| `upload_image` | Upload a local image file to the Misar.Blog CDN | `file_path` |
|
|
396
|
+
| `generate_cover_image` | Generate an AI cover image and upload it to the CDN | `prompt` |
|
|
397
|
+
|
|
398
|
+
### Series
|
|
399
|
+
|
|
400
|
+
| Tool | Description | Required params |
|
|
401
|
+
| ---- | ----------- | --------------- |
|
|
402
|
+
| `get_series` | List all your series | — |
|
|
403
|
+
| `create_series` | Create a new series to group related articles | `title` |
|
|
404
|
+
| `add_to_series` | Add an existing article to a series | `series_slug`, `article_slug` |
|
|
405
|
+
|
|
406
|
+
### Comments
|
|
407
|
+
|
|
408
|
+
| Tool | Description | Required params |
|
|
409
|
+
| ---- | ----------- | --------------- |
|
|
410
|
+
| `list_comments` | Get public comments for an article (no API key required) | `article_id` |
|
|
411
|
+
|
|
412
|
+
### Follows
|
|
413
|
+
|
|
414
|
+
| Tool | Description | Required params |
|
|
415
|
+
| ---- | ----------- | --------------- |
|
|
416
|
+
| `get_follow_status` | Get public follow status and follower count for a user (no API key required) | `user_id` |
|
|
417
|
+
|
|
418
|
+
### Newsletter
|
|
419
|
+
|
|
420
|
+
| Tool | Description | Required params |
|
|
421
|
+
| ---- | ----------- | --------------- |
|
|
422
|
+
| `list_newsletter_subscribers` | Get your newsletter subscriber list | — |
|
|
423
|
+
| `list_newsletter_issues` | Get your sent and scheduled newsletter issues | — |
|
|
424
|
+
|
|
425
|
+
### Reactions
|
|
426
|
+
|
|
427
|
+
| Tool | Description | Required params |
|
|
428
|
+
| ---- | ----------- | --------------- |
|
|
429
|
+
| `get_reactions` | Get reaction counts and your reactions for an article | `article_id` |
|
|
430
|
+
| `add_reaction` | Add a reaction to an article (no-ops if already reacted) | `article_id`, `type` |
|
|
431
|
+
| `remove_reaction` | Remove a specific reaction from an article | `article_id`, `type` |
|
|
432
|
+
|
|
433
|
+
### Analytics
|
|
434
|
+
|
|
435
|
+
| Tool | Description | Required params |
|
|
436
|
+
| ---- | ----------- | --------------- |
|
|
437
|
+
| `get_analytics_summary` | Views, revenue, and subscribers for a time period (up to 365 days) | — |
|
|
438
|
+
|
|
439
|
+
### Profile
|
|
440
|
+
|
|
441
|
+
| Tool | Description | Required params |
|
|
442
|
+
| ---- | ----------- | --------------- |
|
|
443
|
+
| `get_profile` | Your creator profile — username, display name, bio, Stripe status | — |
|
|
378
444
|
|
|
379
445
|
### Tool parameters
|
|
380
446
|
|
|
381
|
-
#### `
|
|
447
|
+
#### `login`
|
|
382
448
|
|
|
383
449
|
| Param | Type | Default | Description |
|
|
384
450
|
| ----- | ---- | ------- | ----------- |
|
|
385
|
-
| `port` | number | random 9001–9099 | Local callback port |
|
|
386
|
-
| `base_url` | string | `https://www.misar.blog` |
|
|
451
|
+
| `port` | number | random 9001–9099 | Local callback port (9001–9099) |
|
|
452
|
+
| `base_url` | string | `https://www.misar.blog` | Misar.Blog base URL for self-hosted instances |
|
|
453
|
+
| `force` | boolean | `false` | Force re-authentication even if already logged in (rotates your API key) |
|
|
387
454
|
|
|
388
|
-
#### `
|
|
455
|
+
#### `list_my_articles`
|
|
389
456
|
|
|
390
457
|
| Param | Type | Default | Description |
|
|
391
458
|
| ----- | ---- | ------- | ----------- |
|
|
392
|
-
| `status` | string |
|
|
393
|
-
| `limit` | number | `20` |
|
|
459
|
+
| `status` | string | all | Filter: `draft` · `published` · `scheduled` · `archived` (omit for all) |
|
|
460
|
+
| `limit` | number | `20` | Number of articles to return, 1–100 |
|
|
461
|
+
|
|
462
|
+
#### `get_article`
|
|
463
|
+
|
|
464
|
+
| Param | Type | Required | Description |
|
|
465
|
+
| ----- | ---- | -------- | ----------- |
|
|
466
|
+
| `slug` | string | yes | The article slug |
|
|
394
467
|
|
|
395
|
-
#### `
|
|
468
|
+
#### `publish_article`
|
|
396
469
|
|
|
397
470
|
| Param | Type | Required | Description |
|
|
398
471
|
| ----- | ---- | -------- | ----------- |
|
|
399
472
|
| `title` | string | yes | Article title (max 250 chars) |
|
|
400
|
-
| `body_markdown` | string | yes | Full article
|
|
473
|
+
| `body_markdown` | string | yes | Full article body in Markdown |
|
|
401
474
|
| `tags` | string[] | no | Up to 10 tags |
|
|
402
|
-
| `cover_image_url` | string | no |
|
|
403
|
-
| `schedule_at` | string | no | ISO 8601
|
|
475
|
+
| `cover_image_url` | string | no | URL of the cover image |
|
|
476
|
+
| `schedule_at` | string | no | ISO 8601 timestamp to schedule; omit to publish immediately |
|
|
404
477
|
| `visibility` | string | no | `public` · `subscribers` · `paid` · `private` (default: `public`) |
|
|
405
478
|
|
|
406
|
-
#### `
|
|
479
|
+
#### `create_draft`
|
|
407
480
|
|
|
408
481
|
| Param | Type | Required | Description |
|
|
409
482
|
| ----- | ---- | -------- | ----------- |
|
|
410
483
|
| `title` | string | yes | Draft title |
|
|
411
|
-
| `body_markdown` | string | yes |
|
|
412
|
-
| `tags` | string[] | no |
|
|
484
|
+
| `body_markdown` | string | yes | Full article body in Markdown |
|
|
485
|
+
| `tags` | string[] | no | Tags for the draft |
|
|
486
|
+
|
|
487
|
+
#### `research_topic`
|
|
488
|
+
|
|
489
|
+
| Param | Type | Required | Description |
|
|
490
|
+
| ----- | ---- | -------- | ----------- |
|
|
491
|
+
| `query` | string | yes | Research topic or question (5–500 chars). Be specific for best results |
|
|
492
|
+
|
|
493
|
+
#### `generate_title_seo`
|
|
494
|
+
|
|
495
|
+
| Param | Type | Required | Description |
|
|
496
|
+
| ----- | ---- | -------- | ----------- |
|
|
497
|
+
| `prompt` | string | yes | Your topic or target keywords (3–500 chars) |
|
|
498
|
+
| `context` | string | no | Existing article content (plain text or markdown, max 8000 chars) to align titles |
|
|
413
499
|
|
|
414
|
-
#### `
|
|
500
|
+
#### `suggest_titles`
|
|
415
501
|
|
|
416
502
|
| Param | Type | Required | Description |
|
|
417
503
|
| ----- | ---- | -------- | ----------- |
|
|
418
|
-
| `
|
|
504
|
+
| `context` | string | yes | Your article content in plain text or markdown (20–8000 chars) |
|
|
419
505
|
|
|
420
|
-
#### `
|
|
506
|
+
#### `upload_image`
|
|
507
|
+
|
|
508
|
+
| Param | Type | Required | Description |
|
|
509
|
+
| ----- | ---- | -------- | ----------- |
|
|
510
|
+
| `file_path` | string | yes | Absolute path to the image file (JPEG, PNG, WebP, or GIF) |
|
|
511
|
+
|
|
512
|
+
#### `generate_cover_image`
|
|
421
513
|
|
|
422
514
|
| Param | Type | Default | Description |
|
|
423
515
|
| ----- | ---- | ------- | ----------- |
|
|
424
|
-
| `prompt` | string | — |
|
|
425
|
-
| `size` | string | `
|
|
516
|
+
| `prompt` | string | — | Description of the image to generate (max 1000 chars) |
|
|
517
|
+
| `size` | string | `1792x1024` | `1024x1024` · `1792x1024` · `1024x1792` |
|
|
426
518
|
|
|
427
|
-
#### `
|
|
519
|
+
#### `create_series`
|
|
428
520
|
|
|
429
521
|
| Param | Type | Required | Description |
|
|
430
522
|
| ----- | ---- | -------- | ----------- |
|
|
431
|
-
| `title` | string | yes | Series
|
|
432
|
-
| `description` | string | no | Short description |
|
|
523
|
+
| `title` | string | yes | Series title |
|
|
524
|
+
| `description` | string | no | Short description of the series |
|
|
433
525
|
|
|
434
|
-
#### `
|
|
526
|
+
#### `add_to_series`
|
|
435
527
|
|
|
436
528
|
| Param | Type | Required | Description |
|
|
437
529
|
| ----- | ---- | -------- | ----------- |
|
|
438
|
-
| `series_slug` | string | yes |
|
|
439
|
-
| `article_slug` | string | yes |
|
|
530
|
+
| `series_slug` | string | yes | The series slug |
|
|
531
|
+
| `article_slug` | string | yes | The article slug to add |
|
|
440
532
|
| `position` | number | no | 1-indexed position; appends to end if omitted |
|
|
441
533
|
|
|
442
|
-
#### `
|
|
534
|
+
#### `list_comments`
|
|
535
|
+
|
|
536
|
+
| Param | Type | Default | Description |
|
|
537
|
+
| ----- | ---- | ------- | ----------- |
|
|
538
|
+
| `article_id` | string | — | UUID of the article to fetch comments for (required) |
|
|
539
|
+
| `limit` | number | `20` | Max results, 1–100 |
|
|
540
|
+
| `offset` | number | `0` | Pagination offset |
|
|
541
|
+
|
|
542
|
+
#### `get_follow_status`
|
|
543
|
+
|
|
544
|
+
| Param | Type | Required | Description |
|
|
545
|
+
| ----- | ---- | -------- | ----------- |
|
|
546
|
+
| `user_id` | string | yes | UUID of the profile to check follow status for |
|
|
547
|
+
|
|
548
|
+
#### `list_newsletter_subscribers`
|
|
549
|
+
|
|
550
|
+
| Param | Type | Default | Description |
|
|
551
|
+
| ----- | ---- | ------- | ----------- |
|
|
552
|
+
| `limit` | number | `20` | Max results, 1–100 |
|
|
553
|
+
| `offset` | number | `0` | Pagination offset |
|
|
554
|
+
|
|
555
|
+
#### `list_newsletter_issues`
|
|
556
|
+
|
|
557
|
+
| Param | Type | Default | Description |
|
|
558
|
+
| ----- | ---- | ------- | ----------- |
|
|
559
|
+
| `limit` | number | `10` | Max results, 1–50 |
|
|
560
|
+
|
|
561
|
+
#### `get_reactions`
|
|
562
|
+
|
|
563
|
+
| Param | Type | Required | Description |
|
|
564
|
+
| ----- | ---- | -------- | ----------- |
|
|
565
|
+
| `article_id` | string | yes | UUID of the article |
|
|
566
|
+
|
|
567
|
+
#### `add_reaction`
|
|
568
|
+
|
|
569
|
+
| Param | Type | Required | Description |
|
|
570
|
+
| ----- | ---- | -------- | ----------- |
|
|
571
|
+
| `article_id` | string | yes | UUID of the article |
|
|
572
|
+
| `type` | string | yes | Reaction type: `like` · `clap` · `bookmark` |
|
|
573
|
+
|
|
574
|
+
#### `remove_reaction`
|
|
575
|
+
|
|
576
|
+
| Param | Type | Required | Description |
|
|
577
|
+
| ----- | ---- | -------- | ----------- |
|
|
578
|
+
| `article_id` | string | yes | UUID of the article |
|
|
579
|
+
| `type` | string | yes | Reaction type to remove: `like` · `clap` · `bookmark` |
|
|
580
|
+
|
|
581
|
+
#### `get_analytics_summary`
|
|
443
582
|
|
|
444
583
|
| Param | Type | Default | Description |
|
|
445
584
|
| ----- | ---- | ------- | ----------- |
|
|
@@ -505,7 +644,7 @@ If you run your own Misar.Blog instance, set `MISARBLOG_BASE_URL` to your domain
|
|
|
505
644
|
}
|
|
506
645
|
```
|
|
507
646
|
|
|
508
|
-
`MISARBLOG_BASE_URL` can also be stored in `~/.misarblog/config.json` (written by `
|
|
647
|
+
`MISARBLOG_BASE_URL` can also be stored in `~/.misarblog/config.json` (written by `login`):
|
|
509
648
|
|
|
510
649
|
```json
|
|
511
650
|
{
|
|
@@ -524,19 +663,19 @@ If you run your own Misar.Blog instance, set `MISARBLOG_BASE_URL` to your domain
|
|
|
524
663
|
The server can't find your API key. Either:
|
|
525
664
|
|
|
526
665
|
- Set `MISARBLOG_API_KEY` in the MCP config env block, or
|
|
527
|
-
- Run `
|
|
666
|
+
- Run `login` once to save it to `~/.misarblog/config.json`
|
|
528
667
|
|
|
529
668
|
### "API key invalid or expired"
|
|
530
669
|
|
|
531
670
|
Your key was revoked. Go to **Dashboard → Settings → API Keys** and generate a new one,
|
|
532
|
-
or run `
|
|
671
|
+
or run `login` again to get a fresh key via the browser flow.
|
|
533
672
|
|
|
534
673
|
### "Rate limited (100 req/min)"
|
|
535
674
|
|
|
536
675
|
You've exceeded the API rate limit. Wait 60 seconds and retry. If you're running automated
|
|
537
676
|
pipelines, add a short delay between tool calls.
|
|
538
677
|
|
|
539
|
-
### Browser doesn't open during `
|
|
678
|
+
### Browser doesn't open during `login`
|
|
540
679
|
|
|
541
680
|
The server prints the URL to stderr when `webbrowser.open()` fails. Copy and open it manually:
|
|
542
681
|
|
|
@@ -573,9 +712,9 @@ Run `/mcp` in a Claude Code session to list active servers. If `misarblog` is mi
|
|
|
573
712
|
| MISARBLOG_API_KEY=mbk_test python3 ~/.claude/scripts/misarblog-mcp.py
|
|
574
713
|
```
|
|
575
714
|
|
|
576
|
-
You should see a JSON response listing
|
|
715
|
+
You should see a JSON response listing 23 tools.
|
|
577
716
|
|
|
578
|
-
### Connection refused on `
|
|
717
|
+
### Connection refused on `login` callback
|
|
579
718
|
|
|
580
719
|
The local HTTP server binds to `127.0.0.1`. If your browser opens on a different machine
|
|
581
720
|
(e.g. remote VS Code over SSH), the callback won't reach the MCP server. In that case,
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA8BpE,wBAAgB,mBAAmB,cAElC"}
|
package/dist/index.js
CHANGED
|
@@ -6,21 +6,43 @@ import { registerImageTools } from "./tools/images.js";
|
|
|
6
6
|
import { registerSeriesTools } from "./tools/series.js";
|
|
7
7
|
import { registerProfileTools } from "./tools/profile.js";
|
|
8
8
|
import { registerLoginTool } from "./tools/login.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
import { registerStatusTool } from "./tools/status.js";
|
|
10
|
+
import { registerAiTools } from "./tools/ai.js";
|
|
11
|
+
import { registerCommentTools } from "./tools/comments.js";
|
|
12
|
+
import { registerFollowTools } from "./tools/follows.js";
|
|
13
|
+
import { registerNewsletterTools } from "./tools/newsletter.js";
|
|
14
|
+
import { registerReactionTools } from "./tools/reactions.js";
|
|
15
|
+
function buildServer() {
|
|
16
|
+
const s = new McpServer({ name: "misarblog", version: "1.0.6" });
|
|
17
|
+
registerLoginTool(s);
|
|
18
|
+
registerStatusTool(s);
|
|
19
|
+
registerProfileTools(s);
|
|
20
|
+
registerArticleTools(s);
|
|
21
|
+
registerAiTools(s);
|
|
22
|
+
registerImageTools(s);
|
|
23
|
+
registerSeriesTools(s);
|
|
24
|
+
registerCommentTools(s);
|
|
25
|
+
registerFollowTools(s);
|
|
26
|
+
registerNewsletterTools(s);
|
|
27
|
+
registerReactionTools(s);
|
|
28
|
+
return s;
|
|
29
|
+
}
|
|
30
|
+
export function createSandboxServer() {
|
|
31
|
+
return buildServer();
|
|
32
|
+
}
|
|
18
33
|
async function main() {
|
|
34
|
+
const server = buildServer();
|
|
19
35
|
const transport = new StdioServerTransport();
|
|
20
36
|
await server.connect(transport);
|
|
21
37
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
38
|
+
// Auto-start when run directly (argv[1] ends with our known binary names).
|
|
39
|
+
// Smithery scanner imports this module without a matching argv[1], so main() won't fire.
|
|
40
|
+
const argv1 = process.argv[1] ?? "";
|
|
41
|
+
const isDirectRun = argv1.endsWith("index.ts") || argv1.endsWith("index.js") || argv1.endsWith("misarblog-mcp");
|
|
42
|
+
if (isDirectRun) {
|
|
43
|
+
main().catch((err) => {
|
|
44
|
+
console.error("MCP server error:", err);
|
|
45
|
+
process.exit(1);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
26
48
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAA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CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC7D,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,SAAS,CAAC;IAEzD,MAAM,GAAG,GAAG,UAAU,EAAE,CAAC;IACzB,IAAI,GAAG,CAAC,QAAQ;QAAE,OAAO,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,SAAS,CAAC;IAErE,OAAO,8BAA8B,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/tools/ai.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAyBpE,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,QA6GhD"}
|
package/dist/tools/ai.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { apiFetch } from "../lib/api-client.js";
|
|
3
|
+
import { formatError } from "../lib/errors.js";
|
|
4
|
+
function formatTitles(titles) {
|
|
5
|
+
if (titles.length === 0)
|
|
6
|
+
return "No titles were generated.";
|
|
7
|
+
return titles
|
|
8
|
+
.map((t, i) => {
|
|
9
|
+
const hint = t.hint ? `\n → ${t.hint}` : "";
|
|
10
|
+
return `${i + 1}. ${t.title}${hint}`;
|
|
11
|
+
})
|
|
12
|
+
.join("\n\n");
|
|
13
|
+
}
|
|
14
|
+
export function registerAiTools(server) {
|
|
15
|
+
server.tool("research_topic", "Research a topic and get AI-generated insights, sources, and a content outline. Useful before writing an article.", {
|
|
16
|
+
query: z
|
|
17
|
+
.string()
|
|
18
|
+
.min(5)
|
|
19
|
+
.max(500)
|
|
20
|
+
.describe("Research topic or question. Be specific for best results."),
|
|
21
|
+
}, async ({ query }) => {
|
|
22
|
+
try {
|
|
23
|
+
const data = await apiFetch("/ai/research", {
|
|
24
|
+
method: "POST",
|
|
25
|
+
body: JSON.stringify({ query }),
|
|
26
|
+
});
|
|
27
|
+
return {
|
|
28
|
+
content: [
|
|
29
|
+
{
|
|
30
|
+
type: "text",
|
|
31
|
+
text: data.result ?? JSON.stringify(data, null, 2),
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
return { content: [{ type: "text", text: `Error: ${formatError(err)}` }], isError: true };
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
server.tool("generate_title_seo", "Generate 5 SEO/AEO/GEO-optimized article titles from a topic or keyword prompt. Targets high-volume, low-competition long-tail keywords. Optimized for Google, AI answer engines (ChatGPT, Perplexity, Claude), Google AI Overviews, and AI search experiences. Each title includes a keyword strategy hint.", {
|
|
41
|
+
prompt: z
|
|
42
|
+
.string()
|
|
43
|
+
.min(3)
|
|
44
|
+
.max(500)
|
|
45
|
+
.describe("Your article topic or target keywords. Be specific — include your niche, audience, and any long-tail phrases you want to rank for. Example: 'best AI writing tools for beginner bloggers 2025'"),
|
|
46
|
+
context: z
|
|
47
|
+
.string()
|
|
48
|
+
.max(8000)
|
|
49
|
+
.optional()
|
|
50
|
+
.describe("Optional: existing article content (plain text or markdown). Providing it lets the AI align titles with your actual content."),
|
|
51
|
+
}, async ({ prompt, context }) => {
|
|
52
|
+
try {
|
|
53
|
+
const data = await apiFetch("/ai/titles", {
|
|
54
|
+
method: "POST",
|
|
55
|
+
body: JSON.stringify({ action: "seo", prompt, context }),
|
|
56
|
+
});
|
|
57
|
+
const formatted = formatTitles(data.titles);
|
|
58
|
+
return {
|
|
59
|
+
content: [
|
|
60
|
+
{
|
|
61
|
+
type: "text",
|
|
62
|
+
text: `## SEO/AEO/GEO Title Suggestions\n\nOptimized for: Google · AI answer engines (AEO) · Google AI Overviews (GEO) · AI search experiences (ASX)\nKeyword strategy: high-volume, low-competition long-tail phrases\n\n${formatted}\n\n---\n*Click any title to use it. Each title targets a distinct keyword angle and search intent.*`,
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
return {
|
|
69
|
+
content: [{ type: "text", text: `Error: ${formatError(err)}` }],
|
|
70
|
+
isError: true,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
server.tool("suggest_titles", "Generate 5 compelling, SEO-friendly article title options from your existing article content. Use generate_title_seo instead if you want to target specific keywords or have not written content yet.", {
|
|
75
|
+
context: z
|
|
76
|
+
.string()
|
|
77
|
+
.min(20)
|
|
78
|
+
.max(8000)
|
|
79
|
+
.describe("Your article content in plain text or markdown"),
|
|
80
|
+
}, async ({ context }) => {
|
|
81
|
+
try {
|
|
82
|
+
const data = await apiFetch("/ai/titles", {
|
|
83
|
+
method: "POST",
|
|
84
|
+
body: JSON.stringify({ action: "suggest", context }),
|
|
85
|
+
});
|
|
86
|
+
const formatted = formatTitles(data.titles);
|
|
87
|
+
return {
|
|
88
|
+
content: [
|
|
89
|
+
{
|
|
90
|
+
type: "text",
|
|
91
|
+
text: `## Title Suggestions\n\n${formatted}\n\n---\n*Titles generated from your article content.*`,
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
catch (err) {
|
|
97
|
+
return {
|
|
98
|
+
content: [{ type: "text", text: `Error: ${formatError(err)}` }],
|
|
99
|
+
isError: true,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=ai.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../src/tools/ai.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,E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AE,CAAC;aACP,MAAM,EAAE;aACR,GAAG,CAAC,EAAE,CAAC;aACP,GAAG,CAAC,IAAI,CAAC;aACT,QAAQ,CAAC,gDAAgD,CAAC;KAC9D,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACpB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAiB,YAAY,EAAE;gBACxD,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;aACrD,CAAC,CAAC;YAEH,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC5C,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,2BAA2B,SAAS,wDAAwD;qBACnG;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,WAAW,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;gBAC/D,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../src/tools/comments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMzE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAyB5D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { formatError } from "../lib/errors.js";
|
|
3
|
+
const SITE_URL = (process.env.MISARBLOG_SITE_URL ?? "https://www.misar.blog").replace(/\/$/, "");
|
|
4
|
+
export function registerCommentTools(server) {
|
|
5
|
+
server.tool("list_comments", "Get public comments for an article. Rate-limited by IP — no API key required.", {
|
|
6
|
+
article_id: z.string().uuid().describe("UUID of the article to fetch comments for"),
|
|
7
|
+
limit: z.number().int().min(1).max(100).optional().default(20),
|
|
8
|
+
offset: z.number().int().min(0).optional().default(0),
|
|
9
|
+
}, async ({ article_id, limit, offset }) => {
|
|
10
|
+
try {
|
|
11
|
+
const qs = new URLSearchParams({ article_id, limit: String(limit), offset: String(offset) });
|
|
12
|
+
const res = await fetch(`${SITE_URL}/api/comments?${qs}`, {
|
|
13
|
+
headers: { Accept: "application/json" },
|
|
14
|
+
});
|
|
15
|
+
const data = await res.json().catch(() => ({}));
|
|
16
|
+
if (!res.ok) {
|
|
17
|
+
return { content: [{ type: "text", text: `Error ${res.status}: ${JSON.stringify(data)}` }], isError: true };
|
|
18
|
+
}
|
|
19
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
20
|
+
}
|
|
21
|
+
catch (e) {
|
|
22
|
+
return { content: [{ type: "text", text: formatError(e) }], isError: true };
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=comments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comments.js","sourceRoot":"","sources":["../../src/tools/comments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,wBAAwB,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAEjG,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,MAAM,CAAC,IAAI,CACT,eAAe,EACf,+EAA+E,EAC/E;QACE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAA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AI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACvF,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QACvF,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"follows.d.ts","sourceRoot":"","sources":["../../src/tools/follows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMzE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAoB3D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { formatError } from "../lib/errors.js";
|
|
3
|
+
const SITE_URL = (process.env.MISARBLOG_SITE_URL ?? "https://www.misar.blog").replace(/\/$/, "");
|
|
4
|
+
export function registerFollowTools(server) {
|
|
5
|
+
server.tool("get_follow_status", "Get public follow status and follower count for a user by their profile UUID. No API key required.", { user_id: z.string().uuid().describe("UUID of the profile to check follow status for") }, async ({ user_id }) => {
|
|
6
|
+
try {
|
|
7
|
+
const res = await fetch(`${SITE_URL}/api/follows?user_id=${encodeURIComponent(user_id)}`, {
|
|
8
|
+
headers: { Accept: "application/json" },
|
|
9
|
+
});
|
|
10
|
+
const data = await res.json().catch(() => ({}));
|
|
11
|
+
if (!res.ok) {
|
|
12
|
+
return { content: [{ type: "text", text: `Error ${res.status}: ${JSON.stringify(data)}` }], isError: true };
|
|
13
|
+
}
|
|
14
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
15
|
+
}
|
|
16
|
+
catch (e) {
|
|
17
|
+
return { content: [{ type: "text", text: formatError(e) }], isError: true };
|
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AAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACvF,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QACvF,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/tools/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/tools/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA0BpE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,QAmGlD"}
|
package/dist/tools/login.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { createServer } from "http";
|
|
3
3
|
import { execFileSync } from "child_process";
|
|
4
|
-
import { saveConfig, getBaseUrl } from "../lib/auth.js";
|
|
4
|
+
import { saveConfig, getBaseUrl, tryGetApiKey } from "../lib/auth.js";
|
|
5
|
+
import { apiFetch } from "../lib/api-client.js";
|
|
5
6
|
// Opens URL in the system browser — uses execFileSync with separate args (no shell, no injection)
|
|
6
7
|
function openBrowser(url) {
|
|
7
8
|
try {
|
|
@@ -25,7 +26,26 @@ export function registerLoginTool(server) {
|
|
|
25
26
|
server.tool("login", "Authenticate with your Misar.Blog account via browser — no API key copy-paste needed. Opens your browser to the settings page where you click 'Authorize MCP Access'. Your API key is saved to ~/.misarblog/config.json.", {
|
|
26
27
|
port: z.number().int().min(9001).max(9099).optional().describe("Local callback port (9001–9099). Random by default."),
|
|
27
28
|
base_url: z.string().url().optional().describe("Misar.Blog base URL for self-hosted instances."),
|
|
28
|
-
|
|
29
|
+
force: z.boolean().optional().describe("Force re-authentication even if already logged in (rotates your API key)."),
|
|
30
|
+
}, async ({ port: preferredPort, base_url, force }) => {
|
|
31
|
+
// Guard: if already authenticated and key is valid, skip the login flow
|
|
32
|
+
if (!force) {
|
|
33
|
+
const existingKey = tryGetApiKey();
|
|
34
|
+
if (existingKey) {
|
|
35
|
+
try {
|
|
36
|
+
const profile = await apiFetch("/me");
|
|
37
|
+
return {
|
|
38
|
+
content: [{
|
|
39
|
+
type: "text",
|
|
40
|
+
text: `Already authenticated as @${profile.username}. Use \`status\` to verify, or call \`login\` with force=true to rotate your API key.`,
|
|
41
|
+
}],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
// Key exists but rejected — fall through to re-auth
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
29
49
|
const _port = pickPort(preferredPort);
|
|
30
50
|
const _baseUrl = (base_url ?? getBaseUrl().replace(/\/api\/v1$/, "")).replace(/\/$/, "");
|
|
31
51
|
const _settingsUrl = `${_baseUrl}/dashboard/settings/api?mcp_port=${_port}`;
|
package/dist/tools/login.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/tools/login.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAmC,MAAM,MAAM,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/tools/login.ts"],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AAC;gBACL,CAAC;YACH,CAAC,EAAE,OAAO,CAAC,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"newsletter.d.ts","sourceRoot":"","sources":["../../src/tools/newsletter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAgC/D"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { apiFetch } from "../lib/api-client.js";
|
|
3
|
+
import { formatError } from "../lib/errors.js";
|
|
4
|
+
export function registerNewsletterTools(server) {
|
|
5
|
+
server.tool("list_newsletter_subscribers", "Get your newsletter subscriber list. Requires API key authentication.", {
|
|
6
|
+
limit: z.number().int().min(1).max(100).optional().default(20),
|
|
7
|
+
offset: z.number().int().min(0).optional().default(0),
|
|
8
|
+
}, async ({ limit, offset }) => {
|
|
9
|
+
try {
|
|
10
|
+
const qs = new URLSearchParams({ limit: String(limit), offset: String(offset) });
|
|
11
|
+
const data = await apiFetch(`/newsletter/subscribers?${qs}`);
|
|
12
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
13
|
+
}
|
|
14
|
+
catch (e) {
|
|
15
|
+
return { content: [{ type: "text", text: formatError(e) }], isError: true };
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
server.tool("list_newsletter_issues", "Get your sent and scheduled newsletter issues. Requires API key authentication.", { limit: z.number().int().min(1).max(50).optional().default(10) }, async ({ limit }) => {
|
|
19
|
+
try {
|
|
20
|
+
const data = await apiFetch(`/newsletter/issues?limit=${limit}`);
|
|
21
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
22
|
+
}
|
|
23
|
+
catch (e) {
|
|
24
|
+
return { content: [{ type: "text", text: formatError(e) }], isError: true };
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=newsletter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"newsletter.js","sourceRoot":"","sources":["../../src/tools/newsletter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,UAAU,uBAAuB,CAAC,MAAiB;IACvD,MAAM,CAAC,IAAI,CACT,6BAA6B,EAC7B,uEAAuE,EACvE;QACE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;KACtD,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;QAC1B,IAAI,CAAC;YACH,MAAM,EAAE,GAAG,IAAI,eAAe,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACjF,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAU,2BAA2B,EAAE,EAAE,CAAC,CAAC;YACtE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QAC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
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { apiFetch } from "../lib/api-client.js";
|
|
3
|
+
import { formatError } from "../lib/errors.js";
|
|
4
|
+
const REACTION_TYPES = ["like", "clap", "bookmark"];
|
|
5
|
+
export function registerReactionTools(server) {
|
|
6
|
+
server.tool("get_reactions", "Get reaction counts and your reactions for an article. Requires API key.", {
|
|
7
|
+
article_id: z.string().uuid().describe("UUID of the article"),
|
|
8
|
+
}, async ({ article_id }) => {
|
|
9
|
+
try {
|
|
10
|
+
const data = await apiFetch(`/reactions?article_id=${encodeURIComponent(article_id)}`);
|
|
11
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
12
|
+
}
|
|
13
|
+
catch (e) {
|
|
14
|
+
return { content: [{ type: "text", text: formatError(e) }], isError: true };
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
server.tool("add_reaction", "Add a reaction to an article. No-ops if already reacted. Requires API key.", {
|
|
18
|
+
article_id: z.string().uuid().describe("UUID of the article"),
|
|
19
|
+
type: z.enum(REACTION_TYPES).describe("Reaction type: like, clap, or bookmark"),
|
|
20
|
+
}, async ({ article_id, type }) => {
|
|
21
|
+
try {
|
|
22
|
+
const data = await apiFetch("/reactions", {
|
|
23
|
+
method: "POST",
|
|
24
|
+
body: JSON.stringify({ article_id, type }),
|
|
25
|
+
});
|
|
26
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
return { content: [{ type: "text", text: formatError(e) }], isError: true };
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
server.tool("remove_reaction", "Remove a specific reaction from an article. Requires API key.", {
|
|
33
|
+
article_id: z.string().uuid().describe("UUID of the article"),
|
|
34
|
+
type: z.enum(REACTION_TYPES).describe("Reaction type to remove: like, clap, or bookmark"),
|
|
35
|
+
}, async ({ article_id, type }) => {
|
|
36
|
+
try {
|
|
37
|
+
const qs = new URLSearchParams({ article_id, type });
|
|
38
|
+
const data = await apiFetch(`/reactions?${qs}`, { method: "DELETE" });
|
|
39
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
40
|
+
}
|
|
41
|
+
catch (e) {
|
|
42
|
+
return { content: [{ type: "text", text: formatError(e) }], isError: true };
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=reactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactions.js","sourceRoot":"","sources":["../../src/tools/reactions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAU,CAAC;AAE7D,MAAM,UAAU,qBAAqB,CAAC,MAAiB;IACrD,MAAM,CAAC,IAAI,CACT,eAAe,EACf,0EAA0E,EAC1E;QACE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;KAC9D,EACD,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,yBAAyB,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YACvF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACvF,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI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C,QAAQ,CAAC,kDAAkD,CAAC;KAC1F,EACD,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,EAAE;QAC7B,IAAI,CAAC;YACH,MAAM,EAAE,GAAG,IAAI,eAAe,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;YACrD,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,cAAc,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;YACtE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;QACvF,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QACvF,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/tools/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AASpE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,QAkCnD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { tryGetApiKey } from "../lib/auth.js";
|
|
2
|
+
import { apiFetch } from "../lib/api-client.js";
|
|
3
|
+
import { formatError } from "../lib/errors.js";
|
|
4
|
+
export function registerStatusTool(server) {
|
|
5
|
+
server.tool("status", "Check whether you are authenticated with Misar.Blog and which account is connected. Run this first to verify your connection.", {}, async () => {
|
|
6
|
+
const key = tryGetApiKey();
|
|
7
|
+
if (!key) {
|
|
8
|
+
return {
|
|
9
|
+
content: [{
|
|
10
|
+
type: "text",
|
|
11
|
+
text: "Not authenticated. Run the `login` tool to connect your Misar.Blog account.",
|
|
12
|
+
}],
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
const profile = await apiFetch("/me");
|
|
17
|
+
return {
|
|
18
|
+
content: [{
|
|
19
|
+
type: "text",
|
|
20
|
+
text: `Authenticated as @${profile.username}. Your API key is active and working.`,
|
|
21
|
+
}],
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
catch (err) {
|
|
25
|
+
return {
|
|
26
|
+
content: [{
|
|
27
|
+
type: "text",
|
|
28
|
+
text: `API key found but rejected by server: ${formatError(err)}. Run \`login\` to re-authenticate.`,
|
|
29
|
+
}],
|
|
30
|
+
isError: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/tools/status.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/C,MAAM,UAAU,kBAAkB,CAAC,MAAiB;IAClD,MAAM,CAAC,IAAI,CACT,QAAQ,EACR,+HAA+H,EAC/H,EAAE,EACF,KAAK,IAAI,EAAE;QACT,MAAM,GAAG,GAAG,YAAY,EAAE,CAAC;QAC3B,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,OAAO;gBACL,OAAO,EAAE,CAAC;wBACR,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,6EAA6E;qBACpF,CAAC;aACH,CAAC;QACJ,CAAC;QACD,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAkB,KAAK,CAAC,CAAC;YACvD,OAAO;gBACL,OAAO,EAAE,CAAC;wBACR,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,qBAAqB,OAAO,CAAC,QAAQ,uCAAuC;qBACnF,CAAC;aACH,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE,CAAC;wBACR,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,yCAAyC,WAAW,CAAC,GAAG,CAAC,qCAAqC;qBACrG,CAAC;gBACF,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@misarblog/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"mcpName": "io.github.mrgulshanyadav/misarblog-mcp",
|
|
5
5
|
"description": "MCP server for Misar.Blog — publish blog posts, manage drafts, generate AI cover images, and access analytics from Claude Code, Cursor & Windsurf.",
|
|
6
6
|
"type": "module",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"license": "MIT",
|
|
56
56
|
"repository": {
|
|
57
57
|
"type": "git",
|
|
58
|
-
"url": "https://git.misar.io/misaradmin/
|
|
58
|
+
"url": "https://git.misar.io/misaradmin/misar-io"
|
|
59
59
|
},
|
|
60
60
|
"homepage": "https://www.misar.blog"
|
|
61
|
-
}
|
|
61
|
+
}
|
package/smithery.yaml
CHANGED
|
@@ -10,7 +10,7 @@ startCommand:
|
|
|
10
10
|
title: API Key
|
|
11
11
|
description: >
|
|
12
12
|
Your Misar.Blog API key (starts with mbk_). Generate one at
|
|
13
|
-
https://www.misar.blog/dashboard/settings/api — or leave blank and
|
|
13
|
+
https://www.misar.blog/dashboard/settings/api-keys — or leave blank and
|
|
14
14
|
run the "login" tool to authenticate via browser.
|
|
15
15
|
x-secret: true
|
|
16
16
|
baseUrl:
|