MCP servers | StateWeave Docs
Your sandbox
MCP servers
Slack, Gmail, Salesforce, Shopify, WhatsApp, Microsoft Teams, Stripe, HubSpot and GitHub serve the same MCP servers as the real vendors, at the app's address and with the persona's token. An agent that works through MCP tools needs only a config file.
Looking for an MCP server for your coding agent? The servers on this page are the apps', for the agent you are testing. Your coding agent works with StateWeave itself through sw and two skills, not through an MCP server: see From your coding agent .
Apps with an MCP server
| App | Server | Token | Example tools |
|---|---|---|---|
| Slack | Slack's MCP server | user: | slack_send_message , slack_add_reaction , slack_create_conversation |
| Gmail | Gmail's MCP server | user: | search_threads , get_thread , create_draft |
| Salesforce | Hosted MCP server sobject-all | mcp: | soqlQuery , find , getObjectSchema |
| Shopify | Shopify's MCP server | setup: | create-collection , add-to-collection , bulk-update-product-status |
| Meta's WhatsApp Business Tools MCP server (beta) | user: | whatsapp_biz_list_templates , whatsapp_biz_send_message , whatsapp_biz_phone_numbers | |
| Microsoft Teams | Microsoft's Teams MCP server (Agent 365, preview), mcp_TeamsServer | mcp: | ListChats , SendMessageToChannel , ReplyToChannelMessage |
| Stripe | Stripe's MCP server | mcp: | stripe_api_search , stripe_api_read , stripe_api_write |
| HubSpot | HubSpot's remote MCP server | mcp: | search_crm_objects , get_crm_objects , search_owners |
| GitHub | GitHub's MCP server, github-mcp-server 2.1.0 | user: | issue_write , list_issues , create_pull_request |
The token column is the credential kind the server takes (see Credential labels ). A run's mcp field for the app already carries it in its headers.
Google Calendar, Google Sheets, Google Drive and Zendesk have no MCP server in StateWeave: an agent reaches them through their APIs (see Apps and credentials ). Their mcp field is null , and they are left out of the MCP config.
WhatsApp's server takes a person's token only, not a system user's. It lists Meta's 18 tools; three account-setup ones ( whatsapp_biz_configure_payments , whatsapp_biz_verify_business , whatsapp_biz_system_user_token ) are not served, and a call to one answers an error result, twin_not_implemented .
Microsoft Teams' server lists Microsoft's 36 tools. Eight are not served yet, and a call to one answers the same twin_not_implemented error result: SearchTeamsMessages , SearchTeamMessagesQueryParameters , GetUserPresence , ListChannelFiles , SendMessageToSelf , SendFileToUser , SendFileToChat and SendFileToChannel .
Stripe's server lists the 9 tools Stripe's live server listed. Four are not served, and a call to one answers the same twin_not_implemented error result: search_stripe_documentation , stripe_implementation_planner , stripe_analytics and send_stripe_feedback .
HubSpot's server lists HubSpot's 36 tools, and its mcp_anthropic address the 36 that Claude's connector directory lists. Six read tools are served: get_user_details , search_crm_objects , get_crm_objects , search_properties , get_properties and search_owners . A call to any other, manage_crm_objects among them, answers an error result, so an agent writes to HubSpot through its API. The server takes the mcp: token, not the Service Key. It follows HubSpot's documentation and has not been compared with HubSpot's live server.
GitHub's server lists the 46 tools of github-mcp-server 2.1.0's default toolsets (context, Copilot, issues, pull requests, repositories and users) and serves 42. A call to the other four, assign_copilot_to_issue , request_copilot_review , ui_get and list_issue_fields , answers a twin_not_implemented error result, as does one that sets organization issue fields ( issue_fields in issue_write , field_filters in list_issues ). The server has one address, /mcp , with no toolset, read-only or feature-flag options, and takes the persona's user: token. It follows the source of github-mcp-server 2.1.0 and has not been compared with GitHub's own server.
The tools are 2.1.0's defaults: issues are created and changed with issue_write and read with issue_read , and a tool behind a feature flag, such as create_issue ( issues_granular ), is an unknown tool. Clients work with it on MCP protocol 2025-11-25. It does not answer server/discover , so a client that tries 2026-07-28 first, as Claude Code and the MCP Python SDK 2.3.0's Client do, falls back to 2025-11-25. A client pinned to 2026-07-28 gets an error result from every tool but get_me , get_teams , get_team_members , get_commit , list_branches and list_tags . delete_repository is listed only to such a client when it supports form elicitation, and a call to it answers an error result.
The MCP config
Every run comes with its MCP servers in the format Claude Code and most MCP clients read. The server names are the app names, and each server is Streamable HTTP with the token in its headers:
mcp.json
{
"mcpServers"
: {
"slack"
: {
"type"
:
"http"
,
"url"
:
"https://t-7d1kq4.app.stateweave.net/mcp"
,
"headers"
: {
"Authorization"
:
"Bearer xoxp-…"
} },
"gmail"
: {
"type"
:
"http"
,
"url"
:
"https://t-m3x9ce.app.stateweave.net/mcp/v1"
,
"headers"
: {
"Authorization"
:
"Bearer ya29.…"
} } } }
Ways to get it:
sw run writes it to a file and passes the path in STATEWEAVE_MCP_CONFIG .
run.mcp_servers() in Python returns the inner {app: {...}} object, for a test run ( stateweave.start() ) or a twin run ( Client().open_twins() ).
sw mcp config RUN prints it for a run that is still going ( sw mcp-config RUN works too). For a run that has ended it says run r-… has ended (…): its apps are gone .
In edit mode, sw sandbox connect gives each app's mcp as {"url", "headers"} and its address as STATEWEAVE_<APP>_MCP_URL . While the sandbox's apps are running, its Fill tab shows a ready claude mcp add line for each app with a server but Microsoft Teams, under Addresses and tokens .
Claude Code
Run Claude Code headless with the run's servers as its only MCP servers:
Shell
sw
run t-0e4243
--agent
claude-code -- sh
-c
'claude -p "$STATEWEAVE_PROMPT" \ --mcp-config "$STATEWEAVE_MCP_CONFIG" --strict-mcp-config \ --allowedTools "mcp__slack__*"'
--strict-mcp-config keeps your own MCP servers out of the run.
In print mode ( -p ) Claude Code refuses a tool nobody approved, so --allowedTools must name the servers of every app the test uses, as mcp__<app>__* .
This script works out the apps from the config by itself. For an answer task, it asks for the answer in the task's format and hands Claude Code's final reply in. It also writes Claude Code's whole session to STATEWEAVE_TRANSCRIPT_FILE as stream-json . sw run hands that in with the run, and the run's page keeps it as the agent's transcript. Save the script as claude_code.sh :
claude_code.sh
#!/bin/sh
# An agent for `sw run`: Claude Code, headless, with the run's apps as its only MCP servers and every tool of
# theirs allowed (print mode denies a tool call nobody approved). Its whole session (messages, tool calls, results)
# is written to $STATEWEAVE_TRANSCRIPT_FILE as stream-json, which `sw run` hands in with the run, so whoever judges
# it sees Claude's reasoning as well as its API calls. For an answer task, Claude Code's final result is handed in as
# the answer.
#
# sw run t-3fa2c1 --agent claude-code --transcript-format claude-code-stream-json -- sh claude_code.sh
#
# Flags as documented in Claude Code's CLI reference, headless and permissions pages (code.claude.com/docs);
# --output-format stream-json needs --verbose in print mode.
set
-ef
# -f: the mcp__<app>__* patterns stay patterns
servers=$(python3
-c
'import json, os; print(" ".join(f"mcp__{a}__*" for a in json.load(open(os.environ["STATEWEAVE_MCP_CONFIG"]))["mcpServers"]))'
) prompt=
"$STATEWEAVE_PROMPT"
if [
"$STATEWEAVE_KIND"
=
"answer"
]; then prompt=
"$prompt When you are done, reply with only this JSON and nothing else: $STATEWEAVE_ANSWER_FORMAT"
fi transcript=
"${STATEWEAVE_TRANSCRIPT_FILE:-$(mktemp)}"
claude
-p
"$prompt"
--mcp-config
"$STATEWEAVE_MCP_CONFIG"
--strict-mcp-config
--allowedTools
$servers
\
--output-format
stream-json
--verbose
>
"$transcript"
if [
"$STATEWEAVE_KIND"
=
"answer"
]; then
# the session's last "result" message holds Claude's final reply
python3
-c
' import json, sys result = "" for line in open(sys.argv[1], encoding="utf-8"): try: message = json.loads(line) except ValueError: continue if isinstance(message, dict) and message.get("type") == "result": result = message.get("result") or "" sys.stdout.write(result)'
"$transcript"
>
"$STATEWEAVE_ANSWER_FILE"
fi
Shell
sw
run t-bde537
--agent
claude-code
--transcript-format
claude-code-stream-json -- sh claude_code.sh
The Claude Agent SDK's mcp_servers option takes the same objects as run.mcp_servers() returns.
Any MCP client
With the official MCP Python SDK (version 2), connect over Streamable HTTP with the run's headers:
Python
import
asyncio
import
httpx2
from
mcp
import
ClientSession
from
mcp.client.streamable_http
import
streamable_http_client
async
def
list_tools
(server):
async
with
httpx2.
AsyncClient
(headers=server[
"headers"
])
as
http:
async
with
streamable_http_client
(server[
"url"
], http_client=http)
as
streams:
async
with
ClientSession
(streams[
0
], streams[
1
])
as
session:
await
session.
initialize
()
return
[tool.name
for
tool
in
(
await
session.
list_tools
()).tools]
for
name, server
in
run.
mcp_servers
().
items
():
(name, asyncio.
run
(
list_tools
(server)))
Calls through MCP count. A tool call changes the same app an API call does, and it is recorded on the run with your agent's other calls. Checks that read the apps through their APIs see its effect the same way. A calls check sees it as a request to the MCP server's address, not to the API path the tool uses.