Add the VS Code server entry
Install uv so VS Code can launch uvx, then open the VS Code install link. The link provides the stdio transport, executable and arguments for the Python server. Set WA_MCP_CONFIG to the absolute path of the bridge configuration in the environment inherited by VS Code. Restart the editor so the server starts with that setting.
Install in VS CodeTo configure a workspace manually, create .vscode/mcp.json in that workspace. For an entry that applies across workspaces, run the command named MCP: Open User Configuration. VS Code expects a servers object and a transport type in the local entry. Preserve any servers that are already in the file when you add the example below.
{
"servers": {
"wa-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"wa-mcp-server==0.1.1",
"--with",
"wa-mcp-sdk[encryption,files]",
"wa-mcp",
"--config",
"CONFIG_FILE"
]
}
}
}
Check the path from agent mode
Replace CONFIG_FILE in the example with the file your bridge uses, including its full directory. A config inside the current project is unnecessary when the bridge lives elsewhere. The file tells the Python server where to read stored messages, which encryption settings to use and where it can reach the bridge API for live actions.
Open chat in agent mode and ask the assistant to run get_bridge_status. Check the database result and the bridge's connected and logged_in flags. A missing database can indicate the wrong directory or a bridge that has never started there. A missing API token can indicate that the editor is running as a different operating system user from the bridge.
Read a thread while working
Ask for a particular term in one conversation and include the date you care about. For example, find messages containing “invoice” in the last week, then show the surrounding messages for the latest match. This gives the assistant a bounded question and gives you a way to check its answer against the conversation. Sending can remain disabled throughout.
Search can include more than the message body. For a screenshot, first ask for text recognition on images in the relevant chat. For a voice note, transcribe the audio. Both operations attach derived text to the message, so a later lookup can retrieve it through the same conversation and time filters. Your MCP client receives the tool output it requests.
Keep remote credentials in secret storage
If the bridge runs on a server, configure VS Code with the HTTP transport and the HTTPS /mcp URL. Create a separate token for the editor. The documented remote configuration uses a password promptString input, then refers to that input from the Authorization header. VS Code asks for the value once and keeps it in its secret storage.
In the remote example below, replace the example domain with the host where you run the MCP service. Keep the input identifier consistent in both places. When VS Code prompts for the secret, give it the token created for this client by the MCP server. The bridge API token belongs to the local service on the host.
{
"inputs": [
{
"type": "promptString",
"id": "wa-mcp-token",
"description": "WA MCP token",
"password": true
}
],
"servers": {
"wa-mcp": {
"type": "http",
"url": "https://wa.example.com/mcp",
"headers": {
"Authorization": "Bearer ${input:wa-mcp-token}"
}
}
}
}
The local and hosted configurations solve different deployment problems. The local process needs access to the bridge's configuration, database and encryption key as the same user. A VS Code client calling the hosted endpoint needs the endpoint address and a credential. The hosted Python process handles access to the message database on that machine.
Questions
Can VS Code use WhatsApp MCP across workspaces?
Yes. Use the MCP: Open User Configuration command for a user-wide entry. A .vscode/mcp.json file scopes the entry to one workspace.
Where do I look if a tool is missing?
Check tool_modules_failed in get_bridge_status for optional modules that could not load. If there are no tools at all, test uvx in a terminal and verify the config path before checking the editor's MCP log.
Can stored history be read when the bridge stops?
Database-only tools can still answer from messages already on disk. Start the bridge for incoming history, remote media downloads and actions that require a live WhatsApp connection.
Project documentation · mcp-clients.md