From 62fea062a4c40dca058ded43c15cd192c8b990c5 Mon Sep 17 00:00:00 2001 From: Hemithermos Date: Fri, 30 Jan 2026 18:24:56 +0100 Subject: [PATCH] changed the mcp import to match the venv structure --- server.py | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/server.py b/server.py index 6d5c4c9..ce4e26e 100644 --- a/server.py +++ b/server.py @@ -9,7 +9,7 @@ from events.event import Event from typing import Any, Dict import logging import httpx -from mcp.server.fastmcp import FastMCP +from mcp.server import FastMCP import json import os @@ -373,27 +373,10 @@ async def add_event(location:str, initial_description:str, entity_list:list[str] -@mcp.tool() -async def save_game_state() -> str: - """Save the current game state to a persistent storage each time - the game state is modified.""" - logging.info("Saving game state") - with open("game_state.json", "w", encoding="utf-8") as f: - f.write(game.serialize()) - return "Game state saved to game_state.json" -@mcp.tool() -async def purge_game_history_and_state() -> str: - """Purge the game history and state files when the player is starting a new game.""" - if os.path.exists(HISTORY_FILE): - os.remove(HISTORY_FILE) - if os.path.exists("game_state.json"): - os.remove("game_state.json") - return "Game history and state purged." - def main(): # Initialize and run the server