leekwars-mcp

leekwars-mcp

MCP server for LeekWars game enabling AI management, fight operations, item handling, and real-time socket communication via authenticated session.

Category
Visit Server

README

leekwars-mcp

Standard TypeScript MCP server scaffold.

Structure

  • src/index.ts - entrypoint
  • src/auth/ - MCP-owned LeekWars session handling
  • src/server/ - server bootstrap and request routing
  • src/tools/ - manifest-driven tool definitions and registry
  • src/tools/{core,auth,leek,fight,ai,items,reports}/ - tool manifests grouped by domain
  • src/resources/ - resource definitions
  • src/prompts/ - prompt definitions
  • src/config/ - runtime config
  • src/common/ - shared types/helpers
  • src/scripts/ - subprocess bridge for vendored LeekWars scripts
  • src/tools/_shared/ - vendored script helpers and shared assets

Auth

The server now owns the LeekWars session.

Required env vars:

  • LEEKWARS_LOGIN
  • LEEKWARS_PASSWORD

Optional env vars:

  • LEEKWARS_AUTH_RETRY_DELAY_MS
  • LEEKWARS_API_BASE_URL
  • LEEKWARS_SCRIPTS_DIR (defaults to src/tools)
  • LEEKWARS_SOCKET_URL
  • LEEKWARS_SOCKET_PROTOCOLS (comma-separated)
  • LEEKWARS_SOCKET_CONNECT_TIMEOUT_MS
  • LEEKWARS_SOCKET_REQUEST_TIMEOUT_MS
  • LEEKWARS_SOCKET_MAX_BUFFERED_EVENTS
  • MCP_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 only
  • markdown - stdout only
  • text - stdout + stderr formatting

Testing

  • npm test - smoke tests for manifest loading, output formatting, and representative tool execution
  • npm run check - typecheck only
  • npm run build - compile to dist/

Scripts

  • npm run dev - run in watch mode
  • npm 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_connect
  • socket_status
  • socket_send
  • socket_call
  • socket_recv
  • socket_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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured