The Knock MCP connector routes your AI agent's tool calls to Knock's own MCP server through Scalekit. Each user signs in to Knock once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 25 tools.
- Tools
- 25
- What they doRead · write · destructive
- 17 · 0 · 817 read0 write8 destructive
- Users sign in with
- OAuth
- OAuth app
- Your own Knock MCP server app
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet 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>Create the Knock MCP connection
In AgentKit > Connections, create a Knock MCP connection and copy its redirect URI. The name you give it is the
connection_nameyour code passes. See Configure connections.Register an OAuth app
Knock MCP server connections use your own OAuth app. Register one with Knock MCP server and add the redirect URI you copied.
Then enter the app's Client ID and Client Secret on the Knock MCP connection.
Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'knockmcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Knock MCP:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'knockmcp_get_more_tools',toolInput: { context: 'YOUR_CONTEXT', llm_model: 'claude-opus-4-8' },})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "knockmcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Knock MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={"context":"YOUR_CONTEXT","llm_model":"claude-opus-4-8"},tool_name="knockmcp_get_more_tools",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user signs in once. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolknockmcp_execute_mapi_readThis is the Management API: workflows, channels, templates, commits, and configuration.Read-onlyExecute MAPI (read)
This is the Management API: workflows, channels, templates, commits, and configuration. This session allows **read and write**. Use `execute_mapi_read` for `GET` and `execute_mapi_write` for `POST`/`PUT`/`PATCH`/`DELETE`. Use this tool (Code Mode: `execute_mapi_read`) for **read-only** `MAPI` calls at https://control.knock.app via `mapi.request({ method: "GET", ... })`. Use `search_mapi` first to find paths and request shapes. Auth headers are added on the host. Omit `environment` to use the account's default environment; callers can explicitly target another environment by adding it to `query`. For create/update/delete, use `execute_mapi_write` instead. **mapi.request() response shape:** does NOT return the API JSON body directly. It wraps it: ```json { "status": 200, "ok": true, "result": { /* actual API response body */ } } ``` Always read API fields from `res.result`, not from `res` (e.g. `res.result.entries`, not `res.entries`). When the user asks for the "exact result," return the full `mapi.request(...)` value unless they ask for a projection. Types: interface RequestOptions { method: "GET"; path: string; query?: Record<string, string | number | boolean | undefined>; headers?: Record<string, string>; } /** Wrapper returned by mapi.request() — the API body is in `result`, not at the top level. */ interface RequestResponse { status: number; ok: boolean; result: unknown; } declare const mapi: { request(options: RequestOptions): Promise<RequestResponse> }; Your code must be a single JavaScript async arrow function (no TypeScript). Example: async () => { const res = await mapi.request({ method: "GET", path: "/v1/workflows", }); return { status: res.status, entries: res.result.entries, page_info: res.result.page_info }; }
Inputs
codestringrequired- JavaScript async arrow function to execute
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
knockmcp_get_knock_agentPoll an in-progress Knock agent session and return a consolidated result (agent text, tool calls, modified resources, and a Status line).Read-onlyGet Knock agent status
Poll an in-progress Knock agent session and return a consolidated result (agent text, tool calls, modified resources, and a Status line). When to use: - After start_knock_agent returns Status: running. - When resuming after an MCP disconnect (you still have the session_id). How to use: 1. Call with the session_id from start_knock_agent (or a prior get_knock_agent). 2. Read the Status line in the tool result — you do not parse raw events; the server consolidates them for you. 3. If Status is running, wait a few seconds and call get_knock_agent again with the same session_id. 4. If Status is complete, the run succeeded — use the agent response. 5. If Status is error, the run failed — read the Error line. The Knock agent keeps running on the backend between your polls; each call is short-lived.
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
session_idstringrequired- Agent session ID from start_knock_agent
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
knockmcp_get_messageRetrieves a single message by its ID, including its current status and engagement statuses (e.g.Read-onlyGet message
Retrieves a single message by its ID, including its current status and engagement statuses (e.g. seen, read, interacted, link_clicked). Use this tool when you need to check the delivery status or engagement state of a specific message.
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
messageIdstringrequired- (string): The ID of the message to retrieve.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to retrieve the message from. Defaults to `development`.
knockmcp_get_message_contentRetrieves the complete contents of a single message, specified by the messageId.Read-onlyGet message content
Retrieves the complete contents of a single message, specified by the messageId. The message contents includes the rendered template that was sent to the recipient. Use this tool when you want to surface information about the emails, SMS, and push notifications that were sent to a user.
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
messageIdstringrequired- (string): The messageId of the message to retrieve.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to retrieve the message from. Defaults to `development`.
knockmcp_get_message_delivery_logsRetrieves the delivery logs for a specific message.Read-onlyGet message delivery logs
Retrieves the delivery logs for a specific message. Delivery logs contain details about each delivery attempt, including any errors that occurred. Use this tool when you need to debug why a message was not delivered or to inspect delivery attempt details.
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
messageIdstringrequired- (string): The ID of the message to retrieve delivery logs for.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to retrieve the delivery logs from. Defaults to `development`.
knockmcp_get_message_eventsRetrieves the event timeline for a specific message.Read-onlyGet message events
Retrieves the event timeline for a specific message. Events include delivery, bounce, open, click, and other engagement events. Use this tool when you need to see the full lifecycle of a message.
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
messageIdstringrequired- (string): The ID of the message to retrieve events for.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to retrieve the message events from. Defaults to `development`.
knockmcp_get_more_toolsCheck for additional tools whenever your task might benefit from specialized capabilities - even if existing tools could work as a fallback.Read-onlyGet More Tools
Check for additional tools whenever your task might benefit from specialized capabilities - even if existing tools could work as a fallback.
Inputs
contextstringrequired- A description of your goal and what kind of tool would help accomplish it.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
knockmcp_get_objectGet an object wihin a collection.Read-onlyGet object
Get an object wihin a collection. Returns information about the object including any custom properties. Use this tool when you need to retrieve an object to understand it's properties.
Inputs
collectionstringrequired- (string): The collection to get the object from.
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
objectIdstringrequired- (string): The ID of the object to get.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to get the object from. Defaults to `development`.
knockmcp_get_tenantRetrieves a tenant by their ID.Read-onlyGet tenant
Retrieves a tenant by their ID. Tenants in Knock are used to model organizations, teams, and other groups of users. They are a special type of object. Use this tool when you need to lookup the information about a tenant, including name, and if there are any custom properties set.
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
tenantIdstringrequired- (string): The ID of the tenant to retrieve.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to retrieve the tenant from. Defaults to `development`.
knockmcp_get_userRetrieves the complete user object for the given userId, including email, name, phone number, and any custom properties.Read-onlyGet user
Retrieves the complete user object for the given userId, including email, name, phone number, and any custom properties. Use this tool when you need to retrieve a user's complete profile. If the userId is not provided, it will use the userId from the config.
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to retrieve the user from. Defaults to `development`.
userIdstring- (string): The userId of the User to retrieve.
knockmcp_get_user_messagesRetrieves the messages that this user has received from the service.Read-onlyGet user messages
Retrieves the messages that this user has received from the service. Use this tool when you need information about the notifications that the user has received, including if the message has been read, seen, or interacted with. This will return a list of messages across all of the channels. If the userId is not provided, it will use the userId from the config.
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to retrieve the user messages from. Defaults to `development`.
userIdstring- (string): The userId of the User to retrieve messages for.
workflowRunIdstring- (string): The workflowRunId of the User to retrieve. Use this when you want to retrieve messages sent from a workflow trigger.
knockmcp_get_user_preferencesRetrieves the user's notification preferences for the given userId.Read-onlyGet user preferences
Retrieves the user's notification preferences for the given userId. If the userId is not provided, it will use the userId from the config.
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to retrieve the user preferences from. Defaults to `development`.
preferenceSetIdstring- (string): The preferenceSetId of the User to retrieve preferences for. Defaults to `default`.
userIdstring- (string): The userId of the User to retrieve Preferences for.
knockmcp_list_environmentsLists all environments available, returning the slug and name of each environment.Read-onlyList environments
Lists all environments available, returning the slug and name of each environment. Use this tool when you need to see what environments are available.
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
knockmcp_list_objectsList all objects in a single collection.Read-onlyList objects
List all objects in a single collection. Objects are used to model custom collections in Knock that are NOT users or tenants. Use this tool when you need to return a paginated list of objects in a single collection.
Inputs
collectionstringrequired- (string): The collection to list objects from.
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to list objects from. Defaults to `development`.
knockmcp_list_tenantsRetrieves a list of tenants.Read-onlyList tenants
Retrieves a list of tenants. Tenants in Knock are used to model organizations, teams, and other groups of users. They are a special type of object. Use this tool when you need to list all tenants in an environment.
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to retrieve the tenants from. Defaults to `development`.
knockmcp_search_documentationSearch the Knock documentation for a given queryRead-onlySearch documentation
Search the Knock documentation for a given query
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
querystringrequired- The query to search the documentation for
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
knockmcp_search_mapiThis is the Management API: workflows, channels, templates, commits, and configuration.Read-onlySearch MAPI OpenAPI
This is the Management API: workflows, channels, templates, commits, and configuration. This session allows **read and write**. Use `execute_mapi_read` for `GET` and `execute_mapi_write` for `POST`/`PUT`/`PATCH`/`DELETE`. Use `search_mapi` to explore or filter the OpenAPI spec for the **mapi** API before calling `execute_mapi_read` or `execute_mapi_write`. All $ref pointers are pre-resolved inline. Types: // OpenAPI 3.x spec with $refs resolved inline. interface OperationObject { summary?: string; description?: string; operationId?: string; tags?: string[]; parameters?: Array<{ name: string; in: "query" | "header" | "path" | "cookie"; required?: boolean; schema?: unknown; description?: string; }>; requestBody?: { required?: boolean; content?: Record<string, { schema?: unknown }> }; responses?: Record<string, { content?: Record<string, { schema?: unknown }> }>; } interface PathItem { get?: OperationObject; post?: OperationObject; put?: OperationObject; patch?: OperationObject; delete?: OperationObject; } interface OpenApiSpec { openapi: string; info: { title: string; version: string; description?: string }; paths: Record<string, PathItem>; servers?: Array<{ url: string }>; components?: Record<string, unknown>; tags?: Array<{ name: string; description?: string }>; } declare const mapi: { spec(): Promise<OpenApiSpec> }; Your code must be a single JavaScript async arrow function (no TypeScript) that returns a small, filtered result. Example: async () => { const spec = await mapi.spec(); return Object.keys(spec.paths).slice(0, 20); }
Inputs
codestringrequired- JavaScript async arrow function to search the spec
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
knockmcp_execute_mapi_writeThis is the Management API: workflows, channels, templates, commits, and configuration.DestructiveExecute MAPI (write)
This is the Management API: workflows, channels, templates, commits, and configuration. This session allows **read and write**. Use `execute_mapi_read` for `GET` and `execute_mapi_write` for `POST`/`PUT`/`PATCH`/`DELETE`. Use this tool (Code Mode: `execute_mapi_write`) for **write** `MAPI` calls at https://control.knock.app via `mapi.request({ method: "POST"|"PUT"|"PATCH"|"DELETE", ... })`. Use `search_mapi` first to find paths and request shapes. Auth headers are added on the host. Omit `environment` to use the account's default environment; callers can explicitly target another environment by adding it to `query`. For `GET`, use `execute_mapi_read` instead. **mapi.request() response shape:** does NOT return the API JSON body directly. It wraps it: ```json { "status": 200, "ok": true, "result": { /* actual API response body */ } } ``` Always read API fields from `res.result`, not from `res` (e.g. `res.result.entries`, not `res.entries`). When the user asks for the "exact result," return the full `mapi.request(...)` value unless they ask for a projection. Types: interface RequestOptions { method: "POST" | "PUT" | "PATCH" | "DELETE"; path: string; query?: Record<string, string | number | boolean | undefined>; body?: unknown; contentType?: string; rawBody?: boolean; headers?: Record<string, string>; } /** Wrapper returned by mapi.request() — the API body is in `result`, not at the top level. */ interface RequestResponse { status: number; ok: boolean; result: unknown; } declare const mapi: { request(options: RequestOptions): Promise<RequestResponse> }; Your code must be a single JavaScript async arrow function (no TypeScript). Example: async () => { const res = await mapi.request({ method: "PUT", path: "/v1/workflows/welcome", body: { name: "Welcome", steps: [] }, }); return { status: res.status, result: res.result }; }
Inputs
codestringrequired- JavaScript async arrow function to execute
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
knockmcp_set_user_preferencesOverwrites the user's notification preferences for the given userId.DestructiveSet user preferences
Overwrites the user's notification preferences for the given userId. Allows setting per-workflow, per-category, or per-channel notification preferences. Use this tool when you are asked to update a user's notification preferences. If the userId is not provided, it will use the userId from the config. Instructions: - You must ALWAYS provide a full preference set to this tool. - When setting per-workflow preferences, the key in the object should be the workflow key. - Workflow and category preferences should always have channel types underneath. - The channel types available to you are: email, sms, push, chat, and in_app_feed. - To turn OFF a preference, you must set it to false. - To turn ON a preference, you must set it to true. <examples> <example> <description> Update the user's preferences to turn off email notifications for the "welcome" workflow. </description> <input> { "workflows": { "welcome": { "channel_types": { "email": false } } } } </example> </examples>
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
categoriesobject- (object): The categories to update where the key is the category key, and the value of the object is an object that contains a `channel_types` key with a boolean value for each channel type.
channel_typesobject- (object): The channel types to update where the key is the channel type, and the value of the object is a boolean value.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to set the user preferences in. Defaults to `development`.
userIdstring- (string): The userId of the User to update preferences for.
workflowsobject- (object): The workflows to update where the key is the workflow key, and the value of the object is an object that contains a `channel_types` key with a boolean value for each channel type.
knockmcp_start_knock_agentUse Knock's hosted agent to create and update workflows, broadcasts, guides, email layouts, partials, and translations.DestructiveStart Knock agent
Use Knock's hosted agent to create and update workflows, broadcasts, guides, email layouts, partials, and translations. Prefer this tool when creating or updating those resources in a Knock account — the hosted agent has full account context and usually needs fewer tokens than calling the Management API directly. Use Management API code mode (`search_mapi` / `execute_mapi_read` / `execute_mapi_write`) when you need a specific API call, or when the user asks to use the API. For analytics questions, the Knock agent can return high-level message and engagement data. Those queries are not available through the Management API. Pass the user's request verbatim in prompt. Do not reinterpret or shorten it. This tool waits up to ~45 seconds, then returns a consolidated result. Read the Status line in the response: - Status: complete — the run finished; use the agent response and modified resources. - Status: error — the run failed; read the Error line. - Status: running — the run is still going; save the Session ID and poll with get_knock_agent until Status is complete or error. Agents can support follow-up runs by passing in the returned session_id. Use a follow-up run only for related edits or questions about a resource you just modified. Otherwise, use the Management API or start a new agent session.
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
promptstringrequired- The user's full request, passed verbatim to the Knock agent
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
session_idstring- Existing agent session ID for follow-up runs
knockmcp_subscribe_users_to_objectSubscribe a list of users to an object in a specific collection.DestructiveSubscribe users to object
Subscribe a list of users to an object in a specific collection. We use this to model lists of users, for pub-sub use cases. Use this tool when you need to subscribe one or more users to an object where you will then trigger workflows for those lists of users to send notifications to. Before using this tool, you should create the object in the collection using the createOrUpdateObject tool.
Inputs
collectionstringrequired- (string): The collection to subscribe the user to.
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
objectIdstringrequired- (string): The ID of the object to subscribe the user to.
userIdsarrayrequired- (array): The IDs of the users to subscribe to the object. If not provided, the current user will be subscribed.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to subscribe the user to. Defaults to `development`.
knockmcp_unsubscribe_users_from_objectUnsubscribe a list of users from an object in a specific collection.DestructiveUnsubscribe users from object
Unsubscribe a list of users from an object in a specific collection. We use this to model lists of users, for pub-sub use cases. Use this tool when you need to unsubscribe one or more users from an object where you will then trigger workflows for those lists of users to send notifications to.
Inputs
collectionstringrequired- (string): The collection to unsubscribe the user from.
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
objectIdstringrequired- (string): The ID of the object to unsubscribe the user from.
userIdsarrayrequired- (array): The IDs of the users to unsubscribe from the object.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to unsubscribe the user from. Defaults to `development`.
knockmcp_upsert_objectCreate or update an object in a specific collection.DestructiveCreate or update object
Create or update an object in a specific collection. Objects are used to model custom collections in Knock that are NOT users or tenants. If the object does not exist, it will be created. If the object exists, it will be updated with the provided properties. The update will always perform an upsert operation, so you do not need to provide the full properties each time. Use this tool when you need to create a new object, or update an existing custom-object. Custom objects can be used to subscribe users' to as lists, and also send non-user facing notifications to.
Inputs
collectionstringrequired- (string): The collection to create or update the object in.
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
objectIdstringrequired- (string): The ID of the object to create or update.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to create or update the object in. Defaults to `development`.
propertiesobject- (object): The properties to set on the object.
knockmcp_upsert_tenantCreates or updates a tenant using the properties provided.DestructiveCreate or update tenant
Creates or updates a tenant using the properties provided. Tenants in Knock are used to model organizations, teams, and other groups of users. They are a special type of object. Use this tool when you need to create a new tenant, or update an existing tenant's properties.
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
tenantIdstringrequired- (string): The ID of the tenant to update.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
environmentstring- (string): The environment to set the tenant in. Defaults to `development`.
namestring- (string): The name of the tenant.
propertiesobject- (object): The properties to set on the tenant.
knockmcp_upsert_userCreates a new user if they don't exist, or updates the user object for the given userId, including email, name, phone number, and any custom properties.DestructiveCreate or update user
Creates a new user if they don't exist, or updates the user object for the given userId, including email, name, phone number, and any custom properties. Use this tool when you need to update a user's profile. If the userId is not provided, it will use the userId from the config.
Inputs
contextstringrequired- Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_modelstringrequired- The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
conversation_idstring- Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
customPropertiesobject- (object): A dictionary of custom properties to update for the User.
emailstring- (string): The email of the User to update.
environmentstring- (string): The environment to create or update the user in. Defaults to `development`.
namestring- (string): The name of the User to update.
phoneNumberstring- (string): The phone number of the User to update.
userIdstring- (string): The userId of the User to update.
No tools match.