Skip to main content
Glama
Infisical

Infisical MCP Server

Official
by Infisical

invite-members-to-project

Add users to an Infisical project by specifying emails or usernames, assigning roles, and linking them to a specific project ID.

Instructions

Invite members to a project in Infisical

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailsNoThe emails of the members to invite. Either usernames or emails must be provided.
projectIdYesThe ID of the project to invite members to (required)
roleSlugsNoThe role slugs of the members to invite. If not provided, the default role 'member' will be used. Ask the user to confirm the role they want to use if not explicitly specified.
usernamesNoThe usernames of the members to invite. Either usernames or emails must be provided.

Implementation Reference

  • Handler for the 'invite-members-to-project' tool: validates arguments using Zod schema, invokes infisicalSdk.projects().inviteMembers() with projectId, emails, usernames, and roleSlugs, and returns the result as text content.
    if (name === AvailableTools.InviteMembersToProject) { const data = inviteMembersToProjectSchema.zod.parse(args); const projectMemberships = await infisicalSdk.projects().inviteMembers({ projectId: data.projectId, emails: data.emails, usernames: data.usernames, roleSlugs: data.roleSlugs }); return { content: [ { type: "text", text: `Members successfully invited to project: ${JSON.stringify(projectMemberships, null, 3)}` } ] }; }
  • Schema definition including Zod validator and JSON schema for tool inputs: requires projectId, optional arrays for emails, usernames, and roleSlugs.
    const inviteMembersToProjectSchema = { zod: z.object({ projectId: z.string(), emails: z.array(z.string()).optional(), usernames: z.array(z.string()).optional(), roleSlugs: z.array(z.string()).optional() }), capability: { name: AvailableTools.InviteMembersToProject, description: "Invite members to a project in Infisical", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project to invite members to (required)" }, emails: { type: "array", description: "The emails of the members to invite. Either usernames or emails must be provided." }, usernames: { type: "array", description: "The usernames of the members to invite. Either usernames or emails must be provided." }, roleSlugs: { type: "array", description: "The role slugs of the members to invite. If not provided, the default role 'member' will be used. Ask the user to confirm the role they want to use if not explicitly specified." } }, required: ["projectId"] } } };
  • src/index.ts:452-467 (registration)
    Registration of all tools including 'invite-members-to-project' via the ListToolsRequestSchema handler, exposing the capability.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ createSecretSchema.capability, deleteSecretSchema.capability, updateSecretSchema.capability, listSecretsSchema.capability, getSecretSchema.capability, createProjectSchema.capability, createEnvironmentSchema.capability, createFolderSchema.capability, inviteMembersToProjectSchema.capability, listProjectsSchema.capability ] }; });
  • src/index.ts:57-68 (registration)
    Enum defining the tool name constant 'InviteMembersToProject = "invite-members-to-project"' used throughout.
    enum AvailableTools { CreateSecret = "create-secret", DeleteSecret = "delete-secret", UpdateSecret = "update-secret", ListSecrets = "list-secrets", GetSecret = "get-secret", CreateProject = "create-project", CreateEnvironment = "create-environment", CreateFolder = "create-folder", InviteMembersToProject = "invite-members-to-project", ListProjects = "list-projects" }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Infisical/infisical-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server