@latellu/atlas-mcp 1.0.0 → 1.0.2

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 +12 -0
  2. package/dist/index.js +29 -43
  3. package/package.json +3 -11
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Atlas MCP Server
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@latellu/atlas-mcp.svg)](https://www.npmjs.com/package/@latellu/atlas-mcp)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
3
6
  MCP (Model Context Protocol) server for Atlas CMS — enables AI agents to manage content.
4
7
 
5
8
  ## Overview
@@ -43,10 +46,19 @@ This MCP server exposes Atlas CMS content management operations as tools for AI
43
46
 
44
47
  ## Installation
45
48
 
49
+ ### Using npx (Recommended)
50
+
46
51
  ```bash
47
52
  npx @latellu/atlas-mcp
48
53
  ```
49
54
 
55
+ ### Global Install
56
+
57
+ ```bash
58
+ npm install -g @latellu/atlas-mcp
59
+ atlas-mcp
60
+ ```
61
+
50
62
  ## Configuration
51
63
 
52
64
  ### Environment Variables
package/dist/index.js CHANGED
@@ -8,12 +8,15 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
8
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
9
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
10
  }) : x)(function(x) {
11
- if (typeof require !== "undefined")
12
- return require.apply(this, arguments);
11
+ if (typeof require !== "undefined") return require.apply(this, arguments);
13
12
  throw Error('Dynamic require of "' + x + '" is not supported');
14
13
  });
15
14
  var __commonJS = (cb, mod) => function __require2() {
16
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
+ try {
16
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
+ } catch (e) {
18
+ throw mod = 0, e;
19
+ }
17
20
  };
