@sendinel/mcp-server 1.0.182 → 1.0.183
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.
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** #4508: operations whose implicit scope cannot be reduced to a project set. */
|
|
2
|
+
export const LIMITED_GRANT_DENIED_TOOLS = new Set([
|
|
3
|
+
'get_portfolio_stats', 'get_portfolio_analytics', 'run_portfolio_analysis', 'review_campaign_portfolio',
|
|
4
|
+
'create_project',
|
|
5
|
+
'list_team_members', 'invite_team_member', 'remove_team_member', 'set_team_member_role',
|
|
6
|
+
'set_member_project_access', 'list_invitations', 'resend_invitation', 'revoke_invitation',
|
|
7
|
+
'get_plan_usage', 'get_model_registry', 'get_white_label_settings', 'set_white_label_settings',
|
|
8
|
+
'add_white_label_domain', 'list_my_support_tickets', 'post_ticket_reply', 'get_outbound_digest',
|
|
9
|
+
'list_social_connections',
|
|
10
|
+
]);
|
package/build/tools/gateway.js
CHANGED
|
@@ -2,6 +2,8 @@ import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
|
2
2
|
import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js';
|
|
3
3
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
+
import { requestContext } from '../db.js';
|
|
6
|
+
import { LIMITED_GRANT_DENIED_TOOLS } from '../lib/limited-grant.js';
|
|
5
7
|
import { registerHowTo } from './how-to.js';
|
|
6
8
|
import { getRegisteredToolGroups, registerAllTools } from '../server.js';
|
|
7
9
|
import { rankTools, scoreTool, TOOL_ALIASES, tokenize } from './tool-search.js';
|
|
@@ -80,7 +82,14 @@ function unknownArgsMessage(name, inputSchema, unknown) {
|
|
|
80
82
|
export function registerGatewayTools(server, options) {
|
|
81
83
|
registerHowTo(server, options);
|
|
82
84
|
let catalogPromise = null;
|
|
83
|
-
const getCatalog = () =>
|
|
85
|
+
const getCatalog = async () => {
|
|
86
|
+
const catalog = await (catalogPromise ??= buildCatalog(options));
|
|
87
|
+
// Filter on each request, not while caching: grants must never share catalog visibility.
|
|
88
|
+
if (requestContext()?.allowedProjectIds == null)
|
|
89
|
+
return catalog;
|
|
90
|
+
const entries = catalog.entries.filter(entry => !LIMITED_GRANT_DENIED_TOOLS.has(entry.name));
|
|
91
|
+
return { ...catalog, entries, byName: new Map(entries.map(entry => [entry.name, entry])) };
|
|
92
|
+
};
|
|
84
93
|
server.registerTool('search_tools', {
|
|
85
94
|
title: 'Search Tools',
|
|
86
95
|
description: 'Search the permitted Sendinel MCP tool catalog by keyword and/or group. Returns name, group, and description. Optional limit/offset page ranked search results or explicit browsing. Call describe_tool for the full input schema before invoke_tool.',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sendinel/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.183",
|
|
4
4
|
"description": "AI-controlled email operations control plane for campaigns, contacts, segments, analytics, and multi-provider sending via MCP.",
|
|
5
5
|
"mcpName": "ai.sendinel/mcp-server",
|
|
6
6
|
"type": "module",
|