stdio, you can run the server as a persistent HTTP service. This enables multi-user scenarios and remote deployment.
Transport Types
Stateless Mode
For Kubernetes deployments or environments where session state should be ephemeral, use the--stateless flag with streamable-http transport:
The
--stateless flag is only supported with streamable-http transport. Using it with stdio or sse will result in an error.Basic Setup
- SSE Transport
- Streamable-HTTP
TLS (HTTPS Listener)
By default the HTTP transports listen in plaintext, and TLS is typically terminated by a reverse proxy or ingress in front of the server. For end-to-end TLS — for example when policy requires encryption all the way to the pod — the server can terminate TLS itself. Provide a certificate and private key (PEM) and the listener switches to HTTPS:Remember to update client configuration to
https:// URLs once the listener
serves TLS — the examples elsewhere on this page use http://.Certificate and key must be provided together — setting only one aborts startup.
These options configure the server’s own listener certificate; they are
unrelated to the client-side
*_CLIENT_CERT mTLS options used when connecting
to Atlassian. The key must be unencrypted, and the certificate is loaded once at
startup — rotation requires a restart. Under stdio there is no network
listener, so the options are ignored with a warning.Host and Origin checks
When header-less requests are served with the operator’s global credentials (ALLOW_GLOBAL_CRED_FALLBACK=true or IGNORE_HEADER_AUTH=true), the server
checks two headers. A request with an Origin header gets 403 unless the
origin is on this machine (localhost, 127.0.0.1, [::1]) or listed in
FASTMCP_HTTP_ALLOWED_ORIGINS, whatever address it arrives on. Requests
without Origin, such as MCP clients and proxies, pass. A request that
arrives on a loopback address also gets 421 unless its Host is local.
This stops a web page in a browser from acting with the credentials the
listener holds. Other deployments keep FastMCP’s default, which does not
check these headers.
A reverse proxy on the same host that forwards to
127.0.0.1 and passes the
public hostname in Host needs that hostname in FASTMCP_HTTP_ALLOWED_HOSTS.
Server-side file paths
Some tools accept a path on the server’s filesystem:confluence_upload_attachment(s)
and jira_update_issue (attachments) read a file and upload it, and
confluence_create_page / confluence_update_page read content_file. Over HTTP the
caller is remote, so these paths are confined to one directory:
MCP_ATLASSIAN_FILES_DIRwhen set.- Otherwise
~/.mcp-atlassian/filesfor the user running the server (created on start). The process working directory is not used onsse/streamable-http, because it depends on how the server was started (/for a systemd system unit,$HOMEfor a user unit or a shell).
MCP_ATLASSIAN_FILES_DIR is a
filesystem root or a home directory. Put only files you intend callers to upload in this
directory. In multi-user deployments every caller shares it, so prefer the base64
content inputs and leave the directory empty when you can.
On stdio (a local client) the boundary stays the working directory unless
MCP_ATLASSIAN_FILES_DIR is set, so existing local setups keep working.
Many desktop clients start the server in your home directory or in /. The server
then logs a warning at start, because a tool call, possibly steered by instructions in
a page or issue it read, can upload any file you can read. Set
MCP_ATLASSIAN_FILES_DIR to a dedicated directory to narrow it.
systemd
Set both the working directory and the files directory explicitly. WithoutWorkingDirectory=, a system unit starts in / (see systemd.exec(5)).
.env files outside both directories.
Docker
The official image works from/app. To upload files from the host, mount a dedicated
directory and point the variable at it:
Multi-User Authentication
Both transport types support per-request authentication where each user provides their own credentials.Authentication Methods
- Cloud (OAuth)
- Server/DC (PAT)
Restrict Request-Supplied URLs
Over HTTP, clients can name their own instance with theX-Atlassian-Jira-Url / X-Atlassian-Confluence-Url headers (header-based PAT).
Set MCP_ALLOWED_URL_DOMAINS to the domains your users connect to:
The 120 seconds include the time a call waits for a free thread, and the call
stops at that limit even when the upstream closes the connection after its
response. Add your users’ self-hosted domains to the allowlist so their calls
use the larger pool without that time limit.
Address checks of request-supplied URLs have 8 threads of their own (4 for
allowlisted and Atlassian Cloud hosts, 4 for other hosts). DNS lookups made
during a call have 8 more. Only calls with the 120-second limit (calls to
hosts named only in a request header) use those 8; every other call looks up
its address in its own thread, whatever host it connects to. In total the server runs at most 56 threads for calls,
checks and lookups (32 + 8 + 8 + 8), plus
JIRA_FETCHER_MAX_WORKERS for each
site in the first row of the table.
While the address check threads are all busy, a request gets 503 with
Retry-After; retry it shortly. In external auth mode the URL header is
checked when a tool runs, so the same case gives a tool error with the same
text as the 503 body: Server busy checking request URLs; retry shortly.
Retry the tool call.
A streamable-http or SSE session can be used only with the credential that
opened it. A request with other credentials on that session gets
404 Session not found, which tells MCP clients to open a new session. With
header credentials this includes a new Bearer token after a refresh. With the
built-in OAuth proxy a refreshed login keeps its sessions.
Server Setup for Multi-User
1
Run OAuth Setup (if using OAuth)
2
Start HTTP Server
3
Configure Environment
OAuth Discovery + DCR for MCP Clients
WhenATLASSIAN_OAUTH_PROXY_ENABLE=true, the HTTP service exposes OAuth discovery
and DCR endpoints so MCP clients can onboard users through spec-aligned OAuth:
/.well-known/oauth-protected-resource/.well-known/oauth-authorization-serverPOST /registerGET /authorizePOST /token- callback route derived from
ATLASSIAN_OAUTH_REDIRECT_URI
/register and /authorize answer before any authentication. The proxy bounds
what they store: /authorize rejects a state or redirect_uri longer than
2048 characters, a code_challenge outside 43 to 128 characters, and a body
over 16 KiB. With the default storage, pending logins are kept in memory and
dropped after 15 minutes, so a restart cancels logins in progress. A
registration that never completes a login expires after 24 hours. A client that
has logged in keeps its registration for 90 days, renewed by every login or token
refresh. A removed client gets invalid_client and registers again. The default
file storage deletes expired records at start and, at most once an hour, when a
client registers. The number of registrations has no cap, only these lifetimes,
so put a request rate limit for /register and /authorize on your ingress or
reverse proxy.
Multi-Cloud Support
For multi-tenant applications where each user connects to their own Atlassian cloud instance:-
Enable minimal OAuth mode:
-
Users provide authentication via HTTP headers:
Authorization: Bearer <user_oauth_token>X-Atlassian-Cloud-Id: <user_cloud_id>
Python Example
- Requests without user-specific credentials are rejected unless
ALLOW_GLOBAL_CRED_FALLBACK=true - User tokens are isolated per request - no cross-tenant data leakage
- Falls back to global
ATLASSIAN_OAUTH_CLOUD_IDif header not provided