Revert "removed description from server"
This reverts commit a2a28b949c.
This commit is contained in:
parent
a2a28b949c
commit
0bc765544e
@ -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"
|
||||||
|
|||||||
@ -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 {}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user