@sendinel/mcp-server 1.0.49 → 1.0.50

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.
@@ -983,6 +983,11 @@ export function registerDataTools(server) {
983
983
  scopes: z.array(z.string()).optional().default(['read']),
984
984
  },
985
985
  }, async ({ name, slug, scopes = ['read'] }) => {
986
+ // MCP API-key sessions can be unbound to a user, so they cannot prove an
987
+ // acting org role. Admin keys must be created through the dashboard.
988
+ if (scopes.includes('admin')) {
989
+ return j({ error: 'Admin-scope API keys must be created in the dashboard by an org owner or admin.' });
990
+ }
986
991
  const { secret, hash, prefix } = generateApiKey();
987
992
  const cleanSlug = slug?.trim().toLowerCase().replace(/[^a-z0-9-]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 50) || null;
988
993
  const { data, error } = await db().from('api_keys')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendinel/mcp-server",
3
- "version": "1.0.49",
3
+ "version": "1.0.50",
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",