18
21
  var __copyProps = (to, from, except, desc) => {
19
22
  if (from && typeof from === "object" || typeof from === "function") {
@@ -2044,38 +2047,28 @@ var require_fast_deep_equal = __commonJS({
2044
2047
  "node_modules/fast-deep-equal/index.js"(exports, module) {
2045
2048
  "use strict";
2046
2049
  module.exports = function equal(a, b) {
2047
- if (a === b)
2048
- return true;
2050
+ if (a === b) return true;
2049
2051
  if (a && b && typeof a == "object" && typeof b == "object") {
2050
- if (a.constructor !== b.constructor)
2051
- return false;
2052
+ if (a.constructor !== b.constructor) return false;
2052
2053
  var length, i, keys;
2053
2054
  if (Array.isArray(a)) {
2054
2055
  length = a.length;
2055
- if (length != b.length)
2056
- return false;
2056
+ if (length != b.length) return false;
2057
2057
  for (i = length; i-- !== 0; )
2058
- if (!equal(a[i], b[i]))
2059
- return false;
2058
+ if (!equal(a[i], b[i])) return false;
2060
2059
  return true;
2061
2060
  }
2062
- if (a.constructor === RegExp)
2063
- return a.source === b.source && a.flags === b.flags;
2064
- if (a.valueOf !== Object.prototype.valueOf)
2065
- return a.valueOf() === b.valueOf();
2066
- if (a.toString !== Object.prototype.toString)
2067
- return a.toString() === b.toString();
2061
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
2062
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
2063
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
2068
2064
  keys = Object.keys(a);
2069
2065
  length = keys.length;
2070
- if (length !== Object.keys(b).length)
2071
- return false;
2066
+ if (length !== Object.keys(b).length) return false;
2072
2067
  for (i = length; i-- !== 0; )
2073
- if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
2074
- return false;
2068
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
2075
2069
  for (i = length; i-- !== 0; ) {
2076
2070
  var key = keys[i];
2077
- if (!equal(a[key], b[key]))
2078
- return false;
2071
+ if (!equal(a[key], b[key])) return false;
2079
2072
  }
2080
2073
  return true;
2081
2074
  }
@@ -3234,8 +3227,7 @@ var require_utils = __commonJS({
3234
3227
  function findToken(str, token) {
3235
3228
  let ind = 0;
3236
3229
  for (let i = 0; i < str.length; i++) {
3237
- if (str[i] === token)
3238
- ind++;
3230
+ if (str[i] === token) ind++;
3239
3231
  }
3240
3232
  return ind;
3241
3233
  }
@@ -3736,8 +3728,7 @@ var require_fast_uri = __commonJS({
3736
3728
  const options = Object.assign({}, opts);
3737
3729
  const uriTokens = [];
3738
3730
  const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
3739
- if (schemeHandler && schemeHandler.serialize)
3740
- schemeHandler.serialize(component, options);
3731
+ if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
3741
3732
  if (component.path !== void 0) {
3742
3733
  if (!options.skipEscape) {
3743
3734
  component.path = escapePreservingEscapes(component.path);
@@ -8425,11 +8416,13 @@ function assertCompleteRequestPrompt(request) {
8425
8416
  if (request.params.ref.type !== "ref/prompt") {
8426
8417
  throw new TypeError(`Expected CompleteRequestPrompt, but got ${request.params.ref.type}`);
8427
8418
  }
8419
+ void request;
8428
8420
  }
8429
8421
  function assertCompleteRequestResourceTemplate(request) {
8430
8422
  if (request.params.ref.type !== "ref/resource") {
8431
8423
  throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${request.params.ref.type}`);
8432
8424
  }
8425
+ void request;
8433
8426
  }
8434
8427
  var CompleteResultSchema = ResultSchema.extend({
8435
8428
  completion: z.looseObject({
@@ -8585,7 +8578,7 @@ function isTerminal(status) {
8585
8578
  import * as z4mini2 from "zod/v4-mini";
8586
8579
 
8587
8580
  // node_modules/zod-to-json-schema/dist/esm/Options.js
8588
- var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
8581
+ var ignoreOverride = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to use");
8589
8582
  var defaultOptions = {
8590
8583
  name: void 0,
8591
8584
  $refStrategy: "root",
@@ -11568,7 +11561,7 @@ var Server = class extends Protocol {
11568
11561
  };
11569
11562
 
11570
11563
  // node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
11571
- var COMPLETABLE_SYMBOL = Symbol.for("mcp.completable");
11564
+ var COMPLETABLE_SYMBOL = /* @__PURE__ */ Symbol.for("mcp.completable");
11572
11565
  function isCompletable(schema) {
11573
11566
  return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
11574
11567
  }
@@ -12589,12 +12582,9 @@ var AtlasClient = class {
12589
12582
  async listEntries(contentType, params) {
12590
12583
  const searchParams = new URLSearchParams();
12591
12584
  searchParams.set("type", contentType);
12592
- if (params?.page)
12593
- searchParams.set("page", params.page.toString());
12594
- if (params?.limit)
12595
- searchParams.set("limit", params.limit.toString());
12596
- if (params?.status)
12597
- searchParams.set("status", params.status);
12585
+ if (params?.page) searchParams.set("page", params.page.toString());
12586
+ if (params?.limit) searchParams.set("limit", params.limit.toString());
12587
+ if (params?.status) searchParams.set("status", params.status);
12598
12588
  return this.request(`/api/v1/public/entries?${searchParams.toString()}`);
12599
12589
  }
12600
12590
  async getEntry(contentType, slug) {
@@ -12640,10 +12630,8 @@ var AtlasClient = class {
12640
12630
  // Page endpoints
12641
12631
  async listPages(params) {
12642
12632
  const searchParams = new URLSearchParams();
12643
- if (params?.page)
12644
- searchParams.set("page", params.page.toString());
12645
- if (params?.limit)
12646
- searchParams.set("limit", params.limit.toString());
12633
+ if (params?.page) searchParams.set("page", params.page.toString());
12634
+ if (params?.limit) searchParams.set("limit", params.limit.toString());
12647
12635
  return this.request(`/api/v1/public/pages?${searchParams.toString()}`);
12648
12636
  }
12649
12637
  async getPage(slug) {
@@ -12685,10 +12673,8 @@ var AtlasClient = class {
12685
12673
  const fileBuffer = fs.readFileSync(filePath);
12686
12674
  const formData = new FormData();
12687
12675
  formData.append("file", new Blob([fileBuffer]), fileName);
12688
- if (folder)
12689
- formData.append("folder", folder);
12690
- if (altText)
12691
- formData.append("alt_text", altText);
12676
+ if (folder) formData.append("folder", folder);
12677
+ if (altText) formData.append("alt_text", altText);
12692
12678
  const response = await fetch(`${this.baseUrl}/api/v1/manage/media/upload`, {
12693
12679
  method: "POST",
12694
12680
  headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latellu/atlas-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -33,23 +33,15 @@
33
33
  ],
34
34
  "author": "Latellu",
35
35
  "license": "MIT",
36
- "repository": {
37
- "type": "git",
38
- "url": "https://github.com/tenriajeng/atlas-mcp.git"
39
- },
40
- "bugs": {
41
- "url": "https://github.com/tenriajeng/atlas-mcp/issues"
42
- },
43
- "homepage": "https://github.com/tenriajeng/atlas-mcp#readme",
44
36
  "dependencies": {
45
37
  "@modelcontextprotocol/sdk": "^1.6.1",
46
38
  "zod": "^3.22.0"
47
39
  },
48
40
  "devDependencies": {
49
41
  "@types/node": "^20.0.0",
50
- "esbuild": "^0.20.0",
42
+ "esbuild": "^0.28.1",
51
43
  "tsx": "^4.0.0",
52
44
  "typescript": "^5.0.0",
53
- "vitest": "^1.0.0"
45
+ "vitest": "^4.1.10"
54
46
  }
55
47
  }