Wrap an existing MCP server
Least work. If you already run an MCP server, you can usually publish it as an app without changing any code. It takes about 15 minutes.
Build a Wassist-aware server
Deeper integration. Your tools know which business, agent and WhatsApp conversation each call comes from, and can read and send messages through the Wassist API.
How it fits together
- App: your MCP server URL, how it authenticates, and the name, icon and description installers see. Your organisation owns it.
- Installation: your app installed on your organisation, with its own agent and tool choices.
Before you start
Your MCP server must meet these requirements to work as an app:
You’ll also need a Wassist account with an organisation. You create and manage apps under Settings → Developers → Apps.
Path A: wrap an existing MCP server
Check that your server is compatible
Wassist finds your OAuth server at/.well-known/oauth-authorization-server on the same host as your MCP URL. For https://mcp.example.com/mcp it requests https://mcp.example.com/.well-known/oauth-authorization-server.
Choose who logs in
The auth mode (mcp.auth in the manifest, or Who logs in in the form) decides whose account your tools act on:
With
end_customer auth, nobody has logged in when a business installs your app, so Wassist can’t list your tools live. You must publish a tool catalogue before you can publish the app: either click Sync tools and log in with a test account, or list your tools under mcp.tools_preview in the manifest.Publish your app
1
Create the app
Go to Settings → Developers → Apps and click New app. Give it a name, which you can change later.Copy the client ID (
wapp_…) and client secret (wsec_…). The secret is only shown once. Path A doesn’t use them yet, but you’ll need them to verify calls or use the Wassist API.2
Point it at your server
Under Configuration, fill in the form: the name, developer name, description, icon URL, MCP server URL and Who logs in. You can switch to Manifest JSON and paste a manifest instead:Click Save draft.
3
Sync your tools
Click Sync tools. Wassist connects to your server and lists its tools. If your server needs a login, you’ll be sent through its OAuth flow first. Check that the tool names, titles and descriptions look right: installers see them, and the agent uses the descriptions to decide when to call each tool.
4
Publish
Click Publish v1. Your app is now installable on your organisation.
5
Install it on your organisation
Under Install, click Install on this organisation. Go through the flow: review, connect (for
installer auth), then choose agents and tools. Only owners and admins of the organisation can install apps.Then open one of those agents and test it in the dashboard. Ask it something that should trigger one of your tools. For end_customer apps, the agent sends you a login button in the test chat.Using a client you registered
If your OAuth server can’t register clients dynamically, register one for Wassist yourself:- Create an OAuth client in your provider that supports the authorization code flow with PKCE and refresh tokens.
-
Allow this redirect URI. The exact value is shown under Configuration → Advanced settings on your app page:
-
Put the client ID (and secret, if any) in Advanced settings, or under
mcp.oauthin the manifest:
scopes empty, Wassist asks for offline_access when your server supports it, so it can refresh tokens without asking anyone to log in again.
With dynamic registration and
end_customer auth, Wassist registers a separate OAuth client for each agent, named after the agent (for example “Acme Assistant powered by Wassist”). This means your login screen shows customers which business is asking. With a client you registered yourself, every agent shares that one client.Servers that use API keys
The alpha doesn’t let you store static headers such asAuthorization: Bearer <api key>. If your MCP server authenticates with API keys, put a thin proxy in front of it:
- Set the app’s auth to
noneand add asetup_url(your own settings page). - After installing, Wassist sends the installer to your setup page with a signed
installation_id. Ask them for their API key there and store it against that installation. - In the proxy, verify the context token on each
tools/call, look up the API key for itsinstallation_id, and forward the request to your real server with that key.
Path B: build a Wassist-aware server
Every tool call from Wassist carries context that a generic MCP server ignores: which organisation installed you, which agent is calling, and which session it’s in. A Wassist-aware server uses this context to:- tell which business (and which of your accounts) a call is for, without any OAuth;
- read the WhatsApp conversation behind the call, for example to get the customer’s name or phone number, or earlier messages;
- send messages into the conversation;
- use any other part of the Wassist API on behalf of the installing business.
Install the SDK
Read the context in your tools
For anything else,
wassist.client(ctx.installationId) returns a full Wassist API client acting as the installing organisation. With it you can use conversations, agents, sessions, simulations and the rest of the API.
Add a setup page (optional)
If you setsetup_url, Wassist sends installers there right after they install, and again whenever they click Configure on the installation. Use it to link the installation to an account in your system, or to collect settings.
A complete example
A runnable Express server with two tools, context verification, channel resolution and a setup page is in the SDK repository:examples/app-mcp-server. To try it:
https://<tunnel>/mcp in your app’s MCP server URL, set Who logs in to Nobody, then sync, publish and install as in Path A.
Reference
Wassist context on every tool call
Everytools/call from a Wassist agent includes these keys in params._meta:
Only trust these IDs after verifying the token. It’s signed with HS256 using your client secret, has
iss set to https://wassist.app and aud set to your client ID, and expires after ten minutes. verifyContextToken checks all of this for you. In other languages, any JWT library can verify it.
Calling the Wassist API without the SDK
An installed app can use the whole v1 API (https://backend.wassist.app/api/v1) as the installing organisation. Authenticate each request with your client credentials and the installation you’re acting for:
GET /sessions/{session_id}/. It returns:
{ "type": "web_builder", "simulationId": "…" } instead.
Manifest
Versions and updates
Edits go into a draft version. Publish makes the draft live for every installation straight away. Wassist lists each installation’s tools again after you publish, every day after that, and whenever an installer clicks Refresh tools. If a new version changes the MCP URL, auth mode or OAuth client, Wassist drops the existing tokens. Installations usinginstaller auth show Needs reconnecting until someone logs in again, and customers of end_customer apps are asked to log in again. Adding, removing or renaming tools doesn’t affect tokens.
When you rotate your client secret, the old secret keeps working for 24 hours. During the switch, pass it to the SDK as previousClientSecret so tokens signed with the old secret still verify.
Security
- Verify the context token on every call. Never trust the plain IDs in
_metaon their own. - Keep the client secret on your server. It signs context tokens and setup links, and together with an installation ID it gives full API access to that organisation.
- Client credentials only work for organisations that currently have your app installed. Uninstalling cuts off access immediately.
- Uninstalling also revokes every token Wassist holds for the installation. If your OAuth server advertises a
revocation_endpoint, Wassist calls it.
Alpha limitations
- Your own organisation only. Apps can only be installed on the organisation that owns them. There’s no way to share an app with other businesses yet.
- OAuth discovery on the MCP host only. Wassist doesn’t yet follow
/.well-known/oauth-protected-resourceto a separate authorization server. - No static headers or API keys. Use OAuth,
noneauth, or a proxy. - Streamable HTTP only. SSE isn’t supported.
- TypeScript SDK only. The context token and setup links are standard JWT and HMAC-SHA256, so you can verify them in any language, but only the TypeScript SDK has helpers.
Troubleshooting
"The MCP server doesn't support dynamic client registration"
"The MCP server doesn't support dynamic client registration"
Your OAuth metadata has no
registration_endpoint. Either enable dynamic client registration on your authorization server, or register a client for Wassist and add its client ID under Advanced settings."Couldn't discover OAuth metadata"
"Couldn't discover OAuth metadata"
Wassist couldn’t load
https://<your MCP host>/.well-known/oauth-authorization-server. Make sure it’s served on the same host as your MCP URL and returns JSON. If your server has no OAuth, set Who logs in to Nobody."Your server asked for a login, but the app's auth is set to none"
"Your server asked for a login, but the app's auth is set to none"
Your server answered
401 when Wassist listed its tools. Switch the app to installer or end_customer auth, or make your server accept calls without a token."End-customer apps need a tool catalogue before publishing"
"End-customer apps need a tool catalogue before publishing"
Click Sync tools and log in with a test account, or add
mcp.tools_preview to the manifest."SSE endpoints aren't supported"
"SSE endpoints aren't supported"
Your MCP URL ends in
/sse. Serve Streamable HTTP (usually at /mcp) and use that URL instead.The installation says Needs reconnecting
The installation says Needs reconnecting
For
installer auth, this means refreshing the token failed or your server answered 401. Wassist removes the app’s tools from agents until someone at the installing business clicks reconnect. Check that your server issues refresh tokens (ask for offline_access) and that tokens are long-lived enough.The agent never calls my tool
The agent never calls my tool
Check that the installer enabled the tool for that agent (on the installation page, or on the agent’s Capabilities page). Then improve the tool description: the agent uses it to decide when to call the tool, so say when to use it, not just what it does.
What’s next
API reference
Everything your app can do with the Wassist API.
Webhooks
React to conversation events outside of tool calls.