@lzimul/minecraft-mcp 0.0.0-stage → 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.
Files changed (97) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +74 -2
  3. package/SECURITY.md +21 -0
  4. package/build/app/server.js +10 -0
  5. package/build/config/dimensions.js +27 -0
  6. package/build/config/server-info.js +25 -0
  7. package/build/config/world-limits.js +6 -0
  8. package/build/data/blocks.js +17532 -0
  9. package/build/data/items.js +11194 -0
  10. package/build/data/version.js +1 -0
  11. package/build/enums/bounding-box.enum.js +5 -0
  12. package/build/enums/dimension-type.enum.js +6 -0
  13. package/build/enums/icon-theme.enum.js +5 -0
  14. package/build/index.js +4 -0
  15. package/build/interfaces/block.interface.js +1 -0
  16. package/build/interfaces/data-entry.interface.js +1 -0
  17. package/build/interfaces/dimension.interface.js +1 -0
  18. package/build/interfaces/item.interface.js +1 -0
  19. package/build/interfaces/placed-block.interface.js +1 -0
  20. package/build/resources/block-resources.js +17 -0
  21. package/build/resources/data-resources.js +40 -0
  22. package/build/resources/dimension-resources.js +54 -0
  23. package/build/resources/index.js +9 -0
  24. package/build/resources/item-resources.js +17 -0
  25. package/build/schemas/block-schema.js +27 -0
  26. package/build/schemas/coordinate-schema.js +12 -0
  27. package/build/schemas/dimension-schema.js +6 -0
  28. package/build/schemas/item-schema.js +28 -0
  29. package/build/tools/block-tools.js +108 -0
  30. package/build/tools/index.js +6 -0
  31. package/build/tools/item-tools.js +43 -0
  32. package/build/tools/result.js +11 -0
  33. package/build/world/simulated-dimension.js +36 -0
  34. package/build/world/world-state.js +16 -0
  35. package/lib/app/server.d.ts +3 -0
  36. package/lib/app/server.d.ts.map +1 -0
  37. package/lib/config/dimensions.d.ts +3 -0
  38. package/lib/config/dimensions.d.ts.map +1 -0
  39. package/lib/config/server-info.d.ts +15 -0
  40. package/lib/config/server-info.d.ts.map +1 -0
  41. package/lib/config/world-limits.d.ts +7 -0
  42. package/lib/config/world-limits.d.ts.map +1 -0
  43. package/lib/data/blocks.d.ts +5 -0
  44. package/lib/data/blocks.d.ts.map +1 -0
  45. package/lib/data/items.d.ts +5 -0
  46. package/lib/data/items.d.ts.map +1 -0
  47. package/lib/data/version.d.ts +2 -0
  48. package/lib/data/version.d.ts.map +1 -0
  49. package/lib/enums/bounding-box.enum.d.ts +5 -0
  50. package/lib/enums/bounding-box.enum.d.ts.map +1 -0
  51. package/lib/enums/dimension-type.enum.d.ts +6 -0
  52. package/lib/enums/dimension-type.enum.d.ts.map +1 -0
  53. package/lib/enums/icon-theme.enum.d.ts +5 -0
  54. package/lib/enums/icon-theme.enum.d.ts.map +1 -0
  55. package/lib/index.d.ts +3 -0
  56. package/lib/index.d.ts.map +1 -0
  57. package/lib/interfaces/block.interface.d.ts +14 -0
  58. package/lib/interfaces/block.interface.d.ts.map +1 -0
  59. package/lib/interfaces/data-entry.interface.d.ts +7 -0
  60. package/lib/interfaces/data-entry.interface.d.ts.map +1 -0
  61. package/lib/interfaces/dimension.interface.d.ts +10 -0
  62. package/lib/interfaces/dimension.interface.d.ts.map +1 -0
  63. package/lib/interfaces/item.interface.d.ts +8 -0
  64. package/lib/interfaces/item.interface.d.ts.map +1 -0
  65. package/lib/interfaces/placed-block.interface.d.ts +8 -0
  66. package/lib/interfaces/placed-block.interface.d.ts.map +1 -0
  67. package/lib/resources/block-resources.d.ts +3 -0
  68. package/lib/resources/block-resources.d.ts.map +1 -0
  69. package/lib/resources/data-resources.d.ts +21 -0
  70. package/lib/resources/data-resources.d.ts.map +1 -0
  71. package/lib/resources/dimension-resources.d.ts +4 -0
  72. package/lib/resources/dimension-resources.d.ts.map +1 -0
  73. package/lib/resources/index.d.ts +3 -0
  74. package/lib/resources/index.d.ts.map +1 -0
  75. package/lib/resources/item-resources.d.ts +3 -0
  76. package/lib/resources/item-resources.d.ts.map +1 -0
  77. package/lib/schemas/block-schema.d.ts +20 -0
  78. package/lib/schemas/block-schema.d.ts.map +1 -0
  79. package/lib/schemas/coordinate-schema.d.ts +4 -0
  80. package/lib/schemas/coordinate-schema.d.ts.map +1 -0
  81. package/lib/schemas/dimension-schema.d.ts +7 -0
  82. package/lib/schemas/dimension-schema.d.ts.map +1 -0
  83. package/lib/schemas/item-schema.d.ts +17 -0
  84. package/lib/schemas/item-schema.d.ts.map +1 -0
  85. package/lib/tools/block-tools.d.ts +3 -0
  86. package/lib/tools/block-tools.d.ts.map +1 -0
  87. package/lib/tools/index.d.ts +3 -0
  88. package/lib/tools/index.d.ts.map +1 -0
  89. package/lib/tools/item-tools.d.ts +3 -0
  90. package/lib/tools/item-tools.d.ts.map +1 -0
  91. package/lib/tools/result.d.ts +18 -0
  92. package/lib/tools/result.d.ts.map +1 -0
  93. package/lib/world/simulated-dimension.d.ts +14 -0
  94. package/lib/world/simulated-dimension.d.ts.map +1 -0
  95. package/lib/world/world-state.d.ts +6 -0
  96. package/lib/world/world-state.d.ts.map +1 -0
  97. package/package.json +103 -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,75 @@
