mailtea-mcp 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +165 -0
- package/bin/mailtea-mcp.mjs +4 -0
- package/dist/chunk-NEG2GOMD.js +4034 -0
- package/dist/index.d.ts +2313 -0
- package/dist/index.js +12 -0
- package/dist/stdio.d.ts +2 -0
- package/dist/stdio.js +50 -0
- package/package.json +56 -0
package/dist/index.js
ADDED
package/dist/stdio.d.ts
ADDED
package/dist/stdio.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
handleMcpRequest
|
|
3
|
+
} from "./chunk-NEG2GOMD.js";
|
|
4
|
+
|
|
5
|
+
// src/stdio.ts
|
|
6
|
+
import readline from "readline";
|
|
7
|
+
var runtimeOptions = {
|
|
8
|
+
apiBaseUrl: process.env.MAILTEA_API_BASE_URL,
|
|
9
|
+
token: process.env.MAILTEA_API_TOKEN ?? null,
|
|
10
|
+
publicationId: process.env.MAILTEA_PUBLICATION_ID ?? null
|
|
11
|
+
};
|
|
12
|
+
if (!runtimeOptions.token) {
|
|
13
|
+
console.error(
|
|
14
|
+
"[mailtea-mcp] MAILTEA_API_TOKEN is not set. Tool calls will fail until a token is provided."
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
var rl = readline.createInterface({
|
|
18
|
+
input: process.stdin,
|
|
19
|
+
output: process.stdout,
|
|
20
|
+
terminal: false
|
|
21
|
+
});
|
|
22
|
+
function writeResponse(message) {
|
|
23
|
+
process.stdout.write(`${JSON.stringify(message)}
|
|
24
|
+
`);
|
|
25
|
+
}
|
|
26
|
+
async function handleLine(line) {
|
|
27
|
+
const text = line.trim();
|
|
28
|
+
if (!text) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
let request;
|
|
32
|
+
try {
|
|
33
|
+
request = JSON.parse(text);
|
|
34
|
+
} catch {
|
|
35
|
+
writeResponse({
|
|
36
|
+
jsonrpc: "2.0",
|
|
37
|
+
id: null,
|
|
38
|
+
error: {
|
|
39
|
+
code: -32700,
|
|
40
|
+
message: "Parse error"
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const response = await handleMcpRequest(request, runtimeOptions);
|
|
46
|
+
writeResponse(response);
|
|
47
|
+
}
|
|
48
|
+
rl.on("line", (line) => {
|
|
49
|
+
void handleLine(line);
|
|
50
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mailtea-mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Mailtea MCP server — let AI agents send, schedule, and manage email over Model Context Protocol.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"mailtea-mcp": "bin/mailtea-mcp.mjs"
|
|
9
|
+
},
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"bin",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
17
|
+
"keywords": [
|
|
18
|
+
"mailtea",
|
|
19
|
+
"mcp",
|
|
20
|
+
"model-context-protocol",
|
|
21
|
+
"email",
|
|
22
|
+
"newsletter",
|
|
23
|
+
"ai-agent",
|
|
24
|
+
"claude"
|
|
25
|
+
],
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/mailtea-app/mailtea-mcp.git"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://mailtea.app",
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
37
|
+
"default": "./dist/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./stdio": {
|
|
40
|
+
"types": "./dist/stdio.d.ts",
|
|
41
|
+
"default": "./dist/stdio.js"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"tsx": "^4.20.5",
|
|
46
|
+
"tsup": "^8.4.0",
|
|
47
|
+
"typescript": "^5.8.2"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"dev": "tsup src/index.ts src/stdio.ts --watch --format esm --dts",
|
|
51
|
+
"build": "tsup src/index.ts src/stdio.ts --format esm --dts --clean",
|
|
52
|
+
"typecheck": "tsc --noEmit",
|
|
53
|
+
"lint": "echo \"No lint for mailtea-mcp yet\"",
|
|
54
|
+
"test": "node --import ./node_modules/tsx/dist/loader.mjs --test src/**/*.test.ts"
|
|
55
|
+
}
|
|
56
|
+
}
|