Skip to content

Architecture

JiraMCP is built as a single-process MCP server that communicates with AI agents via stdio transport. It consists of 9 TypeScript source files totaling 8,313 lines of code.

AI Agent (Claude, etc.)
|
| MCP Protocol (stdio)
|
MCP Server (index.ts - 3,936 lines)
|
|-- AccountManager (account-manager.ts - 287 lines)
| |-- JiraClient (jira-client.ts - 1,948 lines)
| |-- ConfluenceClient (confluence-client.ts - 663 lines)
|
|-- RateLimiter (rate-limiter.ts - 351 lines)
|-- OperationVerifier (operation-verifier.ts - 350 lines)
|-- Logger (logger.ts - 408 lines)
|-- Types (types.ts + confluence-types.ts - 370 lines)
FileLinesPurpose
index.ts3,936MCP server, tool definitions, request routing
jira-client.ts1,948Jira REST API client (v3 + Agile v1)
confluence-client.ts663Confluence REST API client (v2 + v1)
logger.ts408Structured logging with metrics
types.ts295Jira TypeScript interfaces
rate-limiter.ts351Rate limiting with exponential backoff
operation-verifier.ts350Post-operation verification
account-manager.ts287Multi-account management
confluence-types.ts75Confluence TypeScript interfaces
  1. AI agent sends a tool call via MCP protocol (stdio)
  2. index.ts routes the request to the appropriate handler
  3. Handler validates input using Zod schemas
  4. AccountManager provides the active JiraClient or ConfluenceClient
  5. Client makes HTTP request through RateLimiter
  6. Rate limiter manages concurrency, retries, and backoff
  7. Response is parsed and typed
  8. OperationVerifier confirms mutations (create/update/transition)
  9. Structured result returned to agent via MCP protocol
  10. Logger records metrics throughout the flow
  • Single process: No separate API server — direct stdio communication
  • Zod validation: All tool inputs validated at schema level before processing
  • Rate limiting as middleware: Wraps all HTTP requests transparently
  • Verification by default: Mutations are verified to catch eventual consistency issues
  • Multi-account singleton: One AccountManager instance manages all accounts and clients