ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

mailindex-mcp

โดย alexanderkrauckรุ่น 0.3.3i★ –iรันบนเครื่อง
ชื่อใน registryio.github.alexanderkrauck/mailindex-mcp

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Search, move, mark, delete and draft your real mail over a self-hosted index.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): Streamable HTTP
  • หมวด: ค้นข้อมูลและความจำของ AI
  • ต้องใส่ค่าเหล่านี้: EMAILSERVER_DATABASE_URL, EMAILSERVER_API_TOKEN, CREDENTIAL_ENCRYPTION_KEY

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

  • ผลตรวจเบื้องต้น: ผ่าน 1 จาก 1 ข้อ
  • รันในเครื่องคุณด้วยสิทธิ์ของผู้ใช้คุณ (ไฟล์ อินเทอร์เน็ต แอปต่าง ๆ)
  • ค่าที่คุณต้องใส่เอง: EMAILSERVER_DATABASE_URL, EMAILSERVER_AUTH_MODE, EMAILSERVER_API_TOKEN, CREDENTIAL_ENCRYPTION_KEY

ค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต

ต้องเตรียมก่อน

  • Dockerติดตั้ง Docker ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "mailindex": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "EMAILSERVER_DATABASE_URL",
        "-e",
        "EMAILSERVER_AUTH_MODE",
        "-e",
        "EMAILSERVER_API_TOKEN",
        "-e",
        "CREDENTIAL_ENCRYPTION_KEY",
        "ghcr.io/alexanderkrauck/mailindex-mcp:0.3.3"
      ],
      "env": {
        "EMAILSERVER_DATABASE_URL": "ใส่ค่าของคุณ",
        "EMAILSERVER_AUTH_MODE": "ใส่ค่าของคุณ",
        "EMAILSERVER_API_TOKEN": "ใส่ค่าของคุณ",
        "CREDENTIAL_ENCRYPTION_KEY": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add mailindex --env EMAILSERVER_DATABASE_URL='ใส่ค่าของคุณ' --env EMAILSERVER_AUTH_MODE='ใส่ค่าของคุณ' --env EMAILSERVER_API_TOKEN='ใส่ค่าของคุณ' --env CREDENTIAL_ENCRYPTION_KEY='ใส่ค่าของคุณ' -- docker run -i --rm -e EMAILSERVER_DATABASE_URL -e EMAILSERVER_AUTH_MODE -e EMAILSERVER_API_TOKEN -e CREDENTIAL_ENCRYPTION_KEY ghcr.io/alexanderkrauck/mailindex-mcp:0.3.3

เติมค่าที่เว้นว่างไว้ก่อนรัน

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "mailindex": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "EMAILSERVER_DATABASE_URL",
        "-e",
        "EMAILSERVER_AUTH_MODE",
        "-e",
        "EMAILSERVER_API_TOKEN",
        "-e",
        "CREDENTIAL_ENCRYPTION_KEY",
        "ghcr.io/alexanderkrauck/mailindex-mcp:0.3.3"
      ],
      "env": {
        "EMAILSERVER_DATABASE_URL": "ใส่ค่าของคุณ",
        "EMAILSERVER_AUTH_MODE": "ใส่ค่าของคุณ",
        "EMAILSERVER_API_TOKEN": "ใส่ค่าของคุณ",
        "CREDENTIAL_ENCRYPTION_KEY": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "mailindex": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "EMAILSERVER_DATABASE_URL",
        "-e",
        "EMAILSERVER_AUTH_MODE",
        "-e",
        "EMAILSERVER_API_TOKEN",
        "-e",
        "CREDENTIAL_ENCRYPTION_KEY",
        "ghcr.io/alexanderkrauck/mailindex-mcp:0.3.3"
      ],
      "env": {
        "EMAILSERVER_DATABASE_URL": "ใส่ค่าของคุณ",
        "EMAILSERVER_AUTH_MODE": "ใส่ค่าของคุณ",
        "EMAILSERVER_API_TOKEN": "ใส่ค่าของคุณ",
        "CREDENTIAL_ENCRYPTION_KEY": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

  • EMAILSERVER_DATABASE_URL จำเป็น env
    PostgreSQL connection URL. This server keeps its own index and does not run without a database; the repository ships docker-compose files that start one for you.
  • EMAILSERVER_AUTH_MODE env
    How callers are authenticated: development (no auth, loopback only), single_user (static bearer token), or google (multi-user OAuth).
  • EMAILSERVER_API_TOKEN ความลับ env
    Bearer token required in single_user mode. At least 32 characters, or the server refuses to start.
  • CREDENTIAL_ENCRYPTION_KEY ความลับ env
    Key used to encrypt stored mailbox credentials at rest. Generate with: openssl rand -base64 32

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 8 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub alexanderkrauck ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด ค้นข้อมูลและความจำของ AIi

  • ดาวมากกว่า 0% ของอีก 5696 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 83% ของอีก 5696 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 5696 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

mailindex-mcp ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

ต้องใส่ค่าเหล่านี้: EMAILSERVER_DATABASE_URL, EMAILSERVER_API_TOKEN, CREDENTIAL_ENCRYPTION_KEY

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.3.3) เข้า registry 8 วันที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Docker ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี Context7, Codebase Memory, Exa

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

