diff --git a/src/index.ts b/src/index.ts
index de3f2f2..2c5d1a7 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -6,7 +6,7 @@ const require = createRequire(import.meta.url);
 const packageJson = require("../package.json");
 import "dotenv/config";
 import logger from "./logger.js";
-import { createMcpServer } from "./server-factory.js";
+import { BrowserStackMcpServer } from "./server-factory.js";
 
 async function main() {
   logger.info(
@@ -33,12 +33,12 @@ async function main() {
 
   const transport = new StdioServerTransport();
 
-  const server = createMcpServer({
+  const mcpServer = new BrowserStackMcpServer({
     "browserstack-username": username,
     "browserstack-access-key": accessKey,
   });
 
-  await server.connect(transport);
+  await mcpServer.getInstance().connect(transport);
 }
 
 main().catch(console.error);
@@ -48,5 +48,6 @@ process.on("exit", () => {
   logger.flush();
 });
 
-export { createMcpServer } from "./server-factory.js";
+
 export { setLogger } from "./logger.js";
+export { BrowserStackMcpServer } from "./server-factory.js";
diff --git a/src/server-factory.ts b/src/server-factory.ts
index d471467..228e3bb 100644
--- a/src/server-factory.ts
+++ b/src/server-factory.ts
@@ -1,4 +1,7 @@
-import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
+import {
+  McpServer,
+  RegisteredTool,
+} from "@modelcontextprotocol/sdk/server/mcp.js";
 import { createRequire } from "module";
 const require = createRequire(import.meta.url);
 const packageJson = require("../package.json");
@@ -15,32 +18,70 @@ import addAppLiveTools from "./tools/applive.js";
 import { setupOnInitialized } from "./oninitialized.js";
 import { BrowserStackConfig } from "./lib/types.js";
 
-function registerTools(server: McpServer, config: BrowserStackConfig) {
-  addAccessibilityTools(server, config);
-  addSDKTools(server, config);
-  addAppLiveTools(server, config);
-  addBrowserLiveTools(server, config);
-  addTestManagementTools(server, config);
-  addAppAutomationTools(server, config);
-  addFailureLogsTools(server, config);
-  addAutomateTools(server, config);
-  addSelfHealTools(server, config);
-}
+/**
+ * Wrapper class for BrowserStack MCP Server
+ * Stores a map of registered tools by name
+ */
+export class BrowserStackMcpServer {
+  public server: McpServer;
+  public tools: Record<string, RegisteredTool> = {};
+
+  constructor(private config: BrowserStackConfig) {
+    logger.info(
+      "Creating BrowserStack MCP Server, version %s",
+      packageJson.version,
+    );
+
+    this.server = new McpServer({
+      name: "BrowserStack MCP Server",
+      version: packageJson.version,
+    });
+
+    setupOnInitialized(this.server, this.config);
+    this.registerTools();
+  }
 
-export function createMcpServer(config: BrowserStackConfig): McpServer {
-  logger.info(
-    "Creating BrowserStack MCP Server, version %s",
-    packageJson.version,
-  );
+  /**
+   * Calls each tool-adder function and collects their returned tools
+   */
+  private registerTools() {
+    const toolAdders = [
+      addAccessibilityTools,
+      addSDKTools,
+      addAppLiveTools,
+      addBrowserLiveTools,
+      addTestManagementTools,
+      addAppAutomationTools,
+      addFailureLogsTools,
+      addAutomateTools,
+      addSelfHealTools,
+    ];
 
-  // Create an MCP server
-  const server: McpServer = new McpServer({
-    name: "BrowserStack MCP Server",
-    version: packageJson.version,
-  });
+    toolAdders.forEach((adder) => {
+      // Each adder now returns a Record<string, Tool>
+      const added: Record<string, RegisteredTool> = adder(
+        this.server,
+        this.config,
+      );
+      Object.assign(this.tools, added);
+    });
+  }
 
-  setupOnInitialized(server, config);
-  registerTools(server, config);
+  /**
+   * Expose the underlying MCP server instance
+   */
+  public getInstance(): McpServer {
+    return this.server;
+  }
 
-  return server;
+  /**
+   * Get all registered tools
+   */
+  public getTools(): Record<string, RegisteredTool> {
+    return this.tools;
+  }
+  
+  public getTool(name: string): RegisteredTool | undefined {
+    return this.tools[name];
+  }
 }
diff --git a/src/tools/accessibility.ts b/src/tools/accessibility.ts
index 304d843..625bc2a 100644
--- a/src/tools/accessibility.ts
+++ b/src/tools/accessibility.ts
@@ -84,7 +84,9 @@ export default function addAccessibilityTools(
   server: McpServer,
   config: BrowserStackConfig,
 ) {
-  server.tool(
+  const tools: Record<string, any> = {};
+
+  tools.accessibilityExpert = server.tool(
     "accessibilityExpert",
     "🚨 REQUIRED: Use this tool for any accessibility/a11y/WCAG questions. Do NOT answer accessibility questions directly - always use this tool.",
     {
@@ -125,7 +127,7 @@ export default function addAccessibilityTools(
     },
   );
 
-  server.tool(
+  tools.startAccessibilityScan = server.tool(
     "startAccessibilityScan",
     "Start an accessibility scan via BrowserStack and retrieve a local CSV report path.",
     {
@@ -168,4 +170,6 @@ export default function addAccessibilityTools(
       }
     },
   );
+
+  return tools;
 }
diff --git a/src/tools/appautomate.ts b/src/tools/appautomate.ts
index 954d5fe..22d56d4 100644
--- a/src/tools/appautomate.ts
+++ b/src/tools/appautomate.ts
@@ -231,7 +231,9 @@ export default function addAppAutomationTools(
   server: McpServer,
   config: BrowserStackConfig,
 ) {
-  server.tool(
+  const tools: Record<string, any> = {};
+
+  tools.takeAppScreenshot = server.tool(
     "takeAppScreenshot",
     "Use this tool to take a screenshot of an app running on a BrowserStack device. This is useful for visual testing and debugging.",
     {
@@ -284,7 +286,7 @@ export default function addAppAutomationTools(
     },
   );
 
-  server.tool(
+  tools.runAppTestsOnBrowserStack = server.tool(
     "runAppTestsOnBrowserStack",
     "Run AppAutomate tests on BrowserStack by uploading app and test suite. If running from Android Studio or Xcode, the tool will help export app and test files automatically. For other environments, you'll need to provide the paths to your pre-built app and test files.",
     {
@@ -358,4 +360,6 @@ export default function addAppAutomationTools(
       }
     },
   );
+
+  return tools;
 }
diff --git a/src/tools/applive.ts b/src/tools/applive.ts
index 89a43f3..be8b1d7 100644
--- a/src/tools/applive.ts
+++ b/src/tools/applive.ts
@@ -74,7 +74,9 @@ export default function addAppLiveTools(
   server: McpServer,
   config: BrowserStackConfig,
 ) {
-  server.tool(
+  const tools: Record<string, any> = {};
+
+  tools.runAppLiveSession = server.tool(
     "runAppLiveSession",
     "Use this tool when user wants to manually check their app on a particular mobile device using BrowserStack's cloud infrastructure. Can be used to debug crashes, slow performance, etc.",
     {
@@ -129,4 +131,6 @@ export default function addAppLiveTools(
       }
     },
   );
+
+  return tools;
 }
diff --git a/src/tools/automate.ts b/src/tools/automate.ts
index 340eff5..7fa95be 100644
--- a/src/tools/automate.ts
+++ b/src/tools/automate.ts
@@ -62,7 +62,9 @@ export default function addAutomationTools(
   server: McpServer,
   config: BrowserStackConfig,
 ) {
-  server.tool(
+  const tools: Record<string, any> = {};
+
+  tools.fetchAutomationScreenshots = server.tool(
     "fetchAutomationScreenshots",
     "Fetch and process screenshots from a BrowserStack Automate session",
     {
@@ -102,4 +104,6 @@ export default function addAutomationTools(
       }
     },
   );
+
+  return tools;
 }
diff --git a/src/tools/bstack-sdk.ts b/src/tools/bstack-sdk.ts
index 83999b1..2482f1e 100644
--- a/src/tools/bstack-sdk.ts
+++ b/src/tools/bstack-sdk.ts
@@ -167,7 +167,9 @@ export default function addSDKTools(
   server: McpServer,
   config: BrowserStackConfig,
 ) {
-  server.tool(
+  const tools: Record<string, any> = {};
+
+  tools.runTestsOnBrowserStack = server.tool(
     "runTestsOnBrowserStack",
     "Use this tool to get instructions for running tests on BrowserStack and BrowserStack Percy. It sets up the BrowserStack SDK and runs your test cases on BrowserStack.",
     {
@@ -247,4 +249,6 @@ export default function addSDKTools(
       }
     },
   );
+
+  return tools;
 }
diff --git a/src/tools/getFailureLogs.ts b/src/tools/getFailureLogs.ts
index 782e43d..6c41477 100644
--- a/src/tools/getFailureLogs.ts
+++ b/src/tools/getFailureLogs.ts
@@ -1,7 +1,6 @@
 import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
 import { z } from "zod";
 import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
-import logger from "../logger.js";
 import { trackMCP } from "../lib/instrumentation.js";
 import { BrowserStackConfig } from "../lib/types.js";
 
@@ -169,7 +168,9 @@ export default function registerGetFailureLogs(
   server: McpServer,
   config: BrowserStackConfig,
 ) {
-  server.tool(
+  const tools: Record<string, any> = {};
+
+  tools.getFailureLogs = server.tool(
     "getFailureLogs",
     "Fetch various types of logs from a BrowserStack session. Supports both automate and app-automate sessions.",
     {
@@ -212,19 +213,19 @@ export default function registerGetFailureLogs(
         );
         return await getFailureLogs(args, config);
       } catch (error) {
-        const message = error instanceof Error ? error.message : String(error);
         trackMCP(
           "getFailureLogs",
           server.server.getClientVersion()!,
           error,
           config,
         );
-        logger.error("Failed to fetch logs: %s", message);
         return {
           content: [
             {
               type: "text",
-              text: `Failed to fetch logs: ${message}`,
+              text: `Failed to fetch failure logs: ${
+                error instanceof Error ? error.message : "Unknown error"
+              }`,
               isError: true,
             },
           ],
@@ -233,4 +234,6 @@ export default function registerGetFailureLogs(
       }
     },
   );
+
+  return tools;
 }
diff --git a/src/tools/live.ts b/src/tools/live.ts
index cc313c7..b1aa42e 100644
--- a/src/tools/live.ts
+++ b/src/tools/live.ts
@@ -111,7 +111,9 @@ export default function addBrowserLiveTools(
   server: McpServer,
   config: BrowserStackConfig,
 ) {
-  server.tool(
+  const tools: Record<string, any> = {};
+
+  tools.runBrowserLiveSession = server.tool(
     "runBrowserLiveSession",
     "Launch a BrowserStack Live session (desktop or mobile).",
     LiveArgsShape,
@@ -145,4 +147,6 @@ export default function addBrowserLiveTools(
       }
     },
   );
+
+  return tools;
 }
diff --git a/src/tools/selfheal.ts b/src/tools/selfheal.ts
index 0bfe1c5..ee67668 100644
--- a/src/tools/selfheal.ts
+++ b/src/tools/selfheal.ts
@@ -34,7 +34,9 @@ export default function addSelfHealTools(
   server: McpServer,
   config: BrowserStackConfig,
 ) {
-  server.tool(
+  const tools: Record<string, any> = {};
+
+  tools.fetchSelfHealedSelectors = server.tool(
     "fetchSelfHealedSelectors",
     "Retrieves AI-generated, self-healed selectors for a BrowserStack Automate session to resolve flaky tests caused by dynamic DOM changes.",
     {
@@ -69,4 +71,6 @@ export default function addSelfHealTools(
       }
     },
   );
+
+  return tools;
 }
diff --git a/src/tools/testmanagement.ts b/src/tools/testmanagement.ts
index c5e9c3a..830639c 100644
--- a/src/tools/testmanagement.ts
+++ b/src/tools/testmanagement.ts
@@ -410,70 +410,78 @@ export default function addTestManagementTools(
   server: McpServer,
   config: BrowserStackConfig,
 ) {
-  server.tool(
+  const tools: Record<string, any> = {};
+
+  tools.createProjectOrFolder = server.tool(
     "createProjectOrFolder",
     "Create a project and/or folder in BrowserStack Test Management.",
     CreateProjFoldSchema.shape,
     (args) => createProjectOrFolderTool(args, config, server),
   );
 
-  server.tool(
+  tools.createTestCase = server.tool(
     "createTestCase",
     "Use this tool to create a test case in BrowserStack Test Management.",
     CreateTestCaseSchema.shape,
     (args) => createTestCaseTool(args, config, server),
   );
 
-  server.tool(
+  tools.listTestCases = server.tool(
     "listTestCases",
     "List test cases in a project with optional filters (status, priority, custom fields, etc.)",
     ListTestCasesSchema.shape,
     (args) => listTestCasesTool(args, config, server),
   );
 
-  server.tool(
+  tools.createTestRun = server.tool(
     "createTestRun",
     "Create a test run in BrowserStack Test Management.",
     CreateTestRunSchema.shape,
     (args) => createTestRunTool(args, config, server),
   );
 
-  server.tool(
+  tools.listTestRuns = server.tool(
     "listTestRuns",
     "List test runs in a project with optional filters (date ranges, assignee, state, etc.)",
     ListTestRunsSchema.shape,
     (args) => listTestRunsTool(args, config, server),
   );
-  server.tool(
+
+  tools.updateTestRun = server.tool(
     "updateTestRun",
     "Update a test run in BrowserStack Test Management.",
     UpdateTestRunSchema.shape,
     (args) => updateTestRunTool(args, config, server),
   );
-  server.tool(
+
+  tools.addTestResult = server.tool(
     "addTestResult",
     "Add a test result to a specific test run via BrowserStack Test Management API.",
     AddTestResultSchema.shape,
     (args) => addTestResultTool(args, config, server),
   );
 
-  server.tool(
+  tools.uploadProductRequirementFile = server.tool(
     "uploadProductRequirementFile",
     "Upload files (e.g., PDRs, PDFs) to BrowserStack Test Management and retrieve a file mapping ID. This is utilized for generating test cases from files and is part of the Test Case Generator AI Agent in BrowserStack.",
     UploadFileSchema.shape,
     (args) => uploadProductRequirementFileTool(args, config, server),
   );
-  server.tool(
+
+  tools.createTestCasesFromFile = server.tool(
     "createTestCasesFromFile",
     "Generate test cases from a file in BrowserStack Test Management using the Test Case Generator AI Agent.",
     CreateTestCasesFromFileSchema.shape,
     (args, context) =>
       createTestCasesFromFileTool(args, context, config, server),
   );
-  server.tool(
+
+  tools.createLCASteps = server.tool(
     "createLCASteps",
     "Generate Low Code Automation (LCA) steps for a test case in BrowserStack Test Management using the Low Code Automation Agent.",
     CreateLCAStepsSchema.shape,
     (args, context) => createLCAStepsTool(args, context, config, server),
   );
+
+  return tools;
 }
