Development Guide
Project Structure
Section titled “Project Structure”ts-mcp/├── src/│ ├── index.ts # MCP server + tool definitions (3,936 lines)│ ├── jira-client.ts # Jira REST API client (1,948 lines)│ ├── confluence-client.ts # Confluence REST API client (663 lines)│ ├── account-manager.ts # Multi-account management (287 lines)│ ├── rate-limiter.ts # Rate limiting + backoff (351 lines)│ ├── operation-verifier.ts # Post-mutation verification (350 lines)│ ├── logger.ts # Structured logging + metrics (408 lines)│ ├── types.ts # Jira TypeScript interfaces (295 lines)│ └── confluence-types.ts # Confluence TypeScript interfaces (75 lines)├── tests/│ ├── jira-client.test.ts│ ├── confluence-client.test.ts│ ├── account-manager.test.ts│ ├── rate-limiter.test.ts│ ├── operation-verifier.test.ts│ └── logger.test.ts├── package.json├── tsconfig.json├── vitest.config.ts└── README.mdGetting Started
Section titled “Getting Started”# Clone the repositorygit clone https://github.com/mottysisam/bodywave-jira.gitcd bodywave-jira/ts-mcp
# Install dependenciesnpm install
# Build TypeScriptnpm run build
# Run testsnpm test
# Start dev mode (watch for changes)npm run devScripts
Section titled “Scripts”| Command | Description |
|---|---|
npm run build | Compile TypeScript to dist/ |
npm run dev | Watch mode — recompile on changes |
npm start | Run the compiled MCP server |
npm test | Run tests with Vitest |
npm run lint | Run ESLint |
Testing
Section titled “Testing”Tests use Vitest with mocked HTTP responses. No Jira instance required for testing.
Coverage Configuration
Section titled “Coverage Configuration”coverage: { provider: 'v8', thresholds: { lines: 60, functions: 60, branches: 60, statements: 60, },}Running Tests
Section titled “Running Tests”# Run all testsnpm test
# Run with coveragenpm test -- --coverage
# Run specific test filenpm test -- tests/jira-client.test.ts
# Watch modenpm test -- --watchDependencies
Section titled “Dependencies”| Package | Version | Purpose |
|---|---|---|
@modelcontextprotocol/sdk | ^1.12.0 | MCP protocol implementation |
axios | ^1.7.0 | HTTP client for Jira/Confluence APIs |
zod | ^3.23.0 | Runtime input validation |
form-data | ^4.0.5 | File upload support (attachments) |
Publishing
Section titled “Publishing”# Build and publish to npmnpm run prepublishOnly # Runs tscnpm publishThe package is published as @bodywave/jira-mcp on npm.