agentmail-mcp 0.1.4 → 0.1.6
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/dist/index.js +18 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
3
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
+
import { AgentMailToolkit } from 'agentmail-toolkit/mcp';
|
|
5
|
+
function parseToolsArg() {
|
|
6
|
+
const args = process.argv.slice(2);
|
|
7
|
+
const toolsIndex = args.indexOf('--tools');
|
|
8
|
+
if (toolsIndex === -1)
|
|
9
|
+
return undefined;
|
|
10
|
+
const toolsArg = args[toolsIndex + 1];
|
|
11
|
+
if (!toolsArg) {
|
|
12
|
+
console.error('Error: --tools flag requires a comma-separated list of tool names');
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
return toolsArg.split(',').map((tool) => tool.trim());
|
|
16
|
+
}
|
|
4
17
|
async function main() {
|
|
5
|
-
const server = new
|
|
18
|
+
const server = new McpServer({ name: 'AgentMail', version: '0.1.0' });
|
|
6
19
|
const transport = new StdioServerTransport();
|
|
20
|
+
for (const tool of new AgentMailToolkit().getTools(parseToolsArg())) {
|
|
21
|
+
server.tool(tool.name, tool.description, tool.paramsSchema, tool.callback);
|
|
22
|
+
}
|
|
7
23
|
await server.connect(transport);
|
|
8
24
|
}
|
|
9
25
|
main().catch((error) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentmail-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "AgentMail MCP Server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -35,6 +35,6 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
38
|
-
"agentmail-toolkit": "^0.1.
|
|
38
|
+
"agentmail-toolkit": "^0.1.24"
|
|
39
39
|
}
|
|
40
40
|
}
|