Confluence API Docs MCP Server

Confluence API Docs MCP Server

Generates API documentation in Confluence from Swagger/OpenAPI specs or NestJS controller files, including automatic Postman collection generation.

Category
Visit Server

README

Confluence API Docs MCP Server

An MCP (Model Context Protocol) server that generates API documentation in Confluence from:

  • Swagger/OpenAPI specifications (JSON files or URLs)
  • NestJS controller files (TypeScript decorators)

Automatically generates Postman collections and embeds them in documentation pages.

Installation

npm install
npm run build

Configuration

  1. Copy .env.example to .env

  2. Fill in your Confluence Cloud credentials:

    • CONFLUENCE_BASE_URL: Your Atlassian Cloud URL (e.g., https://mycompany.atlassian.net)
    • CONFLUENCE_EMAIL: Your email address
    • CONFLUENCE_API_TOKEN: API token from https://id.atlassian.com/manage-profile/security/api-tokens
  3. Add to ~/.claude.json:

{
  "mcpServers": {
    "confluence-api-docs": {
      "command": "node",
      "args": ["/home/harsh-vaghela/saleshandy/confluence-api-docs-mcp/dist/index.js"],
    }
  }
}

Usage

Available Tools

Space Management:

  • list_spaces - List all Confluence spaces
  • search_pages - Search for existing pages
  • get_page - Get page content
  • delete_page - Delete a page

Swagger/OpenAPI Documentation:

  • create_api_doc - Create API documentation from Swagger/OpenAPI spec (URL or file)
  • update_api_doc - Update existing API documentation from spec
  • sync_swagger_to_confluence - Full sync with configurable grouping (tag, path, or single page)

NestJS Controller Documentation:

  • create_api_doc_from_controller - Create documentation from NestJS controller files
  • update_api_doc_from_controller - Update documentation from controller files

Note: All tools automatically generate Postman collections embedded in the documentation.

Examples

List available spaces:

Show me available Confluence spaces

Create API docs from Swagger:

Create API documentation in space DEV from http://localhost:3000/swagger.json

Create API docs from NestJS controller:

Create API documentation from src/controllers/dialer.controller.ts in space DEV with base URL https://api.example.com

Create docs from controller directory:

Create API documentation from src/controllers in space DEV

Update API docs:

Update page 12345678 with latest API spec from /path/to/swagger.json

Update from controller:

Update page 12345678 from src/controllers/dialer.controller.ts

Development

npm run dev          # Run with ts-node
npm run build        # Build to dist/
npm start            # Run compiled version
npm run clean        # Remove dist/

Architecture

MCP Server
  ├── Parsers
  │   ├── Swagger Parser Service
  │   │   └── Parses OpenAPI specs from URLs or files
  │   └── Controller Parser Service
  │       └── Parses NestJS TypeScript controller files
  ├── Generators
  │   ├── Doc Generator Service
  │   │   └── Converts parsed specs to Confluence storage format
  │   └── Postman Generator Service
  │       └── Generates Postman Collection v2.1 JSON
  ├── Confluence Client Service
  │   └── Handles Confluence REST API v2 calls
  └── Tools
      ├── Space Management
      ├── Swagger-based Documentation
      ├── Controller-based Documentation
      └── Maintenance

Dual-Mode Pipeline

Both Swagger and Controller inputs converge to the same ParsedSwagger format, ensuring identical output documentation:

Swagger JSON/URL → Swagger Parser → ParsedSwagger ─┐
                                                    ├→ Doc Generator → Confluence HTML + Postman JSON
NestJS Controller → Controller Parser → ParsedSwagger ┘

Supported Swagger/OpenAPI Versions

  • OpenAPI 3.0.x
  • OpenAPI 3.1.x
  • Swagger 2.0

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured