Plain MCP connector
OAuth 2.1/DCR Customer SupportProductivityConnect to Plain MCP. Manage customer support threads, labels, tenants, Help Center articles, and thread field schemas directly from your AI workflows.
Plain MCP connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret> -
Authorize and make your first call
Section titled “Authorize and make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'plainmcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Plain MCP:', link)process.stdout.write('Press Enter after authorizing...')await new Promise(r => process.stdin.once('data', r))// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'plainmcp_getcustomers',toolInput: {},})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "plainmcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Plain MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="plainmcp_getcustomers",connection_name=connection_name,identifier=identifier,)print(result)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Upsertthreadfield records — Set or update a custom field value on a thread
- Upserttenantfield records — Set or update a custom field value on a tenant
- Upserttenant records — Create or update a tenant by external ID or tenant ID
- Upserthelpcenterarticle records — Create or update a Help Center article by slug
- Upsertcustomer records — Create or update a customer by external ID, email, or customer ID
- Updatethreadtitle records — Update the title of an existing thread
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
plainmcp_addgeneratedreply
#
Add an AI-generated reply to a thread in Plain. 1 param
Add an AI-generated reply to a thread in Plain.
input string required No description. plainmcp_addlabels
#
Add one or more labels to a thread. 1 param
Add one or more labels to a thread.
input string required No description. plainmcp_archivelabeltype
#
Archive a label type so it can no longer be applied to threads. 1 param
Archive a label type so it can no longer be applied to threads.
input string required No description. plainmcp_assignthread
#
Assign a thread to a user or machine user. 1 param
Assign a thread to a user or machine user.
input string required No description. plainmcp_bulkupsertthreadfields
#
Create or update multiple thread field values in a single call. 1 param
Create or update multiple thread field values in a single call.
input string required No description. plainmcp_changethreadpriority
#
Update the priority of a thread. Valid priorities are 0 (urgent) through 3 (low). 1 param
Update the priority of a thread. Valid priorities are 0 (urgent) through 3 (low).
input string required No description. plainmcp_createlabeltype
#
Create a new label type that can be applied to threads. 1 param
Create a new label type that can be applied to threads.
input string required No description. plainmcp_createnote
#
Add an internal note to a thread, visible only to workspace members. 1 param
Add an internal note to a thread, visible only to workspace members.
input string required No description. plainmcp_createthread
#
Open a new support thread for an existing customer. Does not send a message — follow up with replyToThread if needed. 1 param
Open a new support thread for an existing customer. Does not send a message — follow up with replyToThread if needed.
input string required No description. plainmcp_createthreadfieldschema
#
Create a new custom thread field schema for the workspace. 1 param
Create a new custom thread field schema for the workspace.
input string required No description. plainmcp_deletethreadfieldschema
#
Permanently delete a custom thread field schema by key. 1 param
Permanently delete a custom thread field schema by key.
input string required No description. plainmcp_getcustomerdetails
#
Fetch a customer's full profile including email, assignment, company, and timestamps. 1 param
Fetch a customer's full profile including email, assignment, company, and timestamps.
customerId string required Plain customer ID (starts with c_). Get it from getCustomers or getCustomerDetails. plainmcp_getcustomers
#
Return a paginated list of all customers in the workspace. 2 params
Return a paginated list of all customers in the workspace.
cursor string optional Pagination cursor from the previous response's pageInfo.endCursor. first number optional Number of results to return per page. Defaults to 10. plainmcp_getcustomerthreads
#
Return all threads belonging to a specific customer, with optional status filtering. 5 params
Return all threads belonging to a specific customer, with optional status filtering.
customerId string required Plain customer ID (starts with c_). Get it from getCustomers or getCustomerDetails. cursor string optional Pagination cursor from the previous response's pageInfo.endCursor. first number optional Number of results to return per page. Defaults to 10. statusDetails array optional Filter by status detail. Accepted values: CREATED, NEW_REPLY, WAITING_FOR_CUSTOMER, IN_PROGRESS. statuses array optional Filter by thread status. Accepted values: TODO, SNOOZED, DONE. plainmcp_gethelpcenterarticle
#
Fetch a single Help Center article by its ID. 1 param
Fetch a single Help Center article by its ID.
id string required Unique identifier of the resource. plainmcp_gethelpcenterarticlebyslug
#
Fetch a Help Center article by its URL slug. 2 params
Fetch a Help Center article by its URL slug.
helpCenterId string required Plain Help Center ID (starts with hc_). Get it from getHelpCenters. slug string required URL slug of the Help Center article. plainmcp_gethelpcenterarticlegroups
#
Return all article groups for a Help Center. 3 params
Return all article groups for a Help Center.
helpCenterId string required Plain Help Center ID (starts with hc_). Get it from getHelpCenters. cursor string optional Pagination cursor from the previous response's pageInfo.endCursor. first number optional Number of results to return per page. Defaults to 10. plainmcp_gethelpcenterarticles
#
Return a paginated list of articles in a Help Center. 3 params
Return a paginated list of articles in a Help Center.
helpCenterId string required Plain Help Center ID (starts with hc_). Get it from getHelpCenters. cursor string optional Pagination cursor from the previous response's pageInfo.endCursor. first number optional Number of results to return per page. Defaults to 10. plainmcp_gethelpcenters
#
Return all Help Centers in the workspace. 2 params
Return all Help Centers in the workspace.
cursor string optional Pagination cursor from the previous response's pageInfo.endCursor. first number optional Number of results to return per page. Defaults to 10. plainmcp_getlabels
#
Return all label types available in the workspace. 2 params
Return all label types available in the workspace.
cursor string optional Pagination cursor from the previous response's pageInfo.endCursor. first number optional Number of results to return per page. Defaults to 10. plainmcp_getmyassignedthreads
#
Return threads assigned to the authenticated user, with optional status and priority filters. 6 params
Return threads assigned to the authenticated user, with optional status and priority filters.
userId string required Plain user ID (starts with u_). Get it from getUserByEmail or getMyUser. cursor string optional Pagination cursor from the previous response's pageInfo.endCursor. first number optional Number of results to return per page. Defaults to 10. priorities array optional Filter by priority: 0 = urgent, 1 = high, 2 = normal, 3 = low. statusDetails array optional Filter by status detail. Accepted values: CREATED, NEW_REPLY, WAITING_FOR_CUSTOMER, IN_PROGRESS. statuses array optional Filter by thread status. Accepted values: TODO, SNOOZED, DONE. plainmcp_getmyuser
#
Return the profile of the currently authenticated workspace user. 0 params
Return the profile of the currently authenticated workspace user.
plainmcp_getmyworkspace
#
Return details about the current workspace including its ID and name. 0 params
Return details about the current workspace including its ID and name.
plainmcp_gettenantdetails
#
Fetch full details for a specific tenant by its ID. 1 param
Fetch full details for a specific tenant by its ID.
tenantId string required Plain tenant ID (starts with t_). Get it from getCustomers. plainmcp_gettenants
#
Return a paginated list of all tenants in the workspace. 2 params
Return a paginated list of all tenants in the workspace.
cursor string optional Pagination cursor from the previous response's pageInfo.endCursor. first number optional Number of results to return per page. Defaults to 10. plainmcp_getthreaddetails
#
Fetch a thread's full details and timeline entries by thread ID. 3 params
Fetch a thread's full details and timeline entries by thread ID.
threadId string required Plain thread ID (starts with th_). Get it from getThreads or searchThreads. timelineCursor string optional Pagination cursor for the thread timeline from the previous pageInfo.endCursor. timelineFirst number optional Number of timeline entries to return per page. plainmcp_getthreadfieldschemas
#
Return all custom thread field schemas defined in the workspace. 2 params
Return all custom thread field schemas defined in the workspace.
cursor string optional Pagination cursor from the previous response's pageInfo.endCursor. first number optional Number of results to return per page. Defaults to 10. plainmcp_getthreads
#
Return threads with flexible filtering by status, priority, assignee, customer, labels, or date range. 11 params
Return threads with flexible filtering by status, priority, assignee, customer, labels, or date range.
assignedToUser array optional Filter threads assigned to these user IDs (start with u_). createdAtAfter string optional Return only threads created after this ISO 8601 timestamp. createdAtBefore string optional Return only threads created before this ISO 8601 timestamp. cursor string optional Pagination cursor from the previous response's pageInfo.endCursor. customerIds array optional Filter by these Plain customer IDs (start with c_). first number optional Number of results to return per page. Defaults to 10. isAssigned boolean optional Pass true for assigned threads, false for unassigned, or omit for all. labelTypeIds array optional Filter by these label type IDs (start with lt_). Get them from getLabels. priorities array optional Filter by priority: 0 = urgent, 1 = high, 2 = normal, 3 = low. statusDetails array optional Filter by status detail. Accepted values: CREATED, NEW_REPLY, WAITING_FOR_CUSTOMER, IN_PROGRESS. statuses array optional Filter by thread status. Accepted values: TODO, SNOOZED, DONE. plainmcp_getuserbyemail
#
Look up a workspace user by their email address. 1 param
Look up a workspace user by their email address.
email string required Email address of the user. plainmcp_markthreadasdone
#
Mark a thread as done, moving it out of the active queue. 1 param
Mark a thread as done, moving it out of the active queue.
input string required No description. plainmcp_markthreadastodo
#
Mark a thread as todo, returning it to the active queue. 1 param
Mark a thread as todo, returning it to the active queue.
input string required No description. plainmcp_movelabeltype
#
Reorder a label type within the workspace label list. 1 param
Reorder a label type within the workspace label list.
input string required No description. plainmcp_removelabels
#
Remove one or more labels from a thread. 1 param
Remove one or more labels from a thread.
input string required No description. plainmcp_reorderthreadfieldschemas
#
Change the display order of custom thread field schemas. 1 param
Change the display order of custom thread field schemas.
input string required No description. plainmcp_replytothread
#
Send a reply to the last message in a thread via email, Slack, or chat. 1 param
Send a reply to the last message in a thread via email, Slack, or chat.
input string required No description. plainmcp_searchcustomers
#
Search customers by name or email and return a paginated list of matches. 3 params
Search customers by name or email and return a paginated list of matches.
search string required Search query to filter results by text. cursor string optional Pagination cursor from the previous response's pageInfo.endCursor. first number optional Number of results to return per page. Defaults to 10. plainmcp_searchtenants
#
Search tenants by name and return matching results. 3 params
Search tenants by name and return matching results.
searchTerm string required Search text to filter tenant results. cursor string optional Pagination cursor from the previous response's pageInfo.endCursor. first number optional Number of results to return per page. Defaults to 10. plainmcp_searchthreads
#
Search threads by text with optional filters for status, priority, assignee, customer, and labels. 9 params
Search threads by text with optional filters for status, priority, assignee, customer, and labels.
searchQuery string required Search text to match against thread title, description, or messages. assignedToUser array optional Filter threads assigned to these user IDs (start with u_). cursor string optional Pagination cursor from the previous response's pageInfo.endCursor. customerIds array optional Filter by these Plain customer IDs (start with c_). first number optional Number of results to return per page. Defaults to 10. labelTypeIds array optional Filter by these label type IDs (start with lt_). Get them from getLabels. priorities array optional Filter by priority: 0 = urgent, 1 = high, 2 = normal, 3 = low. statusDetails array optional Filter by status detail. Accepted values: CREATED, NEW_REPLY, WAITING_FOR_CUSTOMER, IN_PROGRESS. statuses array optional Filter by thread status. Accepted values: TODO, SNOOZED, DONE. plainmcp_snoozethread
#
Snooze a thread until a specified date and time. 1 param
Snooze a thread until a specified date and time.
input string required No description. plainmcp_unarchivelabeltype
#
Restore an archived label type so it can be applied to threads again. 1 param
Restore an archived label type so it can be applied to threads again.
input string required No description. plainmcp_unassignthread
#
Remove the current assignee from a thread. 1 param
Remove the current assignee from a thread.
input string required No description. plainmcp_updatelabeltype
#
Update the name or color of an existing label type. 1 param
Update the name or color of an existing label type.
input string required No description. plainmcp_updatethreadfieldschema
#
Update the label or options of an existing thread field schema. 1 param
Update the label or options of an existing thread field schema.
input string required No description. plainmcp_updatethreadtitle
#
Update the title of an existing thread. 1 param
Update the title of an existing thread.
input string required No description. plainmcp_upsertcustomer
#
Create or update a customer by external ID, email, or customer ID. 1 param
Create or update a customer by external ID, email, or customer ID.
input string required No description. plainmcp_upserthelpcenterarticle
#
Create or update a Help Center article by slug. 1 param
Create or update a Help Center article by slug.
input string required No description. plainmcp_upserttenant
#
Create or update a tenant by external ID or tenant ID. 1 param
Create or update a tenant by external ID or tenant ID.
input string required No description. plainmcp_upserttenantfield
#
Set or update a custom field value on a tenant. 1 param
Set or update a custom field value on a tenant.
input string required No description. plainmcp_upsertthreadfield
#
Set or update a custom field value on a thread. 1 param
Set or update a custom field value on a thread.
input string required No description.