komga-mcp
A read-only MCP server that exposes Komga reading data via Streamable HTTP, providing tools for searching comics, listing unread series, and tracking reading progress.
README
komga-mcp
A small, read-only Model Context Protocol (MCP) server that exposes your Komga reading data to any MCP-compatible client over Streamable HTTP.
It is intentionally minimal and safe: it can only read from Komga. There is no tool that writes progress, edits metadata, deletes, downloads, scans, or issues arbitrary API calls.
Tools
The server advertises exactly four tools:
| Tool | Description |
|---|---|
search_comics |
Search a series or a book by title. |
get_unread_series |
List series that contain unread books. |
get_reading_progress |
List books in progress with page/percentage. |
continue_reading |
Books in progress first, then on-deck (next unread), separated. |
Every response is a normalized JSON payload — never a raw Komga dump, never file paths or device identifiers.
HTTP endpoints
| Path | Method | Auth | Purpose |
|---|---|---|---|
/mcp |
POST | Bearer | MCP Streamable HTTP endpoint |
/health |
GET | none | Liveness (does not call Komga) |
/ready |
GET | Bearer | Readiness (checks Komga connectivity) |
Inbound requests to /mcp and /ready require
Authorization: Bearer <MCP_BEARER_TOKEN>.
Configuration
Set via environment variables (see .env.example):
| Variable | Required | Default | Description |
|---|---|---|---|
PORT |
no | 8000 |
Listen port |
KOMGA_URL |
yes | — | Base URL of Komga (e.g. http://komga:25600) |
KOMGA_API_KEY |
yes | — | Sent to Komga as X-API-Key |
MCP_BEARER_TOKEN |
yes | — | Required bearer for inbound MCP clients |
KOMGA_REQUEST_TIMEOUT_MS |
no | 10000 |
Per-request timeout (1000..60000) |
LOG_LEVEL |
no | info |
error / warn / info / debug |
Generate a strong bearer token, for example: openssl rand -hex 32.
Run with Docker
cp .env.example .env # then edit .env with real values
docker run --rm --env-file .env -p 8101:8000 ghcr.io/pierrec18/komga-mcp:0.1.0
Or with Compose — see compose.example.yaml. The image
runs as a non-root user and is compatible with a read-only root filesystem.
Run from source
npm ci
npm run build
KOMGA_URL=http://localhost:25600 \
KOMGA_API_KEY=... \
MCP_BEARER_TOKEN=... \
npm start
Connecting an MCP client
Point any MCP client at the Streamable HTTP endpoint and pass the bearer token. Example with the official TypeScript SDK:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const transport = new StreamableHTTPClientTransport(
new URL("http://localhost:8101/mcp"),
{ requestInit: { headers: { Authorization: `Bearer ${process.env.MCP_BEARER_TOKEN}` } } },
);
const client = new Client({ name: "my-client", version: "1.0.0" });
await client.connect(transport);
console.log(await client.listTools());
This server is not tied to any particular client or agent framework.
Development
npm ci
npm run lint # ESLint
npm run typecheck # tsc --noEmit
npm test # vitest (runs against a fake Komga; never your real instance)
npm run build # emit dist/
Security
See SECURITY.md. In short: read-only by design, bearer-protected, secrets never logged, upstream errors sanitized, timeouts and bounded limits on everything.
License
MIT
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.