Knock MCP server for AI agents

Live

OAUTH 2.1

NOTIFICATIONS

Communication

Knock MCP gives your agent authenticated access to your Knock account through Knock's own MCP server: query the Management API, work with users, objects, and tenants, read messages and delivery logs, and start Knock's hosted agent.

  • Per-user credentials: each call uses the actual user's token, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
Knock MCP
agent · Acme Q3
Run
Why did message msg_123 fail to deliver?
S
knockmcp_get_message_delivery_logs
262ms
Notifications agent
Pulled the delivery logs for message msg_123 so the failed attempt and its response can be read.
Sources: Knock message delivery logs, 1 message
knockmcp
1 message
18:29
Message Claude...

Tools your notification agent reaches for on Knock MCP, scoped per user.

CALL ANY TOOL
25 tools for notification in Knock MCP: search and run Management API calls, manage users, objects, and tenants, read messages, events, and delivery logs, and start Knock's hosted agent.
knockmcp_execute_mapi_read
Read execute mapi
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 }; 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 }; }
Parameters
Name
Type
Required
Description
code
string
Required
JavaScript async arrow function to execute
context
string
Required
Describe the user's underlying goal in one sentence, rather than the tool being called.
llm_model
string
Required
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_id
string
Optional
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_write
Write execute mapi
knockmcp_get_knock_agent
Get knock agent
knockmcp_get_message
Get message
knockmcp_get_message_content
Get message content
knockmcp_get_message_delivery_logs
Get message delivery logs
knockmcp_get_message_events
Get message events
knockmcp_get_more_tools
Get more tools
knockmcp_get_object
Get object
knockmcp_get_tenant
Get tenant
knockmcp_get_user
Get user
knockmcp_get_user_messages
Get user messages
knockmcp_get_user_preferences
Get user preferences
knockmcp_list_environments
List environments
knockmcp_list_objects
List objects
knockmcp_list_tenants
List tenants
knockmcp_search_documentation
Search documentation
knockmcp_search_mapi
Search mapi
knockmcp_set_user_preferences
Set user preferences
knockmcp_start_knock_agent
Start knock agent
knockmcp_subscribe_users_to_object
Subscribe users to object
knockmcp_unsubscribe_users_from_object
Unsubscribe users from object
knockmcp_upsert_object
Upsert object
knockmcp_upsert_tenant
Upsert tenant
knockmcp_upsert_user
Upsert user
Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// Knock tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["knockmcp"], toolNames: [
    "knockmcp_get_message",
    "knockmcp_get_message_delivery_logs",
    "knockmcp_get_message_events"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Get this message, then show its delivery logs and event timeline" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["knockmcp"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Get this message, then show its delivery logs and event timeline" }],
  tools,
});

// Execute the tool call with the user's vaulted Knock OAuth token
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["knockmcp"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Get this message, then show its delivery logs and event timeline" }],
  tools,
});

// Tool call runs with the user's vaulted Knock OAuth token
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["knockmcp"] }, pageSize: 100,
});

const agent = new Agent({
  name: "notifications_agent",
  model: "gemini-2.5-pro",
  instruction: "Knock tools scoped to this user",
  tools,
});

await agent.run("Get this message, then show its delivery logs and event timeline");
Try these prompts
Copy any prompt into your agent. Each maps directly to a Knock MCP tool. Click to copy, paste into your agent, done.
Messages
Copy the prompt
Copied
Get the delivery logs for this message.
Copy the prompt
Copied
Show the event timeline for this message.
Copy the prompt
Copied
List the messages user_123 received.
Users and objects
Copy the prompt
Copied
Get the profile for user_123.
Copy the prompt
Copied
Upsert the tenant acme with this name.
Copy the prompt
Copied
Subscribe these users to the project object in the projects collection.
Management API and agent
Copy the prompt
Copied
List my Knock environments.
Copy the prompt
Copied
Search the Management API for workflow endpoints.
Copy the prompt
Copied
Ask Knock's hosted agent to draft a new workflow.
SEE HOW AUTH WORKS
Each user signs in to Knock once; Scalekit stores and refreshes their tokens. Credentials stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
Knock MCP
once. We tie it to their identity and the access they approved, with no shared bot account and no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
Knock MCP
credential lives in a vault scoped to them. User A's data is never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tenants:
isolated
3
Resolve
When your agent calls a
Knock MCP
tool, we fetch the right credential server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
Knock MCP
tool call is logged: who triggered it, which tool ran, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other communication and developer tools connectors.
Engineering Teams
DevOps assistant agent
Polls GitHub for failing checks and stale PRs, opens Linear issues for the ones that need work, and posts a daily digest to Slack. It acts as the engineer, not a shared service account.
Test other agents
See the same per-user auth pattern across other communication and developer tools connectors.
ENGINEERING
DevOps assistant agent
Poll GitHub for failing checks and stale pull requests, open Linear issues for the ones that need work, and digest to Slack.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared Knock token looks fine in a demo. In production every user change and Management API call looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared token
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
Knock today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access Knock as the user or through a shared service account?
As the user. Each user signs in to Knock once, and Scalekit stores and refreshes their tokens. Every user change and Management API call in your audit trail is attributed to that user, not a shared service account.
Where is the Knock OAuth token stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. Refresh is automatic. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in Knock?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the get and list tools and knockmcp_execute_mapi_read without knockmcp_execute_mapi_write, which runs POST, PUT, PATCH, and DELETE calls against the Management API, or knockmcp_upsert_user. Scalekit also enforces scope checks before every API call.
What happens when a user revokes Knock access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
Can the agent change Knock workflows and templates?
Yes. knockmcp_start_knock_agent uses Knock's hosted agent to create and update workflows, broadcasts, guides, email layouts, partials, and translations, and knockmcp_get_knock_agent polls its session. knockmcp_search_mapi and knockmcp_execute_mapi_write cover specific Management API calls.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""knockmcp"": {
""url"": ""https://mcp.scalekit.com/knockmcp"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.knockmcp]
url = ""https://mcp.scalekit.com/knockmcp""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""knockmcp"": {
""url"": ""https://mcp.scalekit.com/knockmcp"",
""type"": ""http""
}
}
}