mcp-optimizer
v0.0.3
Published
An MCP server that runs Lighthouse audits and enables LLMs to automatically optimize your code.
Maintainers
Readme
MCP Optimizer
A minimal scaffold that runs Lighthouse to produce performance reports. The project includes a placeholder fixer that can be extended to integrate an LLM for automatic code fixes.
Using with an MCP Host
This section provides an example of launching via an MCP host (stdio).
If you want to configure an MCP host to spawn the optimizer via npx, add a server entry like the following to your host config:
{
"mcpServers": {
"mcp-optimizer": {
"command": "npx",
"args": ["-y", "mcp-optimizer", "--","--port", "5000"]
}
}
}This will instruct the host to spawn npx -y mcp-optimizer -- --port 5000 and communicate with the child over stdio.
Or, if your MCP host can connect to a running optimizer over an SSE endpoint, configure the server with a URL instead:
{
"mcpServers": {
"mcp-optimizer": {
"url": "https://localhost:5000/sse"
}
}
}Quick start
- Install runtime dependencies:
npm install- Start the server (after building or in dev):
npm run build
npm start
# or for development:
npm run dev- Run an audit:
curl -X POST http://localhost:5000/audit -H "Content-Type: application/json" -d '{"url":"https://example.com"}'