Context7

ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว

โดย upstashใช้กันมาก↓ 972.7K/สัปดาห์★ 64.2Kอัปเดต เมื่อวานซืน

บนเครื่องหรือคลาวด์

Codebase Memory

Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.

โดย DeusDataใช้กันมาก↓ 18K/สัปดาห์★ 48.1Kอัปเดต 22 วันที่ผ่านมา

รันบนเครื่อง

Exa

Connect AI agents to Exa for web search, content fetching, and multi-step research.

โดย exa-labsกำลังโต★ 5.2Kอัปเดต 2 เดือนที่ผ่านมา

รันบนคลาวด์✓ exa.ai

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

mailindex-mcp

A mail client for an AI agent. Everything you can do in Thunderbird — search, move, mark, delete, draft — over your own index, on your own machine.

Most email MCP servers forward each question straight to IMAP. That answers "show me my last 10 messages" and falls apart on everything else: SEARCH is inconsistent between providers, it cannot see inside attachments, it never tells the model whether it actually searched everything, and it cannot do a thing about what it finds.

So when you ask an assistant to clear eight thousand newsletters out of your inbox, it tells you that would be eight thousand tool calls and suggests you go and do it by hand in the web interface.

This one keeps its own copy of your mail and acts on it:

delete_mail(account_id=3, participants=["newsletter@example.com", ...])

→ matched: 4147, affected: 4147, to: "[Google Mail]/Bin"

One call. One connection. Six seconds. That is the difference between a search box and a mail client.

A real question against a live index of about 59,000 messages across six accounts. One string is blurred: a case number belonging to a real filing.

Why this instead of the other email MCP servers

This projectTypical email MCP
Can it change anythingMove, mark, delete, draft, manage folders — in bulk, by searchRead-only, or one message per call
SearchOwn PostgreSQL index, GIN full-text, stemmed across languagesLive IMAP SEARCH per call
Result completenessExact total_count, signed cursors, per-account coverageWhatever the folder returned
AttachmentsText extracted and indexed at sync time (PDF, DOCX, XLSX, PPTX, OCR)Base64 into the model's context, or not at all
Attachment binariesNever stored; refetched through a 5-minute signed URLStored on disk or inlined
TransportRemote HTTP endpointLocal stdio process on your machine
Setup on the clientPaste a URLInstall a runtime, edit config JSON, store credentials locally
UsersMulti-tenant, every row owner-scopedSingle user
Tool surface22 tools, all annotatedFrequently 40+

What it costs you, stated up front. You run PostgreSQL and a container. The index is about 28 MB per 1,000 messages — a 50,000-message archive is roughly 1.5 GB — and the image is 1.25 GB because it carries OCR language data. The first sync downloads every message once; search works on what has arrived while the rest continues in the background, and each account reports its own coverage so the model knows what it has not seen yet.

In exchange your assistant can answer questions about mail from years ago, including text inside attachments, and then act on the answer. None of it leaves your machine.

Quickstart

Five minutes, local only, no accounts to create anywhere.

git clone https://github.com/alexanderkrauck/mailindex-mcp.git

cd mailindex-mcp cp .env.example .env docker compose up -d

Every compose file here pulls ghcr.io/alexanderkrauck/mailindex-mcp — amd64 and arm64, so a Raspberry Pi or an Apple Silicon machine works the same way. Append --build to any of them to compile it yourself instead; expect several minutes, because the image carries OCR language data.

Pin a version for anything you care about. This is pre-1.0: the schema changes between releases and migrations run automatically on start, so an unpinned latest can migrate your database the moment you restart.

MAILINDEX_IMAGE=ghcr.io/alexanderkrauck/mailindex-mcp:0.1.0 docker compose up -d

MAILINDEX_IMAGE works with all three compose files, and belongs in your .env rather than on the command line. Note the image tag has no v — the git tag is v0.1.0, the image is 0.1.0, and 0.1 follows the latest patch of that minor version.

Check it came up:

curl http://localhost:8002/api/v1/health

The default development mode is unauthenticated and Docker binds it to 127.0.0.1 only. It is meant for exactly this: trying the thing out on your own machine.

Connect your AI client

Do this before connecting a mailbox — it is how you connect one.

claude mcp add --transport http mail http://localhost:8002/mcp

For other clients, point them at http://localhost:8002/mcp over streamable HTTP. Then ask something your inbox search would struggle with — a phrase inside a PDF someone sent you three years ago works well.

Connect a mailbox

Just ask your client — add_mail_account is one of the tools:

Connect my mailbox you@example.com, IMAP imap.example.com, SMTP

smtp.example.com

Do not give it the password. Asked without one, it hands you back a short-lived URL to a form that asks for the password alone and sends it from your browser straight to the server. It never passes through the model, never lands in the conversation transcript your AI provider keeps, and it is the only way that works with clients such as ChatGPT that refuse to transmit secrets.

