# Installing MCP

First, let's install the Mastra MCP package:

```bash
npm install @mastra/mcp@latest
```

The `@mastra/mcp` package provides the necessary infrastructure to connect your Mastra agent to various MCP servers. This package handles the communication between your agent and the MCP servers, allowing your agent to access the tools and services provided by those servers.

Installing this package is the first step in enhancing your agent with MCP capabilities. Once installed, you'll need to configure it to connect to specific MCP servers, which we'll cover in the next steps.
