Multi-Account Management
Overview
Section titled “Overview”JiraMCP supports multiple Jira/Confluence accounts simultaneously. You can configure accounts through environment variables, MCP configuration, or runtime tools.
Configuration Methods
Section titled “Configuration Methods”Method 1: Multiple MCP Server Instances
Section titled “Method 1: Multiple MCP Server Instances”Install the same package twice with different names and credentials:
{ "mcpServers": { "company-jira": { "command": "npx", "args": ["-y", "@bodywave/jira-mcp"], "env": { "JIRA_URL": "https://company.atlassian.net", "JIRA_API_KEY": "token-1" } }, "personal-jira": { "command": "npx", "args": ["-y", "@bodywave/jira-mcp"], "env": { "JIRA_URL": "https://personal.atlassian.net", "JIRA_API_KEY": "token-2" } } }}Method 2: Runtime Account Management
Section titled “Method 2: Runtime Account Management”Add and switch accounts using built-in tools:
"Add my work Jira account at https://work.atlassian.net""Switch to my personal Jira account""List all configured Jira accounts"Account Management Tools
Section titled “Account Management Tools”| Tool | Description |
|---|---|
jira_list_accounts | List all configured accounts with active indicator |
jira_add_account | Add a new Jira/Confluence account at runtime |
jira_remove_account | Remove a configured account |
jira_switch_account | Switch the active account |
jira_test_account | Test connection and verify credentials |
How It Works
Section titled “How It Works”The AccountManager class maintains a registry of accounts, each with:
- A unique ID (derived from the Atlassian domain or user-specified)
- Separate
JiraClientandConfluenceClientinstances - In-memory credential storage (never persisted to disk)
When you switch accounts, all subsequent API calls use the new account’s credentials.
Security
Section titled “Security”- Credentials are stored in-memory only — never written to disk
- Each account gets its own isolated client instances
- Account IDs must be lowercase alphanumeric with hyphens
- The default account is initialized from environment variables on startup