@sendinel/mcp-server 1.0.80 → 1.0.81

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/build/db.d.ts CHANGED
@@ -38,6 +38,7 @@ export declare function runWithClient<T>(client: any, fn: () => Promise<T>, requ
38
38
  actorType?: string;
39
39
  actorId?: string | null;
40
40
  oauthTokenId?: string | null;
41
+ invitationProjectIds?: string[] | null;
41
42
  authKind?: string | null;
42
43
  oauthClientId?: string | null;
43
44
  agentLabel?: string | null;
@@ -58,6 +59,7 @@ export declare function requestContext(): {
58
59
  actorType?: string;
59
60
  actorId?: string | null;
60
61
  oauthTokenId?: string | null;
62
+ invitationProjectIds?: string[] | null;
61
63
  authKind?: string | null;
62
64
  oauthClientId?: string | null;
63
65
  agentLabel?: string | null;
package/build/db.js CHANGED
@@ -69,6 +69,7 @@ export function requestContext() {
69
69
  actorType: ctx.actorType,
70
70
  actorId: ctx.actorId,
71
71
  oauthTokenId: ctx.oauthTokenId,
72
+ invitationProjectIds: ctx.invitationProjectIds,
72
73
  authKind: ctx.authKind,
73
74
  oauthClientId: ctx.oauthClientId,
74
75
  agentLabel: ctx.agentLabel,
@@ -365,6 +365,8 @@ export function registerAnalyticsTools(server) {
365
365
  return txt(`Error: ${ownedProjectsError.message}`);
366
366
  const byId = new Map();
367
367
  for (const project of [...(directProjects ?? []), ...(ownedProjects ?? [])]) {
368
+ if (ctx.invitationProjectIds != null && !ctx.invitationProjectIds.includes(project.id))
369
+ continue;
368
370
  byId.set(project.id, project);
369
371
  }
370
372
  const orgIds = Array.from(new Set(Array.from(byId.values()).map((project) => project.org_id).filter((id) => Boolean(id))));
@@ -450,6 +452,9 @@ export function registerAnalyticsTools(server) {
450
452
  return j({ error: accessError.message });
451
453
  if (!hasAccess)
452
454
  return j({ error: 'You do not have access to this project.', code: 'PROJECT_ACCESS_DENIED' });
455
+ if (ctx.invitationProjectIds != null && !ctx.invitationProjectIds.includes(project_id.toLowerCase())) {
456
+ return j({ error: 'You do not have access to this project.', code: 'PROJECT_ACCESS_DENIED' });
457
+ }
453
458
  const previousProjectId = getProjectId();
454
459
  const { error: updateError } = await adminDb()
455
460
  .from('mcp_oauth_tokens')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendinel/mcp-server",
3
- "version": "1.0.80",
3
+ "version": "1.0.81",
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",