@coldbirds/mcp-server 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.
@@ -1269,9 +1269,60 @@
1269
1269
  {
1270
1270
  "name": "list_mailboxes",
1271
1271
  "title": "List Mailboxes",
1272
- "description": "Lists all sender mailboxes connected to the account.",
1272
+ "description": "Lists sender mailboxes connected to the account. Supports filtering by status, provider, label, warmup state, connection health (SMTP/IMAP), DNS issues, and free-text search across email + display name. Cursor-paginated — pass the returned nextCursor to fetch the next page.",
1273
1273
  "inputSchema": {
1274
1274
  "type": "object",
1275
+ "properties": {
1276
+ "cursor": {
1277
+ "type": "string",
1278
+ "description": "Pagination cursor from the previous response's nextCursor."
1279
+ },
1280
+ "limit": {
1281
+ "type": "integer",
1282
+ "minimum": 1,
1283
+ "maximum": 100,
1284
+ "default": 25,
1285
+ "description": "Number of mailboxes to return per page."
1286
+ },
1287
+ "search": {
1288
+ "type": "string",
1289
+ "description": "Case-insensitive substring match on email address or display name."
1290
+ },
1291
+ "labelId": {
1292
+ "type": "string",
1293
+ "description": "Filter to a single label."
1294
+ },
1295
+ "provider": {
1296
+ "type": "string",
1297
+ "description": "Comma-separated provider list. Allowed values: GSUITE, MICROSOFT365, SMTP."
1298
+ },
1299
+ "status": {
1300
+ "type": "string",
1301
+ "description": "Comma-separated mailbox status list. Allowed values: ACTIVE, PAUSED, DISCONNECTED, SUSPENDED, DISGARDED."
1302
+ },
1303
+ "warmupEnabled": {
1304
+ "type": "boolean",
1305
+ "description": "Filter by warmup-enabled flag."
1306
+ },
1307
+ "isWarmupSeed": {
1308
+ "type": "boolean",
1309
+ "description": "Filter by warmup-seed flag."
1310
+ },
1311
+ "smtp": {
1312
+ "type": "string",
1313
+ "enum": ["ok", "failed"],
1314
+ "description": "SMTP connection health filter."
1315
+ },
1316
+ "imap": {
1317
+ "type": "string",
1318
+ "enum": ["ok", "failed"],
1319
+ "description": "IMAP connection health filter."
1320
+ },
1321
+ "dnsIssues": {
1322
+ "type": "string",
1323
+ "description": "Comma-separated DNS records flagged as missing or broken. Allowed values: mx, spf, dkim, a."
1324
+ }
1325
+ },
1275
1326
  "additionalProperties": false
1276
1327
  },
1277
1328
  "outputSchema": {
@@ -1282,48 +1333,44 @@
1282
1333
  "items": {
1283
1334
  "type": "object",
1284
1335
  "properties": {
1285
- "id": {
1286
- "type": "string"
1287
- },
1288
- "emailAddress": {
1289
- "type": "string",
1290
- "format": "email"
1291
- },
1292
- "displayName": {
1293
- "type": [
1294
- "string",
1295
- "null"
1296
- ]
1297
- },
1336
+ "id": { "type": "string" },
1337
+ "emailAddress": { "type": "string", "format": "email" },
1338
+ "displayName": { "type": ["string", "null"] },
1298
1339
  "provider": {
1299
1340
  "type": "string",
1300
- "enum": [
1301
- "GOOGLE",
1302
- "MICROSOFT",
1303
- "SMTP"
1304
- ]
1341
+ "enum": ["GSUITE", "MICROSOFT365", "SMTP"]
1305
1342
  },
1306
1343
  "status": {
1307
- "type": "string"
1308
- },
1309
- "createdAt": {
1310
1344
  "type": "string",
1311
- "format": "date-time"
1312
- }
1345
+ "enum": ["ACTIVE", "PAUSED", "DISCONNECTED", "SUSPENDED", "DISGARDED"]
1346
+ },
1347
+ "labelId": { "type": ["string", "null"] },
1348
+ "isWarmupSeed": { "type": "boolean" },
1349
+ "warmupEnabled": { "type": "boolean" },
1350
+ "warmupLastSendAt": { "type": ["string", "null"], "format": "date-time" },
1351
+ "smtpOk": { "type": ["boolean", "null"] },
1352
+ "imapOk": { "type": ["boolean", "null"] },
1353
+ "dnsMxOk": { "type": ["boolean", "null"] },
1354
+ "dnsSpfOk": { "type": ["boolean", "null"] },
1355
+ "dnsDkimOk": { "type": ["boolean", "null"] },
1356
+ "dnsRecordOk": { "type": ["boolean", "null"] },
1357
+ "connectionFailCount": { "type": "integer" },
1358
+ "createdAt": { "type": "string", "format": "date-time" },
1359
+ "updatedAt": { "type": "string", "format": "date-time" }
1313
1360
  },
1314
- "required": [
1315
- "id",
1316
- "emailAddress",
1317
- "provider",
1318
- "status",
1319
- "createdAt"
1320
- ]
1361
+ "required": ["id", "emailAddress", "provider", "status", "createdAt", "updatedAt"]
1321
1362
  }
1363
+ },
1364
+ "pagination": {
1365
+ "type": "object",
1366
+ "properties": {
1367
+ "nextCursor": { "type": ["string", "null"] },
1368
+ "hasMore": { "type": "boolean" }
1369
+ },
1370
+ "required": ["nextCursor", "hasMore"]
1322
1371
  }
