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

The `.getMCPServers()` method is used to retrieve all MCP server instances that have been registered in the Mastra instance.

## Usage example

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

## Parameters

This method does not accept any parameters.

## Returns

<PropertiesTable
  content={[
    {
      name: "servers",
      type: "Record<string, MCPServerBase> | undefined",
      description:
        "A record of all registered MCP server instances, where keys are server IDs and values are MCPServerBase instances, or undefined if no servers are registered.",
    },
  ]}
/>

## Related

- [MCP overview](/docs/mcp/overview)
- [MCP server reference](/reference/tools/mcp-server)


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