# Mastra.getServer()
[EN] Source: https://mastra.ai/reference/core/getServer

The `.getServer()` method is used to retrieve the server configuration that has been configured in the Mastra instance.

## Usage example

```typescript copy
mastra.getServer();
```

## Parameters

This method does not accept any parameters.

## Returns

<PropertiesTable
  content={[
    {
      name: "server",
      type: "ServerConfig | undefined",
      description:
        "The configured server configuration including port, timeout, API routes, middleware, CORS settings, and build options, or undefined if no server has been configured.",
    },
  ]}
/>

## Related

- [Server deployment](/docs/deployment/building-mastra)
- [Server configuration](/docs/server-db/custom-api-routes)


---
title: "Reference: Mastra.getStorage() | Core"
description: "Documentation for the `Mastra.getStorage()` method in Mastra, which retrieves the configured storage instance."
---