1323
1372
  },
1324
- "required": [
1325
- "data"
1326
- ]
1373
+ "required": ["data"]
1327
1374
  },
1328
1375
  "annotations": {
1329
1376
  "readOnlyHint": true,
@@ -1719,6 +1766,291 @@
1719
1766
  "path": "/api/v1/mailboxes/{id}"
1720
1767
  }
1721
1768
  },
1769
+ {
1770
+ "name": "get_mailbox_warmup",
1771
+ "title": "Get Mailbox Warmup Analytics",
1772
+ "description": "Returns warmup performance analytics for a single mailbox: today's score, trailing-window score, day-over-day delta, daily counters (sent / delivered / spam / rescued / bounced / opened / replied / marked), and per-ESP placement stats. Use this to diagnose why a mailbox's warmup is degrading.",
1773
+ "inputSchema": {
1774
+ "type": "object",
1775
+ "properties": {
1776
+ "id": {
1777
+ "type": "string",
1778
+ "description": "Mailbox ID."
1779
+ },
1780
+ "windowDays": {
1781
+ "type": "integer",
1782
+ "minimum": 1,
1783
+ "maximum": 90,
1784
+ "description": "Trailing window in days for daily counters and trailing score (default 30)."
1785
+ }
1786
+ },
1787
+ "required": ["id"],
1788
+ "additionalProperties": false
1789
+ },
1790
+ "outputSchema": {
1791
+ "type": "object",
1792
+ "properties": {
1793
+ "mailboxId": { "type": "string" },
1794
+ "windowDays": { "type": "integer" },
1795
+ "today": {
1796
+ "type": "object",
1797
+ "properties": {
1798
+ "score": { "type": "integer" },
1799
+ "placementRate": { "type": "number" },
1800
+ "replyRate": { "type": "number" },
1801
+ "openRate": { "type": "number" },
1802
+ "markRate": { "type": "number" },
1803
+ "bounceRate": { "type": "number" },
1804
+ "placed": { "type": "integer" }
1805
+ }
1806
+ },
1807
+ "trailing": {
1808
+ "type": "object",
1809
+ "properties": {
1810
+ "score": { "type": "integer" },
1811
+ "placementRate": { "type": "number" },
1812
+ "replyRate": { "type": "number" },
1813
+ "openRate": { "type": "number" },
1814
+ "markRate": { "type": "number" },
1815
+ "bounceRate": { "type": "number" },
1816
+ "placed": { "type": "integer" }
1817
+ }
1818
+ },
1819
+ "yesterday": {
1820
+ "type": "object",
1821
+ "properties": {
1822
+ "score": { "type": "integer" }
1823
+ }
1824
+ },
1825
+ "delta": { "type": "integer" },
1826
+ "daily": {
1827
+ "type": "array",
1828
+ "items": {
1829
+ "type": "object",
1830
+ "properties": {
1831
+ "day": { "type": "string", "format": "date-time" },
1832
+ "sent": { "type": "integer" },
1833
+ "delivered": { "type": "integer" },
1834
+ "landedSpam": { "type": "integer" },
1835
+ "rescued": { "type": "integer" },
1836
+ "bounced": { "type": "integer" },
1837
+ "opened": { "type": "integer" },
1838
+ "replied": { "type": "integer" },
1839
+ "marked": { "type": "integer" }
1840
+ }
1841
+ }
1842
+ },
1843
+ "espStats": {
1844
+ "type": "array",
1845
+ "items": {
1846
+ "type": "object",
1847
+ "properties": {
1848
+ "esp": { "type": "string", "enum": ["GMAIL", "OUTLOOK", "OTHER"] },
1849
+ "delivered": { "type": "integer" },
1850
+ "landedSpam": { "type": "integer" },
1851
+ "rescued": { "type": "integer" },
1852
+ "overridden": { "type": "integer" }
1853
+ }
1854
+ }
1855
+ }
1856
+ },
1857
+ "required": ["mailboxId", "windowDays", "today", "trailing", "delta", "daily", "espStats"]
1858
+ },
1859
+ "annotations": {
1860
+ "readOnlyHint": true,
1861
+ "destructiveHint": false,
1862
+ "idempotentHint": true,
1863
+ "openWorldHint": false
1864
+ },
1865
+ "_http": {
1866
+ "method": "GET",
1867
+ "path": "/api/v1/mailboxes/{id}/warmup"
1868
+ }
1869
+ },
1870
+ {
1871
+ "name": "list_labels",
1872
+ "title": "List Mailbox Labels",
1873
+ "description": "Lists all mailbox labels for the account along with each label's mailbox count. Labels group mailboxes (e.g. by client, by domain, by campaign theme) for filtering and warmup analytics.",
1874
+ "inputSchema": {
1875
+ "type": "object",
1876
+ "additionalProperties": false
1877
+ },
1878
+ "outputSchema": {
1879
+ "type": "object",
1880
+ "properties": {
1881
+ "data": {
1882
+ "type": "array",
1883
+ "items": {
1884
+ "type": "object",
1885
+ "properties": {
1886
+ "id": { "type": "string" },
1887
+ "name": { "type": "string" },
1888
+ "mailboxCount": { "type": "integer" },
1889
+ "createdAt": { "type": "string", "format": "date-time" },
1890
+ "updatedAt": { "type": "string", "format": "date-time" }
1891
+ },
1892
+ "required": ["id", "name", "mailboxCount", "createdAt", "updatedAt"]
1893
+ }
1894
+ }
1895
+ },
1896
+ "required": ["data"]
1897
+ },
1898
+ "annotations": {
1899
+ "readOnlyHint": true,
1900
+ "destructiveHint": false,
1901
+ "idempotentHint": true,
1902
+ "openWorldHint": false
1903
+ },
1904
+ "_http": {
1905
+ "method": "GET",
1906
+ "path": "/api/v1/labels"
1907
+ }
1908
+ },
1909
+ {
1910
+ "name": "create_label",
1911
+ "title": "Create Mailbox Label",
1912
+ "description": "Creates a new mailbox label. Label names must be unique per account (case-insensitive).",
1913
+ "inputSchema": {
1914
+ "type": "object",
1915
+ "properties": {
1916
+ "name": {
1917
+ "type": "string",
1918
+ "minLength": 1,
1919
+ "maxLength": 80,
1920
+ "description": "Label name. Must be unique within the account."
1921
+ }
1922
+ },
1923
+ "required": ["name"],
1924
+ "additionalProperties": false
1925
+ },
1926
+ "outputSchema": {
1927
+ "type": "object",
1928
+ "properties": {
1929
+ "id": { "type": "string" },
1930
+ "name": { "type": "string" },
1931
+ "mailboxCount": { "type": "integer" },
1932
+ "createdAt": { "type": "string", "format": "date-time" },
1933
+ "updatedAt": { "type": "string", "format": "date-time" }
1934
+ },
1935
+ "required": ["id", "name", "createdAt", "updatedAt"]
1936
+ },
1937
+ "annotations": {
1938
+ "readOnlyHint": false,
1939
+ "destructiveHint": false,
1940
+ "idempotentHint": false,
1941
+ "openWorldHint": false
1942
+ },
1943
+ "_http": {
1944
+ "method": "POST",
1945
+ "path": "/api/v1/labels"
1946
+ }
1947
+ },
1948
+ {
1949
+ "name": "update_label",
1950
+ "title": "Rename Mailbox Label",
1951
+ "description": "Renames an existing mailbox label. Returns 409 if the new name collides with another label.",
1952
+ "inputSchema": {
1953
+ "type": "object",
1954
+ "properties": {
1955
+ "id": {
1956
+ "type": "string",
1957
+ "description": "Label ID to rename."
1958
+ },
1959
+ "name": {
1960
+ "type": "string",
1961
+ "minLength": 1,
1962
+ "maxLength": 80,
1963
+ "description": "New label name."
1964
+ }
1965
+ },
1966
+ "required": ["id", "name"],
1967
+ "additionalProperties": false
1968
+ },
1969
+ "outputSchema": {
1970
+ "type": "object",
1971
+ "properties": {
1972
+ "id": { "type": "string" },
1973
+ "name": { "type": "string" },
1974
+ "mailboxCount": { "type": "integer" },
1975
+ "createdAt": { "type": "string", "format": "date-time" },
1976
+ "updatedAt": { "type": "string", "format": "date-time" }
1977
+ },
1978
+ "required": ["id", "name", "createdAt", "updatedAt"]
1979
+ },
1980
+ "annotations": {
1981
+ "readOnlyHint": false,
1982
+ "destructiveHint": false,
1983
+ "idempotentHint": true,
1984
+ "openWorldHint": false
1985
+ },
1986
+ "_http": {
1987
+ "method": "PATCH",
1988
+ "path": "/api/v1/labels/{id}"
1989
+ }
1990
+ },
1991
+ {
1992
+ "name": "delete_label",
1993
+ "title": "Delete Mailbox Label",
1994
+ "description": "Deletes a mailbox label. Mailboxes that were tagged with this label are unassigned (not deleted). Returns no body on success.",
1995
+ "inputSchema": {
1996
+ "type": "object",
1997
+ "properties": {
1998
+ "id": {
1999
+ "type": "string",
2000
+ "description": "Label ID to delete."
2001
+ }
2002
+ },
2003
+ "required": ["id"],
2004
+ "additionalProperties": false
2005
+ },
2006
+ "annotations": {
2007
+ "readOnlyHint": false,
2008
+ "destructiveHint": true,
2009
+ "idempotentHint": true,
2010
+ "openWorldHint": false
2011
+ },
2012
+ "_http": {
2013
+ "method": "DELETE",
2014
+ "path": "/api/v1/labels/{id}"
2015
+ }
2016
+ },
2017
+ {
2018
+ "name": "get_label_warmup",
2019
+ "title": "Get Label Warmup Analytics",
2020
+ "description": "Returns aggregated warmup analytics for every mailbox inside a label: headline KPIs (inbox placement %, median score, bounce rate, 24h volume), red-flag alerts (no-sends, score drop, bounce spike, connection failures, seed degradation), daily counter rollup, per-ESP breakdown, sender-provider mix, and per-mailbox worklist for triage. Use this for fleet-level analysis.",
2021
+ "inputSchema": {
2022
+ "type": "object",
2023
+ "properties": {
2024
+ "id": {
2025
+ "type": "string",
2026
+ "description": "Label ID."
2027
+ },
2028
+ "maturity": {
2029
+ "type": "string",
2030
+ "enum": ["all", "mature", "new", "seeds"],
2031
+ "description": "Restrict the analytics population: `all` (default) includes every mailbox, `mature` only mailboxes warming for 14+ days, `new` mailboxes warming under 14 days, `seeds` only seed mailboxes."
2032
+ },
2033
+ "windowDays": {
2034
+ "type": "integer",
2035
+ "minimum": 1,
2036
+ "maximum": 90,
2037
+ "description": "Trailing window in days for daily counters and scoring (default 30)."
2038
+ }
2039
+ },
2040
+ "required": ["id"],
2041
+ "additionalProperties": false
2042
+ },
2043
+ "annotations": {
2044
+ "readOnlyHint": true,
2045
+ "destructiveHint": false,
2046
+ "idempotentHint": true,
2047
+ "openWorldHint": false
2048
+ },
2049
+ "_http": {
2050
+ "method": "GET",
2051
+ "path": "/api/v1/labels/{id}/warmup"
2052
+ }
2053
+ },
1722
2054
  {
1723
2055
  "title": "List Events",
1724
2056
  "description": "Lists tracked email events (SENT, OPENED, CLICKED, REPLIED, BOUNCED, etc.) with optional filters. Supports cursor-based pagination.",
package/dist/tools.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.__internals=void 0,exports.registerTools=registerTools;const types_js_1=require("@modelcontextprotocol/sdk/types.js"),json_schema_to_zod_1=require("./json-schema-to-zod"),PLACEHOLDER_RE=/\{(\w+)\}/g;function pathParams(t){const n=[];for(const o of t.matchAll(PLACEHOLDER_RE)){const e=o[1];e&&n.push(e)}return n}function stringifyPathValue(t,n){if(typeof n=="string")return n;if(typeof n=="number"||typeof n=="boolean")return String(n);throw new Error(`Path parameter '${t}' must be a string, number, or boolean (got ${typeof n})`)}function interpolate(t,n){return t.replace(PLACEHOLDER_RE,(o,e)=>{const r=n[e];if(r==null)throw new Error(`Missing required path parameter '${e}'`);return encodeURIComponent(stringifyPathValue(e,r))})}function remainingArgs(t,n){const o={};for(const[e,r]of Object.entries(t))n.includes(e)||(o[e]=r);return o}function asQuery(t){return t}async function dispatch(t,n,o){const{method:e,path:r}=n._http,i=pathParams(r),s=interpolate(r,o),c=remainingArgs(o,i),u=Object.keys(c).length>0;switch(e){case"GET":return t.get(s,u?c:void 0);case"POST":return t.post(s,u?c:void 0);case"PATCH":return t.patch(s,u?c:void 0);case"DELETE":return await t.delete(s)??{ok:!0}}}function ok(t){return{content:[{type:"text",text:JSON.stringify(t,null,2)}]}}function fail(t){return{content:[{type:"text",text:t}],isError:!0}}function buildHandler(t,n){return async o=>{try{const e=await dispatch(t,n,o);return ok(e)}catch(e){const r=e instanceof Error?e.message:String(e);return fail(`Tool '${n.name}' failed: ${r}`)}}}function buildInputSchema(t){const n=(0,json_schema_to_zod_1.jsonSchemaToZod)(t.inputSchema);if(n._def?.typeName!=="ZodObject")throw new Error(`Tool '${t.name}' inputSchema must be a JSON-Schema object at the root`);return n}function registerTools(t,n,o){for(const e of o.tools){const r={description:e.description,inputSchema:buildInputSchema(e)};e.title&&(r.title=e.title),t.registerTool(e.name,r,buildHandler(n,e))}t.server.setRequestHandler(types_js_1.ListToolsRequestSchema,()=>({tools:o.tools.map(e=>{const{_http:r,...i}=e;return i})}))}exports.__internals={dispatch,pathParams,interpolate,remainingArgs};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.__internals=void 0,exports.registerTools=registerTools;const types_js_1=require("@modelcontextprotocol/sdk/types.js"),json_schema_to_zod_1=require("./json-schema-to-zod"),PLACEHOLDER_RE=/\{(\w+)\}/g;function pathParams(t){const e=[];for(const o of t.matchAll(PLACEHOLDER_RE)){const n=o[1];n&&e.push(n)}return e}function stringifyPathValue(t,e){if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);throw new Error(`Path parameter '${t}' must be a string, number, or boolean (got ${typeof e})`)}function interpolate(t,e){return t.replace(PLACEHOLDER_RE,(o,n)=>{const r=e[n];if(r==null)throw new Error(`Missing required path parameter '${n}'`);return encodeURIComponent(stringifyPathValue(n,r))})}function remainingArgs(t,e){const o={};for(const[n,r]of Object.entries(t))e.includes(n)||(o[n]=r);return o}function asQuery(t){return t}async function dispatch(t,e,o){const{method:n,path:r}=e._http,s=pathParams(r),c=interpolate(r,o),u=remainingArgs(o,s),i=Object.keys(u).length>0;switch(n){case"GET":return t.get(c,i?u:void 0);case"POST":return t.post(c,i?u:void 0);case"PATCH":return t.patch(c,i?u:void 0);case"DELETE":return await t.delete(c)??{ok:!0}}}function ok(t){return{content:[{type:"text",text:JSON.stringify(t,null,2)}]}}function fail(t){return{content:[{type:"text",text:t}],isError:!0}}function isRecord(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function toStructured(t,e){if(!t.outputSchema||!isRecord(e))return;const o=t.outputSchema.properties;if(isRecord(o)&&"data"in o){const{success:r,...s}=e;return s}return"data"in e&&isRecord(e.data)?e.data:e}function buildHandler(t,e){return async o=>{try{const n=await dispatch(t,e,o),r=toStructured(e,n),s=ok(r??n);return r!==void 0?{...s,structuredContent:r}:s}catch(n){const r=n instanceof Error?n.message:String(n);return fail(`Tool '${e.name}' failed: ${r}`)}}}function buildInputSchema(t){const e=(0,json_schema_to_zod_1.jsonSchemaToZod)(t.inputSchema);if(e._def?.typeName!=="ZodObject")throw new Error(`Tool '${t.name}' inputSchema must be a JSON-Schema object at the root`);return e}function registerTools(t,e,o){for(const n of o.tools){const r={description:n.description,inputSchema:buildInputSchema(n)};n.title&&(r.title=n.title),t.registerTool(n.name,r,buildHandler(e,n))}t.server.setRequestHandler(types_js_1.ListToolsRequestSchema,()=>({tools:o.tools.map(n=>{const{_http:r,...s}=n;return s})}))}exports.__internals={dispatch,pathParams,interpolate,remainingArgs,toStructured};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coldbirds/mcp-server",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "MCP server for ColdBirds Sequence — control campaigns, contacts, and mailboxes from AI assistants like Claude Desktop, Cursor, and Windsurf.",
5
5
  "keywords": [
6
6
  "coldbirds",