@latellu/atlas-mcp 1.0.0 → 1.0.1
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/README.md +26 -0
- package/dist/index.js +29 -43
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Atlas MCP Server
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@latellu/atlas-mcp)
|
|
4
|
+
[](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
|
|
@@ -198,6 +210,20 @@ The MCP server connects to Atlas via REST API:
|
|
|
198
210
|
└───────────────────┘
|
|
199
211
|
```
|
|
200
212
|
|
|
213
|
+
## Contributing
|
|
214
|
+
|
|
215
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
216
|
+
|
|
217
|
+
1. Fork the repository
|
|
218
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
219
|
+
3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
|
|
220
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
221
|
+
5. Open a Pull Request
|
|
222
|
+
|
|
223
|
+
## Issues
|
|
224
|
+
|
|
225
|
+
If you encounter any issues or have questions, please open an issue on the [GitHub repository](https://github.com/tenriajeng/atlas-mcp/issues).
|
|
226
|
+
|
|
201
227
|
## License
|
|
202
228
|
|
|
203
229
|
MIT License
|
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
|
-
|
|
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
|
-
|
|
2064
|
-
if (a.
|
|
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
|
-
|
|
12594
|
-
if (params?.
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/node": "^20.0.0",
|
|
50
|
-
"esbuild": "^0.
|
|
50
|
+
"esbuild": "^0.28.1",
|
|
51
51
|
"tsx": "^4.0.0",
|
|
52
52
|
"typescript": "^5.0.0",
|
|
53
|
-
"vitest": "^1.
|
|
53
|
+
"vitest": "^4.1.10"
|
|
54
54
|
}
|
|
55
55
|
}
|