leekwars-mcp
MCP server for LeekWars game enabling AI management, fight operations, item handling, and real-time socket communication via authenticated session.
README
leekwars-mcp
Standard TypeScript MCP server scaffold.
Structure
src/index.ts- entrypointsrc/auth/- MCP-owned LeekWars session handlingsrc/server/- server bootstrap and request routingsrc/tools/- manifest-driven tool definitions and registrysrc/tools/{core,auth,leek,fight,ai,items,reports}/- tool manifests grouped by domainsrc/resources/- resource definitionssrc/prompts/- prompt definitionssrc/config/- runtime configsrc/common/- shared types/helperssrc/scripts/- subprocess bridge for vendored LeekWars scriptssrc/tools/_shared/- vendored script helpers and shared assets
Auth
The server now owns the LeekWars session.
Required env vars:
LEEKWARS_LOGINLEEKWARS_PASSWORD
Optional env vars:
LEEKWARS_AUTH_RETRY_DELAY_MSLEEKWARS_API_BASE_URLLEEKWARS_SCRIPTS_DIR(defaults tosrc/tools)LEEKWARS_SOCKET_URLLEEKWARS_SOCKET_PROTOCOLS(comma-separated)LEEKWARS_SOCKET_CONNECT_TIMEOUT_MSLEEKWARS_SOCKET_REQUEST_TIMEOUT_MSLEEKWARS_SOCKET_MAX_BUFFERED_EVENTSMCP_SERVER_NAME
Tool registry
Tools are manifest-driven from src/tools/manifest.ts and executed through src/tools/registry.ts.
Tool output kinds:
json- stdout onlymarkdown- stdout onlytext- stdout + stderr formatting
Testing
npm test- smoke tests for manifest loading, output formatting, and representative tool executionnpm run check- typecheck onlynpm run build- compile todist/
Scripts
npm run dev- run in watch modenpm run start- run compiled server
Fight logs
fetch_fight_logs uses Playwright. If the browser binary is missing, install it with:
npx playwright install chromium
Socket bridge
The socket bridge connects to wss://leekwars.com/ws by default (override with LEEKWARS_SOCKET_URL) and uses the LeekWars session auth headers. It exposes bridge tools:
socket_connectsocket_statussocket_sendsocket_callsocket_recvsocket_close
Encyclopedia tools
Encyclopedia search and page retrieval live in the separate leekwars-mcp-encyclopedia server.
Configure both MCP servers if you need both game actions and encyclopedia knowledge tools.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.