Content
# LuaMCP
A simple Lua execution environment written for understanding MCP. All means of external interference are blocked to prevent any malicious activities [^jail].
## Tools
### EvalLuaCode
* `string code`
* `string? sessionId = null`
Executes the `code` and returns the result. You can store function definitions and other global variables for later use.
The `sessionId` is an identifier assigned to each Lua state. If omitted, a new independent state will be created with a unique `sessionId`.
Each state is not persistent and will be volatile upon the termination of the MCP server.
> [!NOTE]
> The `code` must be valid as a Lua chunk, so it should be structured like `return 1 + 1` or `do for k, _ in pairs(_G) do print(k) end end` (it usually does this without explicit instructions).
### ListGlobals
* `string? sessionId = null`
* `bool? includeMisc = false`
Returns a list of global variables in the state. You can choose not to display library tables, `_G`, `_VERSION`, etc.
## Notes
Prompt
```md
* Do not touch the workspace source code unless explicitly instructed.
* Respond in Japanese.
* Use Lua MCP as much as possible, especially following instructions like "calculate" or "store in a variable."
+ However, there may be times when you want to check the source code first without evaluating. Read the nuances and make appropriate judgments.
* Keep variables local unless instructed to define or store them as global.
+ The function that performs the instructed action can be defined globally without the local keyword.
+ Use immediately invoked function expressions as needed.
```
## Configuration
For Visual Studio Code
Enable `Chat › Mcp: Enabled` in the settings and add `LuaMCP` to your settings.json:
```json:settings.json
"mcp": {
"inputs": [],
"servers": {
"LuaMCP": {
"command": "path\\to\\LuaMCP.exe",
}
}
}
```
[^jail]: Around `#region limitations` in LuaEngine.cs
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.