anndata_mcp#
Submodules#
Package Contents#
- anndata_mcp.run_app(transport: str = 'stdio', port: int = 8000, hostname: str = '0.0.0.0', environment: EnvironmentType = EnvironmentType.DEVELOPMENT, version: bool = False, max_output_len: int = 1000, expose_file_system_tools: bool = False)#
Run the MCP server “anndata-mcp”.
Allows to retrieve information about an AnnData object via MCP If the environment variable MCP_ENVIRONMENT is set to “PRODUCTION”, it will run the Starlette app with streamable HTTP for the MCP server. Otherwise, it will run the MCP server via stdio. The port is set via “-p/–port” or the MCP_PORT environment variable, defaulting to “8000” if not set. The hostname is set via “-h/–host” or the MCP_HOSTNAME environment variable, defaulting to “0.0.0.0” if not set. To specify to transform method of the MCP server, set “-e/–env” or the MCP_TRANSPORT environment variable, which defaults to “stdio”. The maximum output length for truncation is set via “–max-output-len” or the MCP_MAX_OUTPUT_LEN environment variable, defaulting to “1000” if not set. The file system tool can be exposed via “–expose-file-system-tools” or the MCP_EXPOSE_FILE_SYSTEM_TOOLS environment variable, disabled by default.
- anndata_mcp.mcp: fastmcp.FastMCP#