This extension is a zero-config MCP server for Lmaobox Lua inside VS Code. It installs the runtime automatically, registers the MCP server, and exposes Lmaobox tools in Copilot Chat and other MCP-capable clients.
Quick Start
- Install the extension from the VS Code Marketplace.
- Wait a few seconds after VS Code startup. The extension activates on startup and installs/configures the MCP runtime automatically.
- Open Copilot Chat and use MCP tools. No manual server install is required in the normal case.
If auto-setup did not run, use this one-command fallback:
- Run
Lmaobox Context: Install Or Update Runtimefrom the Command Palette.
If you use Cursor/Windsurf/Claude and want to force external config sync, run:
Lmaobox Context: Sync External MCP Configs
You can also ask your AI assistant to do setup for you with this prompt:
Run "Lmaobox Context: Install Or Update Runtime", then run "Lmaobox Context: Sync External MCP Configs", then confirm Lmaobox Context MCP tools are available.
What it does
- Downloads the runtime archive matching the extension version from GitHub Releases.
- Verifies the archive with the published
checksums.txtfile. - Extracts the server binary plus
smart_context,types, and bundled automation assets into the extension runtime folder. - Writes the
modelContextProtocol.servers.lmaobox-contextentry into user settings.
The goal is "install extension and it just works": runtime download, MCP registration, and docs/types availability are handled by the extension.
Lua Language Server Requirement
This extension requires a Lua language server extension and attempts to install it automatically during setup.
- If
sumneko.luais already installed, setup proceeds immediately. - If it is missing, the extension requests installation automatically.
- If installation cannot complete (offline policy/store issue), MCP still starts, but Lua lint diagnostics may be reduced until a Lua language server extension is available.
MCP is configured with --prefer-lua-ls, so the Lua language server is the primary lint/diagnostic source for predictable workspace-aware checks.
Included Lua Snippets
The extension also ships first-party Lua snippets for common Lmaobox scripting patterns, including:
- callback registration templates
- local player guards
- common client, draw, and trace helpers
Start typing prefixes such as lm.createMove, lm.draw, lm.localPlayer, or lm.traceLine in a Lua file.
Expected release assets
The extension expects these files on the GitHub release matching the extension version tag:
lmaobox-context-runtime_windows_amd64.ziplmaobox-context-runtime_linux_amd64.ziplmaobox-context-runtime_linux_arm64.ziplmaobox-context-runtime_darwin_amd64.ziplmaobox-context-runtime_darwin_arm64.zipchecksums.txt
Publishing
- Update this extension
versionto match the Go runtime release tag without the leadingv. - Publish the GitHub tag so
.github/workflows/release.ymlproduces the runtime archives. - Package or publish this extension to the VS Code Marketplace.
Commands
Lmaobox Context: Install Or Update RuntimeLmaobox Context: Sync External MCP ConfigsLmaobox Context: Open Runtime FolderLmaobox Context: Open Bundled Docs Folder
Configuration
lmaoboxContext.autoConfigureMcp(default:true) : Automatically writes/updates the MCP server entry in VS Code user settings.lmaoboxContext.releaseTag(default: empty) : Override runtime tag. Empty meansv<extension-version>.lmaoboxContext.repoOwner/lmaoboxContext.repoName: Override GitHub source for runtime release assets.
Troubleshooting
If MCP does not start or tools are missing:
- Run
Lmaobox Context: Install Or Update Runtime. - Run
Lmaobox Context: Sync External MCP Configs(for Cursor/Windsurf/Claude). - Run
Lmaobox Context: Open Runtime Folderand verify files exist: :lmaobox-context-server(.exe),types, andsmart_context. - Open VS Code settings JSON and verify:
:
modelContextProtocol.servers.lmaobox-contextexists and points to the runtime executable. - Restart the editor after reinstall.
If GitHub release assets are unavailable for your version, set lmaoboxContext.releaseTag temporarily to a valid tag.
Notes On Snippets
This extension includes first-party snippets maintained with the MCP/runtime integration. It does not bundle third-party snippet packs.