@socialneuron/mcp-server 1.2.1 → 1.3.1
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/CHANGELOG.md +33 -0
- package/README.md +19 -7
- package/dist/http.js +411 -7
- package/dist/index.js +2298 -1076
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@socialneuron/mcp-server` will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.3.1] - 2026-03-13
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **zod v4 compatibility**: Updated `zod` dependency from v3 to v4 to match `@modelcontextprotocol/sdk` peer requirement, fixing `ERR_PACKAGE_PATH_NOT_EXPORTED` crash on `npx` install
|
|
9
|
+
- **Test domain**: Fixed test fixtures using deprecated `socialneuron.ai` domain (now `socialneuron.com`)
|
|
10
|
+
- **CLI E2E timeout**: Increased envelope test timeout to avoid false failures
|
|
11
|
+
|
|
12
|
+
## [1.3.0] - 2026-03-13
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **Tool discovery**: `sn tools` command lists all 52 MCP tools, filterable by `--module` and `--scope`
|
|
17
|
+
- **Introspection**: `sn info` shows version, tool count, auth status, and credit balance (works offline)
|
|
18
|
+
- **Content plan CLI**: `sn plan list|view|approve` wrappers for content plan management
|
|
19
|
+
- **Presets**: `sn preset list|show|save|delete` with 6 built-in platform presets (instagram-reel, tiktok, youtube-short, etc.)
|
|
20
|
+
- **Interactive REPL**: `socialneuron-mcp repl` with tab completion and persistent auth
|
|
21
|
+
- **Progressive disclosure**: New `search_tools` MCP tool reduces agent token usage from 55K to ~500 tokens
|
|
22
|
+
- **Unified JSON envelope**: All CLI JSON output includes `schema_version: "1"`, `ok`, `command`, typed errors with `errorType` + `retryable` + `hint`
|
|
23
|
+
- **`--json` everywhere**: `--version --json`, `--help --json` now return structured JSON
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- Error handler (`withSnErrorHandling`) now wraps all dispatcher handler calls — consistent error formatting
|
|
28
|
+
- Flag validation runs before auth — missing flags show VALIDATION error, not AUTH error
|
|
29
|
+
- Deduplicated platform normalization in publish handler
|
|
30
|
+
- `schema_version: "1"` added to whoami, health, logout JSON output
|
|
31
|
+
|
|
32
|
+
### Internal
|
|
33
|
+
|
|
34
|
+
- 52 tools (was 51), 759 tests (was 698), 374.7KB build
|
|
35
|
+
- New files: tool-catalog.ts, discovery.ts (CLI + MCP), planning.ts, presets.ts, repl.ts
|
|
36
|
+
- CLI E2E test suite (23 tests), MCP E2E test suite (13 tests)
|
|
37
|
+
|
|
5
38
|
## [1.2.1] - 2026-03-11
|
|
6
39
|
|
|
7
40
|
### Fixed
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @socialneuron/mcp-server
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> 52 MCP tools for AI-powered social media management. Create content, schedule posts, track analytics, and optimize performance — all from Claude Code or any MCP client.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@socialneuron/mcp-server)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
npx -y @socialneuron/mcp-server login --device
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
This opens your browser to authorize access. Requires a Social Neuron plan (
|
|
16
|
+
This opens your browser to authorize access. Requires a paid Social Neuron plan (Starter or above). See [pricing](https://socialneuron.com/pricing).
|
|
17
17
|
|
|
18
18
|
### 2. Add to Claude Code
|
|
19
19
|
|
|
@@ -92,7 +92,7 @@ Ask Claude things like:
|
|
|
92
92
|
- "Check my analytics and suggest improvements"
|
|
93
93
|
- "Set up autopilot to post 3 times per week"
|
|
94
94
|
|
|
95
|
-
## Tool Categories (
|
|
95
|
+
## Tool Categories (52 tools)
|
|
96
96
|
|
|
97
97
|
These tools are available to AI agents (Claude, Cursor, etc.) via the MCP protocol.
|
|
98
98
|
|
|
@@ -128,6 +128,7 @@ These tools are available to AI agents (Claude, Cursor, etc.) via the MCP protoc
|
|
|
128
128
|
| Remotion | list_compositions, render_demo_video | Programmatic video rendering |
|
|
129
129
|
| Usage | get_mcp_usage | API usage monitoring |
|
|
130
130
|
| YouTube | fetch_youtube_analytics | YouTube-specific deep analytics |
|
|
131
|
+
| Discovery | search_tools | Find tools by keyword with progressive detail levels (saves 98% tokens vs loading all tools) |
|
|
131
132
|
|
|
132
133
|
## Authentication
|
|
133
134
|
|
|
@@ -141,13 +142,13 @@ npx -y @socialneuron/mcp-server login --device
|
|
|
141
142
|
|
|
142
143
|
Opens browser, you approve, CLI receives API key automatically.
|
|
143
144
|
|
|
144
|
-
###
|
|
145
|
+
### Browser Flow
|
|
145
146
|
|
|
146
147
|
```bash
|
|
147
148
|
npx -y @socialneuron/mcp-server login
|
|
148
149
|
```
|
|
149
150
|
|
|
150
|
-
Browser-based OAuth flow
|
|
151
|
+
Browser-based OAuth flow.
|
|
151
152
|
|
|
152
153
|
### API Key Paste
|
|
153
154
|
|
|
@@ -163,14 +164,16 @@ Keys are stored in your OS keychain (macOS Keychain, Linux secret-tool) or file
|
|
|
163
164
|
|
|
164
165
|
## Pricing
|
|
165
166
|
|
|
167
|
+
MCP access requires a paid plan:
|
|
168
|
+
|
|
166
169
|
| Plan | Price | Credits/mo | MCP Access |
|
|
167
170
|
|------|-------|-----------|------------|
|
|
168
|
-
|
|
|
171
|
+
| Free | $0 | 100 | — |
|
|
169
172
|
| Starter | $29/mo | 800 | Read + Analytics |
|
|
170
173
|
| Pro | $79/mo | 2,000 | Full access |
|
|
171
174
|
| Team | $199/mo | 6,500 | Full access + Multi-user |
|
|
172
175
|
|
|
173
|
-
|
|
176
|
+
Sign up at [socialneuron.com/pricing](https://socialneuron.com/pricing).
|
|
174
177
|
|
|
175
178
|
## Scopes
|
|
176
179
|
|
|
@@ -212,6 +215,15 @@ socialneuron-mcp sn usage
|
|
|
212
215
|
socialneuron-mcp sn loop
|
|
213
216
|
socialneuron-mcp sn credits
|
|
214
217
|
|
|
218
|
+
# Agent-native CLI v2
|
|
219
|
+
socialneuron-mcp sn tools [--module ideation] [--scope mcp:write] # List/filter all 52 tools
|
|
220
|
+
socialneuron-mcp sn info # Version, auth, credits, tool count
|
|
221
|
+
socialneuron-mcp sn plan list|view|approve # Content plan management
|
|
222
|
+
socialneuron-mcp sn preset list|show|save|delete # Platform presets (6 built-in)
|
|
223
|
+
|
|
224
|
+
# Interactive REPL
|
|
225
|
+
socialneuron-mcp repl
|
|
226
|
+
|
|
215
227
|
# Add --json to any command for machine-readable output
|
|
216
228
|
```
|
|
217
229
|
|
package/dist/http.js
CHANGED
|
@@ -618,7 +618,8 @@ var TOOL_SCOPES = {
|
|
|
618
618
|
schedule_content_plan: "mcp:distribute",
|
|
619
619
|
// mcp:read (usage is read-only)
|
|
620
620
|
get_mcp_usage: "mcp:read",
|
|
621
|
-
list_plan_approvals: "mcp:read"
|
|
621
|
+
list_plan_approvals: "mcp:read",
|
|
622
|
+
search_tools: "mcp:read"
|
|
622
623
|
};
|
|
623
624
|
function hasScope(userScopes, required) {
|
|
624
625
|
if (userScopes.includes(required)) return true;
|
|
@@ -1287,11 +1288,11 @@ function asEnvelope(data) {
|
|
|
1287
1288
|
};
|
|
1288
1289
|
}
|
|
1289
1290
|
var VIDEO_CREDIT_ESTIMATES = {
|
|
1290
|
-
"veo3-fast":
|
|
1291
|
-
"veo3-quality":
|
|
1292
|
-
"runway-aleph":
|
|
1293
|
-
sora2:
|
|
1294
|
-
"sora2-pro":
|
|
1291
|
+
"veo3-fast": 200,
|
|
1292
|
+
"veo3-quality": 1e3,
|
|
1293
|
+
"runway-aleph": 340,
|
|
1294
|
+
sora2: 500,
|
|
1295
|
+
"sora2-pro": 1500,
|
|
1295
1296
|
kling: 170,
|
|
1296
1297
|
"kling-3": 100,
|
|
1297
1298
|
"kling-3-pro": 135
|
|
@@ -6214,7 +6215,7 @@ init_supabase();
|
|
|
6214
6215
|
import { z as z14 } from "zod";
|
|
6215
6216
|
|
|
6216
6217
|
// src/lib/version.ts
|
|
6217
|
-
var MCP_VERSION = "1.
|
|
6218
|
+
var MCP_VERSION = "1.3.1";
|
|
6218
6219
|
|
|
6219
6220
|
// src/tools/usage.ts
|
|
6220
6221
|
function asEnvelope10(data) {
|
|
@@ -7883,6 +7884,408 @@ function registerPlanApprovalTools(server) {
|
|
|
7883
7884
|
);
|
|
7884
7885
|
}
|
|
7885
7886
|
|
|
7887
|
+
// src/tools/discovery.ts
|
|
7888
|
+
import { z as z20 } from "zod";
|
|
7889
|
+
|
|
7890
|
+
// src/lib/tool-catalog.ts
|
|
7891
|
+
var TOOL_CATALOG = [
|
|
7892
|
+
// ideation
|
|
7893
|
+
{
|
|
7894
|
+
name: "generate_content",
|
|
7895
|
+
description: "Generate social media content ideas based on brand profile and trends",
|
|
7896
|
+
module: "ideation",
|
|
7897
|
+
scope: "mcp:write"
|
|
7898
|
+
},
|
|
7899
|
+
{
|
|
7900
|
+
name: "fetch_trends",
|
|
7901
|
+
description: "Fetch current trending topics for content ideation",
|
|
7902
|
+
module: "ideation",
|
|
7903
|
+
scope: "mcp:read"
|
|
7904
|
+
},
|
|
7905
|
+
// ideation-context
|
|
7906
|
+
{
|
|
7907
|
+
name: "get_ideation_context",
|
|
7908
|
+
description: "Get full ideation context including brand, analytics, and trends",
|
|
7909
|
+
module: "ideation-context",
|
|
7910
|
+
scope: "mcp:read"
|
|
7911
|
+
},
|
|
7912
|
+
// content
|
|
7913
|
+
{
|
|
7914
|
+
name: "adapt_content",
|
|
7915
|
+
description: "Adapt existing content for different platforms",
|
|
7916
|
+
module: "content",
|
|
7917
|
+
scope: "mcp:write"
|
|
7918
|
+
},
|
|
7919
|
+
{
|
|
7920
|
+
name: "generate_video",
|
|
7921
|
+
description: "Generate video content using AI",
|
|
7922
|
+
module: "content",
|
|
7923
|
+
scope: "mcp:write"
|
|
7924
|
+
},
|
|
7925
|
+
{
|
|
7926
|
+
name: "generate_image",
|
|
7927
|
+
description: "Generate images using AI",
|
|
7928
|
+
module: "content",
|
|
7929
|
+
scope: "mcp:write"
|
|
7930
|
+
},
|
|
7931
|
+
{
|
|
7932
|
+
name: "check_status",
|
|
7933
|
+
description: "Check status of async content generation job",
|
|
7934
|
+
module: "content",
|
|
7935
|
+
scope: "mcp:write"
|
|
7936
|
+
},
|
|
7937
|
+
{
|
|
7938
|
+
name: "create_storyboard",
|
|
7939
|
+
description: "Create a video storyboard with scenes and shots",
|
|
7940
|
+
module: "content",
|
|
7941
|
+
scope: "mcp:write"
|
|
7942
|
+
},
|
|
7943
|
+
{
|
|
7944
|
+
name: "generate_voiceover",
|
|
7945
|
+
description: "Generate AI voiceover audio",
|
|
7946
|
+
module: "content",
|
|
7947
|
+
scope: "mcp:write"
|
|
7948
|
+
},
|
|
7949
|
+
{
|
|
7950
|
+
name: "generate_carousel",
|
|
7951
|
+
description: "Generate carousel/slide content",
|
|
7952
|
+
module: "content",
|
|
7953
|
+
scope: "mcp:write"
|
|
7954
|
+
},
|
|
7955
|
+
// distribution
|
|
7956
|
+
{
|
|
7957
|
+
name: "schedule_post",
|
|
7958
|
+
description: "Schedule content for publishing to social platforms",
|
|
7959
|
+
module: "distribution",
|
|
7960
|
+
scope: "mcp:distribute"
|
|
7961
|
+
},
|
|
7962
|
+
{
|
|
7963
|
+
name: "list_recent_posts",
|
|
7964
|
+
description: "List recently published or scheduled posts",
|
|
7965
|
+
module: "distribution",
|
|
7966
|
+
scope: "mcp:read"
|
|
7967
|
+
},
|
|
7968
|
+
{
|
|
7969
|
+
name: "list_connected_accounts",
|
|
7970
|
+
description: "List connected social media accounts",
|
|
7971
|
+
module: "distribution",
|
|
7972
|
+
scope: "mcp:read"
|
|
7973
|
+
},
|
|
7974
|
+
// analytics
|
|
7975
|
+
{
|
|
7976
|
+
name: "fetch_analytics",
|
|
7977
|
+
description: "Fetch post performance analytics",
|
|
7978
|
+
module: "analytics",
|
|
7979
|
+
scope: "mcp:read"
|
|
7980
|
+
},
|
|
7981
|
+
{
|
|
7982
|
+
name: "refresh_platform_analytics",
|
|
7983
|
+
description: "Refresh analytics data from connected platforms",
|
|
7984
|
+
module: "analytics",
|
|
7985
|
+
scope: "mcp:analytics"
|
|
7986
|
+
},
|
|
7987
|
+
// insights
|
|
7988
|
+
{
|
|
7989
|
+
name: "get_performance_insights",
|
|
7990
|
+
description: "Get AI-generated performance insights",
|
|
7991
|
+
module: "insights",
|
|
7992
|
+
scope: "mcp:read"
|
|
7993
|
+
},
|
|
7994
|
+
{
|
|
7995
|
+
name: "get_best_posting_times",
|
|
7996
|
+
description: "Get recommended posting times based on audience data",
|
|
7997
|
+
module: "insights",
|
|
7998
|
+
scope: "mcp:read"
|
|
7999
|
+
},
|
|
8000
|
+
// brand
|
|
8001
|
+
{
|
|
8002
|
+
name: "extract_brand",
|
|
8003
|
+
description: "Extract brand identity from URL or text",
|
|
8004
|
+
module: "brand",
|
|
8005
|
+
scope: "mcp:read"
|
|
8006
|
+
},
|
|
8007
|
+
{
|
|
8008
|
+
name: "get_brand_profile",
|
|
8009
|
+
description: "Get the current brand profile",
|
|
8010
|
+
module: "brand",
|
|
8011
|
+
scope: "mcp:read"
|
|
8012
|
+
},
|
|
8013
|
+
{
|
|
8014
|
+
name: "save_brand_profile",
|
|
8015
|
+
description: "Save or update brand profile",
|
|
8016
|
+
module: "brand",
|
|
8017
|
+
scope: "mcp:write"
|
|
8018
|
+
},
|
|
8019
|
+
{
|
|
8020
|
+
name: "update_platform_voice",
|
|
8021
|
+
description: "Update platform-specific brand voice settings",
|
|
8022
|
+
module: "brand",
|
|
8023
|
+
scope: "mcp:write"
|
|
8024
|
+
},
|
|
8025
|
+
// screenshot
|
|
8026
|
+
{
|
|
8027
|
+
name: "capture_screenshot",
|
|
8028
|
+
description: "Capture a screenshot of a URL",
|
|
8029
|
+
module: "screenshot",
|
|
8030
|
+
scope: "mcp:read"
|
|
8031
|
+
},
|
|
8032
|
+
{
|
|
8033
|
+
name: "capture_app_page",
|
|
8034
|
+
description: "Capture a screenshot of an app page",
|
|
8035
|
+
module: "screenshot",
|
|
8036
|
+
scope: "mcp:read"
|
|
8037
|
+
},
|
|
8038
|
+
// remotion
|
|
8039
|
+
{
|
|
8040
|
+
name: "render_demo_video",
|
|
8041
|
+
description: "Render a demo video using Remotion",
|
|
8042
|
+
module: "remotion",
|
|
8043
|
+
scope: "mcp:write"
|
|
8044
|
+
},
|
|
8045
|
+
{
|
|
8046
|
+
name: "list_compositions",
|
|
8047
|
+
description: "List available Remotion video compositions",
|
|
8048
|
+
module: "remotion",
|
|
8049
|
+
scope: "mcp:read"
|
|
8050
|
+
},
|
|
8051
|
+
// youtube-analytics
|
|
8052
|
+
{
|
|
8053
|
+
name: "fetch_youtube_analytics",
|
|
8054
|
+
description: "Fetch YouTube channel analytics data",
|
|
8055
|
+
module: "youtube-analytics",
|
|
8056
|
+
scope: "mcp:analytics"
|
|
8057
|
+
},
|
|
8058
|
+
// comments
|
|
8059
|
+
{
|
|
8060
|
+
name: "list_comments",
|
|
8061
|
+
description: "List comments on published posts",
|
|
8062
|
+
module: "comments",
|
|
8063
|
+
scope: "mcp:comments"
|
|
8064
|
+
},
|
|
8065
|
+
{
|
|
8066
|
+
name: "reply_to_comment",
|
|
8067
|
+
description: "Reply to a comment on a post",
|
|
8068
|
+
module: "comments",
|
|
8069
|
+
scope: "mcp:comments"
|
|
8070
|
+
},
|
|
8071
|
+
{
|
|
8072
|
+
name: "post_comment",
|
|
8073
|
+
description: "Post a new comment",
|
|
8074
|
+
module: "comments",
|
|
8075
|
+
scope: "mcp:comments"
|
|
8076
|
+
},
|
|
8077
|
+
{
|
|
8078
|
+
name: "moderate_comment",
|
|
8079
|
+
description: "Moderate a comment (approve/hide/flag)",
|
|
8080
|
+
module: "comments",
|
|
8081
|
+
scope: "mcp:comments"
|
|
8082
|
+
},
|
|
8083
|
+
{
|
|
8084
|
+
name: "delete_comment",
|
|
8085
|
+
description: "Delete a comment",
|
|
8086
|
+
module: "comments",
|
|
8087
|
+
scope: "mcp:comments"
|
|
8088
|
+
},
|
|
8089
|
+
// planning
|
|
8090
|
+
{
|
|
8091
|
+
name: "plan_content_week",
|
|
8092
|
+
description: "Generate a weekly content plan",
|
|
8093
|
+
module: "planning",
|
|
8094
|
+
scope: "mcp:write"
|
|
8095
|
+
},
|
|
8096
|
+
{
|
|
8097
|
+
name: "save_content_plan",
|
|
8098
|
+
description: "Save a content plan",
|
|
8099
|
+
module: "planning",
|
|
8100
|
+
scope: "mcp:write"
|
|
8101
|
+
},
|
|
8102
|
+
{
|
|
8103
|
+
name: "get_content_plan",
|
|
8104
|
+
description: "Get a specific content plan by ID",
|
|
8105
|
+
module: "planning",
|
|
8106
|
+
scope: "mcp:read"
|
|
8107
|
+
},
|
|
8108
|
+
{
|
|
8109
|
+
name: "update_content_plan",
|
|
8110
|
+
description: "Update an existing content plan",
|
|
8111
|
+
module: "planning",
|
|
8112
|
+
scope: "mcp:write"
|
|
8113
|
+
},
|
|
8114
|
+
{
|
|
8115
|
+
name: "submit_content_plan_for_approval",
|
|
8116
|
+
description: "Submit a content plan for team approval",
|
|
8117
|
+
module: "planning",
|
|
8118
|
+
scope: "mcp:write"
|
|
8119
|
+
},
|
|
8120
|
+
{
|
|
8121
|
+
name: "schedule_content_plan",
|
|
8122
|
+
description: "Schedule all posts in an approved content plan",
|
|
8123
|
+
module: "planning",
|
|
8124
|
+
scope: "mcp:distribute"
|
|
8125
|
+
},
|
|
8126
|
+
{
|
|
8127
|
+
name: "find_next_slots",
|
|
8128
|
+
description: "Find next available scheduling slots",
|
|
8129
|
+
module: "planning",
|
|
8130
|
+
scope: "mcp:read"
|
|
8131
|
+
},
|
|
8132
|
+
// plan-approvals
|
|
8133
|
+
{
|
|
8134
|
+
name: "create_plan_approvals",
|
|
8135
|
+
description: "Create approval requests for a content plan",
|
|
8136
|
+
module: "plan-approvals",
|
|
8137
|
+
scope: "mcp:write"
|
|
8138
|
+
},
|
|
8139
|
+
{
|
|
8140
|
+
name: "respond_plan_approval",
|
|
8141
|
+
description: "Respond to a plan approval request",
|
|
8142
|
+
module: "plan-approvals",
|
|
8143
|
+
scope: "mcp:write"
|
|
8144
|
+
},
|
|
8145
|
+
{
|
|
8146
|
+
name: "list_plan_approvals",
|
|
8147
|
+
description: "List pending plan approval requests",
|
|
8148
|
+
module: "plan-approvals",
|
|
8149
|
+
scope: "mcp:read"
|
|
8150
|
+
},
|
|
8151
|
+
// quality
|
|
8152
|
+
{
|
|
8153
|
+
name: "quality_check",
|
|
8154
|
+
description: "Run quality checks on content before publishing",
|
|
8155
|
+
module: "quality",
|
|
8156
|
+
scope: "mcp:read"
|
|
8157
|
+
},
|
|
8158
|
+
{
|
|
8159
|
+
name: "quality_check_plan",
|
|
8160
|
+
description: "Run quality checks on an entire content plan",
|
|
8161
|
+
module: "quality",
|
|
8162
|
+
scope: "mcp:read"
|
|
8163
|
+
},
|
|
8164
|
+
// credits
|
|
8165
|
+
{
|
|
8166
|
+
name: "get_credit_balance",
|
|
8167
|
+
description: "Get current credit balance",
|
|
8168
|
+
module: "credits",
|
|
8169
|
+
scope: "mcp:read"
|
|
8170
|
+
},
|
|
8171
|
+
{
|
|
8172
|
+
name: "get_budget_status",
|
|
8173
|
+
description: "Get budget and spending status",
|
|
8174
|
+
module: "credits",
|
|
8175
|
+
scope: "mcp:read"
|
|
8176
|
+
},
|
|
8177
|
+
// autopilot
|
|
8178
|
+
{
|
|
8179
|
+
name: "list_autopilot_configs",
|
|
8180
|
+
description: "List autopilot configurations",
|
|
8181
|
+
module: "autopilot",
|
|
8182
|
+
scope: "mcp:autopilot"
|
|
8183
|
+
},
|
|
8184
|
+
{
|
|
8185
|
+
name: "update_autopilot_config",
|
|
8186
|
+
description: "Update autopilot configuration",
|
|
8187
|
+
module: "autopilot",
|
|
8188
|
+
scope: "mcp:autopilot"
|
|
8189
|
+
},
|
|
8190
|
+
{
|
|
8191
|
+
name: "get_autopilot_status",
|
|
8192
|
+
description: "Get current autopilot status",
|
|
8193
|
+
module: "autopilot",
|
|
8194
|
+
scope: "mcp:autopilot"
|
|
8195
|
+
},
|
|
8196
|
+
// extraction
|
|
8197
|
+
{
|
|
8198
|
+
name: "extract_url_content",
|
|
8199
|
+
description: "Extract content from a URL for repurposing",
|
|
8200
|
+
module: "extraction",
|
|
8201
|
+
scope: "mcp:read"
|
|
8202
|
+
},
|
|
8203
|
+
// loop-summary
|
|
8204
|
+
{
|
|
8205
|
+
name: "get_loop_summary",
|
|
8206
|
+
description: "Get growth loop summary and recommendations",
|
|
8207
|
+
module: "loop-summary",
|
|
8208
|
+
scope: "mcp:read"
|
|
8209
|
+
},
|
|
8210
|
+
// usage
|
|
8211
|
+
{
|
|
8212
|
+
name: "get_mcp_usage",
|
|
8213
|
+
description: "Get MCP usage statistics for the current billing period",
|
|
8214
|
+
module: "usage",
|
|
8215
|
+
scope: "mcp:read"
|
|
8216
|
+
},
|
|
8217
|
+
// discovery
|
|
8218
|
+
{
|
|
8219
|
+
name: "search_tools",
|
|
8220
|
+
description: "Search and discover available MCP tools",
|
|
8221
|
+
module: "discovery",
|
|
8222
|
+
scope: "mcp:read"
|
|
8223
|
+
}
|
|
8224
|
+
];
|
|
8225
|
+
function getToolsByModule(module) {
|
|
8226
|
+
return TOOL_CATALOG.filter((t) => t.module === module);
|
|
8227
|
+
}
|
|
8228
|
+
function getToolsByScope(scope) {
|
|
8229
|
+
return TOOL_CATALOG.filter((t) => t.scope === scope);
|
|
8230
|
+
}
|
|
8231
|
+
function searchTools(query) {
|
|
8232
|
+
const q = query.toLowerCase();
|
|
8233
|
+
return TOOL_CATALOG.filter(
|
|
8234
|
+
(t) => t.name.toLowerCase().includes(q) || t.description.toLowerCase().includes(q)
|
|
8235
|
+
);
|
|
8236
|
+
}
|
|
8237
|
+
|
|
8238
|
+
// src/tools/discovery.ts
|
|
8239
|
+
function registerDiscoveryTools(server) {
|
|
8240
|
+
server.tool(
|
|
8241
|
+
"search_tools",
|
|
8242
|
+
'Search and discover available MCP tools. Use detail level to control token usage: "name" (~50 tokens), "summary" (~500 tokens), "full" (complete schemas).',
|
|
8243
|
+
{
|
|
8244
|
+
query: z20.string().optional().describe("Search query to filter tools by name or description"),
|
|
8245
|
+
module: z20.string().optional().describe('Filter by module name (e.g. "planning", "content", "analytics")'),
|
|
8246
|
+
scope: z20.string().optional().describe('Filter by required scope (e.g. "mcp:read", "mcp:write")'),
|
|
8247
|
+
detail: z20.enum(["name", "summary", "full"]).default("summary").describe(
|
|
8248
|
+
'Detail level: "name" for just tool names, "summary" for names + descriptions, "full" for complete info including scope and module'
|
|
8249
|
+
)
|
|
8250
|
+
},
|
|
8251
|
+
async ({ query, module, scope, detail }) => {
|
|
8252
|
+
let results = [...TOOL_CATALOG];
|
|
8253
|
+
if (query) {
|
|
8254
|
+
results = searchTools(query);
|
|
8255
|
+
}
|
|
8256
|
+
if (module) {
|
|
8257
|
+
const moduleTools = getToolsByModule(module);
|
|
8258
|
+
results = results.filter((t) => moduleTools.some((mt) => mt.name === t.name));
|
|
8259
|
+
}
|
|
8260
|
+
if (scope) {
|
|
8261
|
+
const scopeTools = getToolsByScope(scope);
|
|
8262
|
+
results = results.filter((t) => scopeTools.some((st) => st.name === t.name));
|
|
8263
|
+
}
|
|
8264
|
+
let output;
|
|
8265
|
+
switch (detail) {
|
|
8266
|
+
case "name":
|
|
8267
|
+
output = results.map((t) => t.name);
|
|
8268
|
+
break;
|
|
8269
|
+
case "summary":
|
|
8270
|
+
output = results.map((t) => ({ name: t.name, description: t.description }));
|
|
8271
|
+
break;
|
|
8272
|
+
case "full":
|
|
8273
|
+
default:
|
|
8274
|
+
output = results;
|
|
8275
|
+
break;
|
|
8276
|
+
}
|
|
8277
|
+
return {
|
|
8278
|
+
content: [
|
|
8279
|
+
{
|
|
8280
|
+
type: "text",
|
|
8281
|
+
text: JSON.stringify({ toolCount: results.length, tools: output }, null, 2)
|
|
8282
|
+
}
|
|
8283
|
+
]
|
|
8284
|
+
};
|
|
8285
|
+
}
|
|
8286
|
+
);
|
|
8287
|
+
}
|
|
8288
|
+
|
|
7886
8289
|
// src/lib/register-tools.ts
|
|
7887
8290
|
function applyScopeEnforcement(server, scopeResolver) {
|
|
7888
8291
|
const originalTool = server.tool.bind(server);
|
|
@@ -7946,6 +8349,7 @@ function registerAllTools(server, options) {
|
|
|
7946
8349
|
registerQualityTools(server);
|
|
7947
8350
|
registerPlanningTools(server);
|
|
7948
8351
|
registerPlanApprovalTools(server);
|
|
8352
|
+
registerDiscoveryTools(server);
|
|
7949
8353
|
}
|
|
7950
8354
|
|
|
7951
8355
|
// src/http.ts
|