sevenfifty777/MCP-DCS-LuaRunner-vercel
3.1
If you are the rightful owner of MCP-DCS-LuaRunner-vercel and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
Vercel-compatible MCP server for executing Lua code on a DCS server via HTTP.
MCP-DCS-LuaRunner-vercel
Vercel-compatible MCP server for executing Lua code on a DCS server via HTTP.
Features
- HTTP endpoint
/api/execute-luafor remote Lua code execution on DCS World. - Designed for deployment on Vercel.
- Reads DCS server connection info from environment variables (not from local files).
Installation & Deployment
1. Clone the repository
git clone https://github.com/sevenfifty777/MCP-DCS-LuaRunner-vercel.git
cd MCP-DCS-LuaRunner-vercel/mcp-server-vercel
2. Install dependencies (for local development)
npm install
3. Set up environment variables
On Vercel, set these in the dashboard under Project > Settings > Environment Variables:
DCS_SERVER_ADDRESS(e.g.,127.0.0.1)DCS_SERVER_PORT(e.g.,12080)DCS_SERVER_ADDRESS_GUI(optional)DCS_SERVER_PORT_GUI(optional)DCS_USE_HTTPS(trueorfalse)DCS_WEB_AUTH_USERNAME(if needed)DCS_WEB_AUTH_PASSWORD(if needed)DCS_RUN_CODE_LOCALLY(trueorfalse)DCS_RUN_IN_MISSION_ENV(trueorfalse)DCS_RETURN_DISPLAY_FORMAT(optional, e.g.,lua)
Note: Do not use local file paths for configuration on Vercel.
4. Deploy to Vercel
Step-by-step Vercel deployment:
- Go to Vercel and sign in or create an account.
- Click "Add New Project" and select "Import Git Repository".
- Choose your GitHub account and select the
MCP-DCS-LuaRunner-vercelrepository. - When prompted, set the Root Directory to
mcp-server-vercel. - In the "Environment Variables" section, add the required DCS connection variables (see above).
- Click "Deploy" to start the build and deployment process.
- After deployment, your endpoint will be available at
https://<your-vercel-project>.vercel.app/api/execute-lua
- Vercel will auto-detect the serverless function and deploy
/api/execute-lua.
Usage
Send a POST request to your deployed endpoint:
POST /api/execute-lua
Content-Type: application/json
{
"code": "<your Lua code here>"
}
Response:
- On success:
{ "result": ... } - On error:
{ "error": ... }
Local Development
You can run the server locally using Vercel CLI:
npm install -g vercel
vercel dev
Then POST to http://localhost:3000/api/execute-lua.
License
MIT