Luigi's picture
Initial commit: Complete RTS project with MCP evaluation
551ad28
|
raw
history blame
1.26 kB

๐Ÿ“š Examples

This directory contains example scripts demonstrating various features of the RTS game.

๐Ÿค– MCP Integration Examples

mcp_client_example.py

Demonstrates how to connect to the RTS game MCP server and interact with the game programmatically.

python examples/mcp_client_example.py

This example shows:

  • How to connect to the MCP server
  • Available commands for interacting with the game
  • How to use the MCP integration with AI clients like Claude

mcp_connection_test.py

A simple test script that demonstrates how to connect to the MCP server and shows available tools and resources.

python examples/mcp_connection_test.py

This example shows:

  • How to import and create an MCP server instance
  • Available tools and resources
  • Basic connection information

Usage

To use the MCP integration:

  1. Start the game server:

    python start.py
    
  2. Start the MCP server:

    python mcp_server.py
    
  3. Connect an AI client to the MCP server at localhost:8001

The AI client will be able to:

  • Retrieve the current game state
  • Get tactical analysis from the built-in AI
  • Perform actions in the game (move units, attack, build structures)
  • Access game documentation and rules