1
- # Temporary Holding Version
1
+ # lZiMUl Minecraft MCP
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
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 simulated dimensions.
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
+ - Structured tool output (`outputSchema` / `structuredContent`) plus human readable text
10
+ - Tool annotations for safe client automation
11
+
12
+ ## Tools
13
+
14
+ | Tool | Description |
15
+ | --- | --- |
16
+ | `getBlock` | Get the block at coordinates in a dimension (defaults to `overworld`) |
17
+ | `setBlock` | Place a block at coordinates in a dimension and return the replaced block |
18
+ | `getItem` | Look up item properties by id (`minecraft:diamond_sword` or `diamond_sword`) |
19
+
20
+ ## Resources
21
+
22
+ | URI | Description |
23
+ | --- | --- |
24
+ | `lzimul://minecraft/blocks` | Block index |
25
+ | `lzimul://minecraft/blocks/{name}` | Single block properties |
26
+ | `lzimul://minecraft/items` | Item index |
27
+ | `lzimul://minecraft/items/{name}` | Single item properties |
28
+ | `lzimul://minecraft/dimensions` | Simulated dimension index with world state |
29
+ | `lzimul://minecraft/dimensions/{type}` | Single dimension state including placed blocks |
30
+
31
+ ## Project Structure
32
+
33
+ ```text
34
+ src/
35
+ index.ts Entry point
36
+ app/ Server assembly
37
+ config/ Server metadata, dimensions, world limits
38
+ data/ Generated registry data (blocks, items, version)
39
+ enums/ Enumerations (EBoundingBox, EIconTheme, EDimensionType)
40
+ interfaces/ Interfaces (IBlock, IItem, IDimension, IPlacedBlock, IDataEntry)
41
+ resources/ Resource registration
42
+ schemas/ Zod schemas and converters
43
+ tools/ Tool registration
44
+ world/ Simulated dimension world state
45
+ scripts/
46
+ generate-data.mjs Regenerates src/data from minecraft-data
47
+ smoke-test.mjs End-to-end smoke test
48
+ clean.mjs Removes build output
49
+ ```
50
+
51
+ ## Scripts
52
+
53
+ | Command | Description |
54
+ | --- | --- |
55
+ | `npm run build` | Lint, compile and generate API docs |
56
+ | `npm run dev` | Build then start the server |
57
+ | `npm start` | Start the server (stdio) |
58
+ | `npm test` | Run the end-to-end smoke test |
59
+ | `npm run generate-data` | Regenerate registry data (see below) |
60
+ | `npm run clean` | Remove build output |
61
+ | `npm run lint` | Lint and auto-fix |
62
+
63
+ ## Data
64
+
65
+ Registry data is generated from [PrismarineJS/minecraft-data](https://github.com/PrismarineJS/minecraft-data). To regenerate for a specific version:
66
+
67
+ ```bash
68
+ node scripts/generate-data.mjs <version> [blocks.json] [items.json]
69
+ ```
70
+
71
+ 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.
72
+
73
+ ## License
74
+
75
+ 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() {
6
+ const server = new McpServer(SERVER_INFO);
7
+ registerTools(server);
8
+ registerResources(server);
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.0',
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,6 @@
1
+ export const WORLD_LIMITS = {
2
+ minHorizontal: -30000000,
3
+ maxHorizontal: 30000000,
4
+ minVertical: -64,
5
+ maxVertical: 320
6
+ };