@lzimul/minecraft-mcp 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +163 -2
- package/SECURITY.md +21 -0
- package/build/app/server.js +10 -0
- package/build/config/dimensions.js +27 -0
- package/build/config/server-info.js +25 -0
- package/build/config/storage.js +15 -0
- package/build/config/world-limits.js +7 -0
- package/build/data/blocks.js +17532 -0
- package/build/data/items.js +11194 -0
- package/build/data/version.js +1 -0
- package/build/enums/bounding-box.enum.js +5 -0
- package/build/enums/dimension-type.enum.js +6 -0
- package/build/enums/icon-theme.enum.js +5 -0
- package/build/index.js +47 -0
- package/build/interfaces/block-states.interface.js +1 -0
- package/build/interfaces/block.interface.js +1 -0
- package/build/interfaces/data-entry.interface.js +1 -0
- package/build/interfaces/dimension.interface.js +1 -0
- package/build/interfaces/item.interface.js +1 -0
- package/build/interfaces/placed-block.interface.js +1 -0
- package/build/interfaces/world-store.interface.js +1 -0
- package/build/resources/block-resources.js +17 -0
- package/build/resources/data-resources.js +55 -0
- package/build/resources/dimension-resources.js +70 -0
- package/build/resources/error-content.js +12 -0
- package/build/resources/index.js +9 -0
- package/build/resources/item-resources.js +17 -0
- package/build/schemas/block-schema.js +27 -0
- package/build/schemas/coordinate-schema.js +12 -0
- package/build/schemas/dimension-schema.js +6 -0
- package/build/schemas/item-schema.js +28 -0
- package/build/tools/block-tools.js +145 -0
- package/build/tools/index.js +6 -0
- package/build/tools/item-tools.js +50 -0
- package/build/tools/result.js +11 -0
- package/build/utils/error-message.js +25 -0
- package/build/world/block-spec.js +74 -0
- package/build/world/block-states.js +43 -0
- package/build/world/simulated-dimension.js +129 -0
- package/build/world/stores/file-world-store.js +103 -0
- package/build/world/stores/index.js +9 -0
- package/build/world/stores/memory-world-store.js +14 -0
- package/build/world/stores/serialized-block.js +53 -0
- package/build/world/world.js +39 -0
- package/lib/app/server.d.ts +4 -0
- package/lib/app/server.d.ts.map +1 -0
- package/lib/config/dimensions.d.ts +3 -0
- package/lib/config/dimensions.d.ts.map +1 -0
- package/lib/config/server-info.d.ts +15 -0
- package/lib/config/server-info.d.ts.map +1 -0
- package/lib/config/storage.d.ts +8 -0
- package/lib/config/storage.d.ts.map +1 -0
- package/lib/config/world-limits.d.ts +8 -0
- package/lib/config/world-limits.d.ts.map +1 -0
- package/lib/data/blocks.d.ts +5 -0
- package/lib/data/blocks.d.ts.map +1 -0
- package/lib/data/items.d.ts +5 -0
- package/lib/data/items.d.ts.map +1 -0
- package/lib/data/version.d.ts +2 -0
- package/lib/data/version.d.ts.map +1 -0
- package/lib/enums/bounding-box.enum.d.ts +5 -0
- package/lib/enums/bounding-box.enum.d.ts.map +1 -0
- package/lib/enums/dimension-type.enum.d.ts +6 -0
- package/lib/enums/dimension-type.enum.d.ts.map +1 -0
- package/lib/enums/icon-theme.enum.d.ts +5 -0
- package/lib/enums/icon-theme.enum.d.ts.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/interfaces/block-states.interface.d.ts +2 -0
- package/lib/interfaces/block-states.interface.d.ts.map +1 -0
- package/lib/interfaces/block.interface.d.ts +14 -0
- package/lib/interfaces/block.interface.d.ts.map +1 -0
- package/lib/interfaces/data-entry.interface.d.ts +7 -0
- package/lib/interfaces/data-entry.interface.d.ts.map +1 -0
- package/lib/interfaces/dimension.interface.d.ts +10 -0
- package/lib/interfaces/dimension.interface.d.ts.map +1 -0
- package/lib/interfaces/item.interface.d.ts +8 -0
- package/lib/interfaces/item.interface.d.ts.map +1 -0
- package/lib/interfaces/placed-block.interface.d.ts +10 -0
- package/lib/interfaces/placed-block.interface.d.ts.map +1 -0
- package/lib/interfaces/world-store.interface.d.ts +7 -0
- package/lib/interfaces/world-store.interface.d.ts.map +1 -0
- package/lib/resources/block-resources.d.ts +3 -0
- package/lib/resources/block-resources.d.ts.map +1 -0
- package/lib/resources/data-resources.d.ts +15 -0
- package/lib/resources/data-resources.d.ts.map +1 -0
- package/lib/resources/dimension-resources.d.ts +5 -0
- package/lib/resources/dimension-resources.d.ts.map +1 -0
- package/lib/resources/error-content.d.ts +8 -0
- package/lib/resources/error-content.d.ts.map +1 -0
- package/lib/resources/index.d.ts +4 -0
- package/lib/resources/index.d.ts.map +1 -0
- package/lib/resources/item-resources.d.ts +3 -0
- package/lib/resources/item-resources.d.ts.map +1 -0
- package/lib/schemas/block-schema.d.ts +17 -0
- package/lib/schemas/block-schema.d.ts.map +1 -0
- package/lib/schemas/coordinate-schema.d.ts +4 -0
- package/lib/schemas/coordinate-schema.d.ts.map +1 -0
- package/lib/schemas/dimension-schema.d.ts +5 -0
- package/lib/schemas/dimension-schema.d.ts.map +1 -0
- package/lib/schemas/item-schema.d.ts +14 -0
- package/lib/schemas/item-schema.d.ts.map +1 -0
- package/lib/tools/block-tools.d.ts +4 -0
- package/lib/tools/block-tools.d.ts.map +1 -0
- package/lib/tools/index.d.ts +4 -0
- package/lib/tools/index.d.ts.map +1 -0
- package/lib/tools/item-tools.d.ts +3 -0
- package/lib/tools/item-tools.d.ts.map +1 -0
- package/lib/tools/result.d.ts +14 -0
- package/lib/tools/result.d.ts.map +1 -0
- package/lib/utils/error-message.d.ts +2 -0
- package/lib/utils/error-message.d.ts.map +1 -0
- package/lib/world/block-spec.d.ts +12 -0
- package/lib/world/block-spec.d.ts.map +1 -0
- package/lib/world/block-states.d.ts +8 -0
- package/lib/world/block-states.d.ts.map +1 -0
- package/lib/world/simulated-dimension.d.ts +27 -0
- package/lib/world/simulated-dimension.d.ts.map +1 -0
- package/lib/world/stores/file-world-store.d.ts +14 -0
- package/lib/world/stores/file-world-store.d.ts.map +1 -0
- package/lib/world/stores/index.d.ts +3 -0
- package/lib/world/stores/index.d.ts.map +1 -0
- package/lib/world/stores/memory-world-store.d.ts +9 -0
- package/lib/world/stores/memory-world-store.d.ts.map +1 -0
- package/lib/world/stores/serialized-block.d.ts +12 -0
- package/lib/world/stores/serialized-block.d.ts.map +1 -0
- package/lib/world/world.d.ts +13 -0
- package/lib/world/world.d.ts.map +1 -0
- package/package.json +107 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) [2020-2030] [lZiMUl]
|
|
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
CHANGED
|
@@ -1,3 +1,164 @@
|
|
|
1
|
-
#
|
|
1
|
+
# lZiMUl Minecraft MCP
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Minecraft Model Context Protocol (MCP) server. It exposes the complete Minecraft registry (Java Edition data) as MCP resources and provides tools to read and write blocks in persisted, per-dimension worlds. Requires Node.js 22 or newer.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- All Minecraft blocks and items exposed as MCP resources with full properties (name, hardness, blast resistance, durability, enchantment categories, light level, collision box, and more)
|
|
8
|
+
- Block lookup and placement tools backed by simulated dimensions (Overworld, The Nether, The End), each with its own isolated world state and height range
|
|
9
|
+
- Block states are supported everywhere: `minecraft:oak_stairs[facing=south,half=bottom]`
|
|
10
|
+
- World state is persisted per dimension as JSON and survives restarts
|
|
11
|
+
- Structured tool output (`outputSchema` / `structuredContent`) plus human readable text
|
|
12
|
+
- Every failure path returns a readable message instead of an unhandled exception
|
|
13
|
+
- Tool annotations for safe client automation
|
|
14
|
+
|
|
15
|
+
## Tools
|
|
16
|
+
|
|
17
|
+
| Tool | Description |
|
|
18
|
+
| ---------- | -------------------------------------------------------------------------------------- |
|
|
19
|
+
| `getBlock` | Get the block (and its states) at coordinates in a dimension (defaults to `overworld`) |
|
|
20
|
+
| `setBlock` | Place a block with optional states in a dimension and return the replaced block |
|
|
21
|
+
| `getItem` | Look up item properties by id (`minecraft:diamond_sword` or `diamond_sword`) |
|
|
22
|
+
|
|
23
|
+
`setBlock` accepts both the full form (`minecraft:oak_stairs[facing=south,half=bottom]`) and the short form (`oak_stairs[facing=south]`). Setting `minecraft:air` removes the block; air cannot carry states.
|
|
24
|
+
|
|
25
|
+
## Persistence
|
|
26
|
+
|
|
27
|
+
World snapshots are stored as one JSON document per dimension, so the dimensions never share a file:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
world-data/
|
|
31
|
+
overworld.json
|
|
32
|
+
the_nether.json
|
|
33
|
+
the_end.json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Each snapshot looks like this:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"format": "lzimul-world/2",
|
|
41
|
+
"dimension": "minecraft:overworld",
|
|
42
|
+
"updatedAt": "2026-01-01T00:00:00.000Z",
|
|
43
|
+
"modifiedBlockCount": 1,
|
|
44
|
+
"blocks": [
|
|
45
|
+
{
|
|
46
|
+
"x": 0,
|
|
47
|
+
"y": 64,
|
|
48
|
+
"z": 0,
|
|
49
|
+
"block": "minecraft:oak_stairs",
|
|
50
|
+
"states": { "facing": "south", "half": "bottom" }
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
- The whole dimension is loaded once at startup and kept in memory; mutations are written back debounced and atomically (temporary file + rename).
|
|
57
|
+
- `setBlock` awaits the write, so a successful response means the block is durably stored. If persisting fails the tool returns an error instead of pretending success.
|
|
58
|
+
- Parallel tool calls share a single in-flight snapshot write instead of writing one full file per call, so building with many simultaneous `setBlock` calls stays fast.
|
|
59
|
+
- Unmodified coordinates are air; only placed blocks are stored. Placing air removes the coordinate from the snapshot.
|
|
60
|
+
- Empty state maps are omitted from the file to keep snapshots small.
|
|
61
|
+
- Snapshots are written as compact JSON (about half the bytes of pretty-printed JSON) with a trailing newline.
|
|
62
|
+
- Files written by format v1 (`lzimul-world/1`, no states) still load; new files use `lzimul-world/2`.
|
|
63
|
+
- A dimension file is created on its first write; untouched dimensions stay empty.
|
|
64
|
+
|
|
65
|
+
### Configuration
|
|
66
|
+
|
|
67
|
+
| Variable | Default | Description |
|
|
68
|
+
| ------------------- | -------------- | ------------------------------------------------------ |
|
|
69
|
+
| `MCP_WORLD_STORAGE` | `file` | `file` for JSON snapshots, `memory` for volatile state |
|
|
70
|
+
| `MCP_WORLD_DIR` | `./world-data` | Directory that holds the per-dimension snapshots |
|
|
71
|
+
|
|
72
|
+
A corrupt or oversized snapshot is moved aside as `<dimension>.json.corrupt-<uuid>` and the dimension starts empty, so a bad file never blocks startup.
|
|
73
|
+
|
|
74
|
+
### Storage backends
|
|
75
|
+
|
|
76
|
+
State is accessed through `IWorldStore` (`src/interfaces/world-store.interface.ts`):
|
|
77
|
+
|
|
78
|
+
| Backend | Used by | Notes |
|
|
79
|
+
| ------------------ | ------------------- | ----------------------------------------------------- |
|
|
80
|
+
| `FileWorldStore` | stdio (`npm start`) | Atomic per-dimension JSON files under `MCP_WORLD_DIR` |
|
|
81
|
+
| `MemoryWorldStore` | tests, `memory` | Volatile; useful for throwaway sessions |
|
|
82
|
+
|
|
83
|
+
## Resources
|
|
84
|
+
|
|
85
|
+
| URI | Description |
|
|
86
|
+
| -------------------------------------- | ---------------------------------------------- |
|
|
87
|
+
| `lzimul://minecraft/blocks` | Block index |
|
|
88
|
+
| `lzimul://minecraft/blocks/{name}` | Single block properties |
|
|
89
|
+
| `lzimul://minecraft/items` | Item index |
|
|
90
|
+
| `lzimul://minecraft/items/{name}` | Single item properties |
|
|
91
|
+
| `lzimul://minecraft/dimensions` | Persisted dimension index with world state |
|
|
92
|
+
| `lzimul://minecraft/dimensions/{type}` | Single dimension state including placed blocks |
|
|
93
|
+
|
|
94
|
+
Placed blocks in the dimension resources include a `states` object. If a resource read fails, the server returns a JSON document with an `error` field instead of dropping the request.
|
|
95
|
+
|
|
96
|
+
## Security
|
|
97
|
+
|
|
98
|
+
- Tool input is validated with Zod: coordinates are bounded, dimensions come from an enum, and ids are limited in length.
|
|
99
|
+
- Block ids are resolved against the generated registry; unknown blocks and namespaces are rejected.
|
|
100
|
+
- State names and values are restricted to `[a-z0-9_]` / `[a-z0-9_.-]`, 64 characters each, and reserved keys (`__proto__`, `constructor`, `prototype`) are rejected to rule out prototype pollution.
|
|
101
|
+
- Each dimension holds at most 250,000 modified blocks, and the file store refuses snapshots over 128 MiB.
|
|
102
|
+
- Snapshot writes are atomic, corrupt files are quarantined with a UUID suffix, and malformed blocks are skipped while the rest of the world loads.
|
|
103
|
+
- Run `npm audit` after dependency changes. The dependency tree currently reports no vulnerabilities; the `katex` override keeps the markdown lint toolchain patched.
|
|
104
|
+
|
|
105
|
+
## Performance
|
|
106
|
+
|
|
107
|
+
Measured on Node.js 26 (results vary by hardware):
|
|
108
|
+
|
|
109
|
+
- Startup, including registry import and 2,686 resource registrations: about 0.4 s.
|
|
110
|
+
- 300 concurrent `setBlock` tool calls: about 70 ms end-to-end, because parallel flushes share in-flight snapshot writes instead of writing the file 300 times.
|
|
111
|
+
- 20,000 persisted blocks: about 1.1 MiB of compact JSON, ~25 ms to save and ~24 ms to load.
|
|
112
|
+
- In-memory reads and writes are O(1) map operations; only the debounced snapshot write is proportional to the number of modified blocks.
|
|
113
|
+
|
|
114
|
+
## Project Structure
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
src/
|
|
118
|
+
index.ts Entry point
|
|
119
|
+
app/ Server assembly
|
|
120
|
+
config/ Server metadata, dimensions, storage, world limits
|
|
121
|
+
data/ Generated registry data (blocks, items, version)
|
|
122
|
+
enums/ Enumerations (EBoundingBox, EIconTheme, EDimensionType)
|
|
123
|
+
interfaces/ Interfaces (IBlock, IItem, IDimension, IPlacedBlock, IDataEntry, IWorldStore)
|
|
124
|
+
resources/ Resource registration and error fallbacks
|
|
125
|
+
schemas/ Zod schemas and converters
|
|
126
|
+
tools/ Tool registration and error handling
|
|
127
|
+
utils/ Shared helpers (error messages)
|
|
128
|
+
world/ Simulated dimension world state
|
|
129
|
+
stores/ IWorldStore implementations (file, memory)
|
|
130
|
+
scripts/
|
|
131
|
+
generate-data.mjs Regenerates src/data from minecraft-data
|
|
132
|
+
smoke-test.mjs End-to-end smoke test (including states)
|
|
133
|
+
persistence-test.mjs Restart test for the world snapshots
|
|
134
|
+
error-test.mjs Error fallbacks, sanitizing and storage limit tests
|
|
135
|
+
stress-test.mjs Parallel write, coalescing and restart stress test
|
|
136
|
+
clean.mjs Removes build output
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Scripts
|
|
140
|
+
|
|
141
|
+
| Command | Description |
|
|
142
|
+
| ----------------------- | ----------------------------------------------------- |
|
|
143
|
+
| `npm run build` | Lint, compile and generate docs |
|
|
144
|
+
| `npm run dev` | Build then start the server |
|
|
145
|
+
| `npm start` | Start the server (stdio) |
|
|
146
|
+
| `npm test` | Run the smoke, persistence, security and stress tests |
|
|
147
|
+
| `npm run test:stress` | Run only the parallel write stress test |
|
|
148
|
+
| `npm run generate-data` | Regenerate registry data (see below) |
|
|
149
|
+
| `npm run clean` | Remove build output |
|
|
150
|
+
| `npm run lint` | Lint and auto-fix |
|
|
151
|
+
|
|
152
|
+
## Data
|
|
153
|
+
|
|
154
|
+
Registry data is generated from [PrismarineJS/minecraft-data](https://github.com/PrismarineJS/minecraft-data). To regenerate for a specific version:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
node scripts/generate-data.mjs <version> [blocks.json] [items.json]
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
When local JSON files are provided they are used directly, otherwise the data is fetched from GitHub. The data version is exported as `MINECRAFT_DATA_VERSION` and used in all descriptions.
|
|
161
|
+
|
|
162
|
+
## License
|
|
163
|
+
|
|
164
|
+
MIT
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
Use this section to tell people about which versions of your project are
|
|
6
|
+
currently being supported with security updates.
|
|
7
|
+
|
|
8
|
+
| Version | Supported |
|
|
9
|
+
|---------|--------------------|
|
|
10
|
+
| 5.1.x | :white_check_mark: |
|
|
11
|
+
| 5.0.x | :x: |
|
|
12
|
+
| 4.0.x | :white_check_mark: |
|
|
13
|
+
| < 4.0 | :x: |
|
|
14
|
+
|
|
15
|
+
## Reporting a Vulnerability
|
|
16
|
+
|
|
17
|
+
Use this section to tell people how to report a vulnerability.
|
|
18
|
+
|
|
19
|
+
Tell them where to go, how often they can expect to get an update on a
|
|
20
|
+
reported vulnerability, what to expect if the vulnerability is accepted or
|
|
21
|
+
declined, etc.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
+
import { SERVER_INFO } from '../config/server-info.js';
|
|
3
|
+
import { registerResources } from '../resources/index.js';
|
|
4
|
+
import { registerTools } from '../tools/index.js';
|
|
5
|
+
export function createServer(world) {
|
|
6
|
+
const server = new McpServer(SERVER_INFO);
|
|
7
|
+
registerTools(server, world);
|
|
8
|
+
registerResources(server, world);
|
|
9
|
+
return server;
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EDimensionType } from '../enums/dimension-type.enum.js';
|
|
2
|
+
export const DIMENSIONS = [
|
|
3
|
+
{
|
|
4
|
+
key: 'minecraft:overworld',
|
|
5
|
+
type: EDimensionType.Overworld,
|
|
6
|
+
displayName: 'Overworld',
|
|
7
|
+
minY: -64,
|
|
8
|
+
maxY: 320,
|
|
9
|
+
hasSkylight: true
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
key: 'minecraft:the_nether',
|
|
13
|
+
type: EDimensionType.TheNether,
|
|
14
|
+
displayName: 'The Nether',
|
|
15
|
+
minY: 0,
|
|
16
|
+
maxY: 256,
|
|
17
|
+
hasSkylight: false
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
key: 'minecraft:the_end',
|
|
21
|
+
type: EDimensionType.TheEnd,
|
|
22
|
+
displayName: 'The End',
|
|
23
|
+
minY: 0,
|
|
24
|
+
maxY: 256,
|
|
25
|
+
hasSkylight: false
|
|
26
|
+
}
|
|
27
|
+
];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MINECRAFT_BLOCK_COUNT } from '../data/blocks.js';
|
|
2
|
+
import { MINECRAFT_ITEM_COUNT } from '../data/items.js';
|
|
3
|
+
import { MINECRAFT_DATA_VERSION } from '../data/version.js';
|
|
4
|
+
import { EIconTheme } from '../enums/icon-theme.enum.js';
|
|
5
|
+
export const SERVER_INFO = {
|
|
6
|
+
name: 'lzimul',
|
|
7
|
+
title: 'lZiMUl Minecraft MCP',
|
|
8
|
+
description: `Minecraft Model Context Protocol server (Java Edition ${MINECRAFT_DATA_VERSION}): exposes all ${MINECRAFT_BLOCK_COUNT} blocks and ${MINECRAFT_ITEM_COUNT} items with their properties (name, hardness, blast resistance, durability, enchantment categories, etc.) as resources, plus tools to get and place blocks and look up items.`,
|
|
9
|
+
version: '1.0.1',
|
|
10
|
+
websiteUrl: 'https://mcp.lzimul.com/lZiMUl',
|
|
11
|
+
icons: [
|
|
12
|
+
{
|
|
13
|
+
src: 'https://i1.hdslb.com/bfs/face/79fbb5635ff6e50fe2699c518af82162523e5f08.jpg',
|
|
14
|
+
mimeType: 'image/jpeg',
|
|
15
|
+
sizes: ['48x48', '96x96', '192x192'],
|
|
16
|
+
theme: EIconTheme.Light
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
src: 'https://i1.hdslb.com/bfs/face/79fbb5635ff6e50fe2699c518af82162523e5f08.jpg',
|
|
20
|
+
mimeType: 'image/jpeg',
|
|
21
|
+
sizes: ['48x48', '96x96', '192x192'],
|
|
22
|
+
theme: EIconTheme.Dark
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
function storageKind() {
|
|
3
|
+
return process.env.MCP_WORLD_STORAGE?.trim().toLowerCase() === 'memory'
|
|
4
|
+
? 'memory'
|
|
5
|
+
: 'file';
|
|
6
|
+
}
|
|
7
|
+
function storageDirectory() {
|
|
8
|
+
const configured = process.env.MCP_WORLD_DIR?.trim();
|
|
9
|
+
return path.resolve(configured && configured.length > 0 ? configured : './world-data');
|
|
10
|
+
}
|
|
11
|
+
export const WORLD_STORAGE = {
|
|
12
|
+
kind: storageKind(),
|
|
13
|
+
directory: storageDirectory(),
|
|
14
|
+
writeDelayMs: 25
|
|
15
|
+
};
|