@latellu/atlas-mcp 1.0.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 +203 -0
- package/dist/index.js +13276 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Latellu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Atlas MCP Server
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server for Atlas CMS — enables AI agents to manage content.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This MCP server exposes Atlas CMS content management operations as tools for AI agents (Claude, Cursor, etc.). It enables AI agents to:
|
|
8
|
+
|
|
9
|
+
- Discover workspace schema (content types, fields, locales)
|
|
10
|
+
- Read entries, pages, and media
|
|
11
|
+
- Create, update, publish, and delete content
|
|
12
|
+
- Upload media files from local filesystem
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
### Schema & Discovery
|
|
17
|
+
- `get_workspace_schema` — Get all content types, fields, and locales
|
|
18
|
+
- `list_content_types` — List all content types
|
|
19
|
+
- `get_content_type` — Get single content type with fields
|
|
20
|
+
|
|
21
|
+
### Entry Operations
|
|
22
|
+
- `list_entries` — List entries for a content type
|
|
23
|
+
- `get_entry` — Get single entry by slug
|
|
24
|
+
- `create_entry` — Create new draft entry
|
|
25
|
+
- `update_entry` — Update existing entry
|
|
26
|
+
- `delete_entry` — Delete entry
|
|
27
|
+
- `publish_entry` — Publish draft entry
|
|
28
|
+
- `unpublish_entry` — Unpublish published entry
|
|
29
|
+
- `archive_entry` — Archive entry
|
|
30
|
+
- `duplicate_entry` — Duplicate entry as new draft
|
|
31
|
+
|
|
32
|
+
### Page Operations
|
|
33
|
+
- `list_pages` — List all pages
|
|
34
|
+
- `get_page` — Get page with blocks and SEO
|
|
35
|
+
- `create_page` — Create new draft page
|
|
36
|
+
- `update_page` — Update page
|
|
37
|
+
- `delete_page` — Delete page
|
|
38
|
+
- `publish_page` — Publish page
|
|
39
|
+
|
|
40
|
+
### Media Operations
|
|
41
|
+
- `get_media` — Get media metadata by ID
|
|
42
|
+
- `upload_media` — Upload file from local path
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx @latellu/atlas-mcp
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Configuration
|
|
51
|
+
|
|
52
|
+
### Environment Variables
|
|
53
|
+
|
|
54
|
+
| Variable | Required | Description |
|
|
55
|
+
|----------|----------|-------------|
|
|
56
|
+
| `ATLAS_API_KEY` | Yes | Atlas API key (`atlas_live_*` for read-only, `atlas_mgmt_*` for full access) |
|
|
57
|
+
| `ATLAS_API_URL` | No | Atlas API base URL (default: `https://api.atlas.latellu.com`) |
|
|
58
|
+
| `MCP_ALLOWED_UPLOAD_PATHS` | No | Comma-separated list of allowed directories for media upload |
|
|
59
|
+
|
|
60
|
+
### Claude Desktop Configuration
|
|
61
|
+
|
|
62
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"mcpServers": {
|
|
67
|
+
"atlas": {
|
|
68
|
+
"command": "npx",
|
|
69
|
+
"args": ["-y", "@latellu/atlas-mcp"],
|
|
70
|
+
"env": {
|
|
71
|
+
"ATLAS_API_KEY": "atlas_mgmt_xxx...",
|
|
72
|
+
"MCP_ALLOWED_UPLOAD_PATHS": "/Users/you/Documents,/Users/you/Pictures"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Cursor Configuration
|
|
80
|
+
|
|
81
|
+
Add to `.cursor/mcp.json`:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"mcpServers": {
|
|
86
|
+
"atlas": {
|
|
87
|
+
"command": "npx",
|
|
88
|
+
"args": ["-y", "@latellu/atlas-mcp"],
|
|
89
|
+
"env": {
|
|
90
|
+
"ATLAS_API_KEY": "atlas_mgmt_xxx..."
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Usage Examples
|
|
98
|
+
|
|
99
|
+
### Schema Discovery
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
User: "What content types exist in this workspace?"
|
|
103
|
+
AI: → Calls get_workspace_schema
|
|
104
|
+
→ Returns list of content types with fields
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Content Creation
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
User: "Create a new article about AI"
|
|
111
|
+
AI: → Calls get_workspace_schema to understand article fields
|
|
112
|
+
→ Calls create_entry with article data
|
|
113
|
+
→ Returns created entry with slug
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Content Publishing
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
User: "Publish the article with slug 'ai-intro'"
|
|
120
|
+
AI: → Calls publish_entry with content_type='article', slug='ai-intro'
|
|
121
|
+
→ Returns published entry
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Media Upload
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
User: "Upload /Users/you/Pictures/tokyo.png as cover image"
|
|
128
|
+
AI: → Calls upload_media with file_path='/Users/you/Pictures/tokyo.png'
|
|
129
|
+
→ MCP server validates path against allowed directories
|
|
130
|
+
→ Uploads file to Atlas
|
|
131
|
+
→ Returns media ID and URL
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Security
|
|
135
|
+
|
|
136
|
+
### Permission Model
|
|
137
|
+
|
|
138
|
+
**Layer 1: API Key**
|
|
139
|
+
- `atlas_live_*` — Read-only access (delivery API)
|
|
140
|
+
- `atlas_mgmt_*` — Read-write access (management API)
|
|
141
|
+
|
|
142
|
+
**Layer 2: Filesystem Permission**
|
|
143
|
+
- Configurable via `MCP_ALLOWED_UPLOAD_PATHS` env var
|
|
144
|
+
- Path validation: only files within allowed directories can be uploaded
|
|
145
|
+
|
|
146
|
+
**Layer 3: File Validation**
|
|
147
|
+
- Max 10MB file size
|
|
148
|
+
- Allowed MIME types: `image/*`, `video/*`, `application/pdf`
|
|
149
|
+
|
|
150
|
+
### Best Practices
|
|
151
|
+
|
|
152
|
+
1. **Scope API keys**: Use minimal scopes required
|
|
153
|
+
2. **Restrict upload paths**: Only allow necessary directories
|
|
154
|
+
3. **Rotate keys**: Regularly rotate API keys
|
|
155
|
+
4. **Monitor usage**: Review MCP tool calls for suspicious activity
|
|
156
|
+
|
|
157
|
+
## Development
|
|
158
|
+
|
|
159
|
+
### Prerequisites
|
|
160
|
+
|
|
161
|
+
- Node.js 18+
|
|
162
|
+
- npm or yarn
|
|
163
|
+
|
|
164
|
+
### Build
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
npm run build
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Test
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
npm test
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Architecture
|
|
177
|
+
|
|
178
|
+
The MCP server connects to Atlas via REST API:
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
┌─────────────────────────────────────┐
|
|
182
|
+
│ MCP Client (AI) │
|
|
183
|
+
│ (Claude Desktop, Cursor, etc.) │
|
|
184
|
+
└──────────────────┬──────────────────┘
|
|
185
|
+
│
|
|
186
|
+
Stdio Transport
|
|
187
|
+
│
|
|
188
|
+
┌─────────▼─────────┐
|
|
189
|
+
│ MCP Server │
|
|
190
|
+
│ (TypeScript) │
|
|
191
|
+
└─────────┬─────────┘
|
|
192
|
+
│
|
|
193
|
+
REST API calls
|
|
194
|
+
│
|
|
195
|
+
┌─────────▼─────────┐
|
|
196
|
+
│ Atlas Backend │
|
|
197
|
+
│ (Go, Echo) │
|
|
198
|
+
└───────────────────┘
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## License
|
|
202
|
+
|
|
203
|
+
MIT License
|