Use an app password from your provider's security settings, never your account login password. For Gmail, ask it to start the Gmail OAuth flow instead: that uses the Gmail API and survives label changes better. Microsoft 365 and Exchange Online accept no password at all, so ask it to connect a Microsoft mailbox: you sign in at Microsoft and approve what the server may do, exactly as with Gmail (setup).

Or over HTTP, if you prefer a shell

curl -X POST http://localhost:8002/api/v1/accounts \

-H 'Content-Type: application/json' \ -d '{ "name": "personal", "account_name": "you@example.com", "username": "you@example.com", "password": "your-app-password", "host": "imap.example.com", "port": 993, "smtp_host": "smtp.example.com", "smtp_port": 465 }'

Synchronization starts on its own and runs in the background. Search works on what has arrived already — ask "how much of my mail have you indexed so far?" and it will tell you exactly, per account, because every search reports its own coverage rather than pretending to be complete.

Which setup do I need?

Four ways people arrive at this, and the shortest honest path for each.

"I want to see if this is real" — 5 minutes, your laptop

Everything runs locally, nothing to sign up for.

git clone https://github.com/alexanderkrauck/mailindex-mcp.git

cd mailindex-mcp && cp .env.example .env docker compose up -d # pulls the published image claude mcp add --transport http mail http://localhost:8002/mcp

Add a mailbox with an app password (see below), wait for it to sync, then ask your client something your inbox search would lose. What you need: Docker, and an app password from your provider. What to expect: the first build compiles psycopg2 and pulls ~130 MB of OCR language data, so it takes minutes, not seconds. Auth is off and Docker binds to 127.0.0.1 only — fine here, never expose it.

"I want this on my phone and laptop, every day" — one person, one server

You need a small VPS and a domain. Caddy gets the TLS certificate for you.

cat > .env <<'ENV'

EMAILSERVER_DOMAIN=mail.example.com POSTGRES_PASSWORD=... EMAILSERVER_API_TOKEN=... CREDENTIAL_ENCRYPTION_KEY=... SESSION_SECRET=... ENV docker compose -f docker-compose.single-user.yml up -d

Every value from openssl rand -base64 32; the API token must be at least 32 characters or the server refuses to start. What you need: a VPS with ~2 GB RAM and disk for roughly 25 MB per 1,000 messages, a domain, and an app password per mailbox. What to expect: works with anything that sends an Authorization header — Claude Code, Cursor, mcp-remote. It will *not* work with the claude.ai or ChatGPT web connectors, which negotiate OAuth and cannot send a static token. If you want those, use the next one.

"My family/team should each have their own" — a few people

Google OAuth, so each person signs in as themselves and sees only their own mailboxes.

docker compose -f docker-compose.production.yml up -d

What you need: everything above, plus a Google Cloud OAuth Web application with the two redirect URIs listed under Deployment modes. What to expect: an unverified-app warning until you submit the consent screen, and a 100-user cap while unverified — neither matters at this size.

Set `REGISTRATION_MODE=allowlist`. With open, any Google account on

earth can register on your server and attach mailboxes, and

ALLOWED_GOOGLE_EMAILS is never read. Tenant isolation still keeps strangers

out of *your* mail, but they get an account on your box. This is the easiest

thing to get wrong on a public host.

"Could this be internal infrastructure?" — 500-person company

Honestly: not yet, and here is exactly what is missing rather than a maybe.

What works today. Run it for one team as a pilot using the Google setup above. Multi-tenancy is real and enforced at the query level — every row is owner-scoped, and ownership comes from the authenticated token rather than anything a caller supplies. Mailbox credentials are encrypted at rest and never returned. Attachment binaries are never stored.

What blocks a company-wide rollout.

GapWhy it matters
Login is Google OIDC onlyNo Entra ID, Okta, generic OIDC or SAML. If your directory is not Google, nobody can sign in.
No provisioning or deprovisioningUsers self-register; there is no SCIM, no group mapping, and no way to revoke someone's index when they leave.
No audit exportSends are audited; reads, searches and mailbox writes are not, which most compliance reviews ask about.
Single Postgres, single containerNo HA, no read replicas, no horizontal sync workers. Backup and restore is your pg_dump.
Attachment text sits in the databaseRetention and legal hold are whatever you build.

If you are that person: the pilot is genuinely worth running, and the honest pitch internally is "a search index over our own mail, on our own hardware, that an assistant can use" — not "an approved platform".

Mailbox credentials, whichever setup you pick

Signing in to this server grants access to nothing. Each mailbox is connected separately:

  • Gmail — either an app password over IMAP, or the Gmail OAuth flow via begin_gmail_connection, which uses the Gmail API instead and survives label changes better.
  • Microsoft 365 / Exchange Online — OAuth only, via begin_microsoft_connection. Microsoft accepts neither a password nor an app password for these mailboxes. See Connecting Microsoft 365.
  • Everything else — an app password from the provider's security settings. Never your login password.
Connecting Microsoft 365 / Exchange Online

Microsoft mailboxes are connected the way Gmail is: you sign in at Microsoft and approve what this server may do, and the server keeps only the resulting refresh token, encrypted. That needs one app registration, made once per ser

ตัดมาแค่ช่วงต้น อ่านต่อใน repo

ถาม PopNx