Revert "removed description from server"

This reverts commit a2a28b949c.
This commit is contained in:
ahujasid 2025-08-02 18:09:25 -07:00
parent a2a28b949c
commit 0bc765544e
2 changed files with 13 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[project] [project]
name = "blender-mcp" name = "blender-mcp"
version = "1.2.2" version = "1.2"
description = "Blender integration through the Model Context Protocol" description = "Blender integration through the Model Context Protocol"
readme = "README.md" readme = "README.md"
requires-python = ">=3.10" requires-python = ">=3.10"

View File

@ -163,10 +163,21 @@ class BlenderConnection:
@asynccontextmanager @asynccontextmanager
async def server_lifespan(server: FastMCP) -> AsyncIterator[Dict[str, Any]]: async def server_lifespan(server: FastMCP) -> AsyncIterator[Dict[str, Any]]:
"""Manage server startup and shutdown lifecycle""" """Manage server startup and shutdown lifecycle"""
# We don't need to create a connection here since we're using the global connection
# for resources and tools
try: try:
# Just log that we're starting up # Just log that we're starting up
logger.info("BlenderMCP server starting up") logger.info("BlenderMCP server starting up")
logger.info("Server will connect to Blender when tools are used")
# Try to connect to Blender on startup to verify it's available
try:
# This will initialize the global connection if needed
blender = get_blender_connection()
logger.info("Successfully connected to Blender on startup")
except Exception as e:
logger.warning(f"Could not connect to Blender on startup: {str(e)}")
logger.warning("Make sure the Blender addon is running before using Blender resources or tools")
# Return an empty context - we're using the global connection # Return an empty context - we're using the global connection
yield {} yield {}