titan-email-mcp 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +13 -1
  2. package/dist/index.js +13 -8
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -1,16 +1,26 @@
1
1
  # Titan Email MCP
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/titan-email-mcp.svg)](https://www.npmjs.com/package/titan-email-mcp)
4
+ [![npm downloads](https://img.shields.io/npm/dm/titan-email-mcp.svg)](https://www.npmjs.com/package/titan-email-mcp)
5
+ [![CI](https://github.com/qmmughal/titan-email-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/qmmughal/titan-email-mcp/actions/workflows/ci.yml)
6
+ [![license](https://img.shields.io/npm/l/titan-email-mcp.svg)](LICENSE)
7
+
3
8
  Connect Claude — Desktop, Code, Cursor, or any [MCP](https://modelcontextprotocol.io) client — directly to a **Titan Email** mailbox, so it can read, search, triage, and send mail on your behalf.
4
9
 
10
+ Package: [npmjs.com/package/titan-email-mcp](https://www.npmjs.com/package/titan-email-mcp) · Source: [github.com/qmmughal/titan-email-mcp](https://github.com/qmmughal/titan-email-mcp)
11
+
5
12
  Titan Email (the mailbox product bundled with many domain registrars, including **GoDaddy**) has no public REST API. This server bridges that gap by talking to Titan's standard **IMAP** and **SMTP** endpoints instead, so your AI assistant gets real mailbox access without any vendor integration work.
6
13
 
14
+ **Contents:** [Why use this](#why-use-this) · [Supported providers](#supported-providers) · [Tools](#tools) · [Quick start](#quick-start) · [Configuration](#configuration) · [Security notes](#security-notes) · [Troubleshooting](#troubleshooting) · [Development](#development) · [Contributing](#contributing) · [License](#license)
15
+
7
16
  ## Why use this
8
17
 
9
18
  - **Your inbox becomes an agent tool.** Ask Claude to summarize unread mail, draft replies in your voice, triage by sender, or find "that invoice from last March" — in plain English, in the same conversation you're already having.
10
19
  - **Works with GoDaddy-hosted Titan mailboxes.** If you bought your domain and mailbox through GoDaddy, your email is very likely running on Titan's infrastructure under the hood. One `TITAN_PROVIDER` setting handles the different server hostnames — see [Supported providers](#supported-providers).
11
20
  - **Safe by default.** Sending is gated behind `TITAN_ALLOW_SEND` (default **on**, but trivially switched **off**) so you can run Claude in read-only / draft-only mode until you trust it.
12
21
  - **No middleman service.** Credentials go straight from your MCP client's local config to Titan's own IMAP/SMTP servers over TLS. Nothing is proxied through a third party, cached, or logged to disk.
13
- - **One process, nine focused tools.** No bloated API surface — just the operations you actually do in a mailbox (see [Tools](#tools) below).
22
+ - **One process, ten focused tools.** No bloated API surface — just the operations you actually do in a mailbox (see [Tools](#tools) below).
23
+ - **Published on npm.** Run it with `npx titan-email-mcp` — no cloning or building required for everyday use.
14
24
 
15
25
  ## Supported providers
16
26
 
@@ -146,6 +156,8 @@ npm start # run the built server directly (reads env vars from your shell
146
156
 
147
157
  The server speaks MCP over stdio (`StdioServerTransport`) — it's not an HTTP service, so running it directly just blocks waiting for a client on stdin.
148
158
 
159
+ **Releasing a new version** (maintainers): bump `version` in `package.json`, run `npm run build` to confirm it compiles, commit and push, then `npm publish` from `titan-mcp/`. The package only ships `dist/`, `README.md`, and `LICENSE` (see `files` in `package.json`) — source TypeScript stays GitHub-only.
160
+
149
161
  ## Contributing
150
162
 
151
163
  Issues and PRs welcome at [github.com/qmmughal/titan-email-mcp](https://github.com/qmmughal/titan-email-mcp). If you add support for another Titan-based reseller, please add its hostnames to the provider preset table in `src/index.ts` and this README.
package/dist/index.js CHANGED
@@ -24,8 +24,8 @@ if (!preset) {
24
24
  }
25
25
  const activePreset = preset ?? PROVIDER_PRESETS.titan;
26
26
  const cfg = {
27
- user: req("TITAN_EMAIL"),
28
- pass: req("TITAN_PASSWORD"),
27
+ user: process.env.TITAN_EMAIL ?? "",
28
+ pass: process.env.TITAN_PASSWORD ?? "",
29
29
  provider: preset ? providerName : "titan",
30
30
  imapHost: process.env.TITAN_IMAP_HOST ?? activePreset.imapHost,
31
31
  imapPort: Number(process.env.TITAN_IMAP_PORT ?? activePreset.imapPort),
@@ -36,16 +36,20 @@ const cfg = {
36
36
  sentFolder: process.env.TITAN_SENT_FOLDER ?? "Sent",
37
37
  draftsFolder: process.env.TITAN_DRAFTS_FOLDER ?? "Drafts",
38
38
  };
39
- function req(name) {
40
- const v = process.env[name];
41
- if (!v) {
42
- console.error(`Missing required env var ${name}. Set TITAN_EMAIL and TITAN_PASSWORD in your MCP client's server config — see README.md for examples.`);
43
- process.exit(1);
39
+ // Tool schemas register unconditionally below, regardless of credentials, so clients
40
+ // and directory crawlers can list this server's capabilities without live creds.
41
+ // Credentials are only required once a tool actually tries to touch the mailbox.
42
+ if (!cfg.user || !cfg.pass) {
43
+ console.error("TITAN_EMAIL / TITAN_PASSWORD not set — tools are registered but will return an error until both are configured in your MCP client's server config.");
44
+ }
45
+ function ensureCreds() {
46
+ if (!cfg.user || !cfg.pass) {
47
+ throw new Error("Missing TITAN_EMAIL and/or TITAN_PASSWORD. Set both in your MCP client's server config — see README.md for examples.");
44
48
  }
45
- return v;
46
49
  }
47
50
  // ---------- helpers ----------
48
51
  async function withImap(fn) {
52
+ ensureCreds();
49
53
  const client = new ImapFlow({
50
54
  host: cfg.imapHost,
51
55
  port: cfg.imapPort,
@@ -280,6 +284,7 @@ server.registerTool("send_email", {
280
284
  if (!cfg.allowSend)
281
285
  return fail("Sending is disabled (TITAN_ALLOW_SEND=false). Use save_draft instead.");
282
286
  try {
287
+ ensureCreds();
283
288
  const mail = { from: fromAddr(), to: a.to, cc: a.cc, bcc: a.bcc, subject: a.subject, text: a.body, html: a.html };
284
289
  const info = await smtp.sendMail(mail);
285
290
  await appendCopy(cfg.sentFolder, await buildRaw({ ...mail, messageId: info.messageId }), ["\\Seen"]);
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "titan-email-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "MCP server that connects Claude (or any MCP client) to a Titan Email mailbox over IMAP/SMTP — including Titan accounts resold through GoDaddy.",
5
+ "mcpName": "io.github.qmmughal/titan-email-mcp",
5
6
  "main": "dist/index.js",
6
7
  "type": "module",
7
8
  "bin": {