> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memorybase.app/llms.txt
> Use this file to discover all available pages before exploring further.

# mcp

> Start the MCP server that connects MemoryBase to coding tools and AI agents.

```bash theme={null}
memorybase mcp
```

Starts a Model Context Protocol (MCP) server over standard input/output. This is what coding tools like Claude Code and Codex use to pull your memory into their sessions.

You typically don't run this command directly. Instead, you register it with your coding tool, and it runs automatically in the background when needed.

## Setup for Claude Code

```bash theme={null}
claude mcp add memorybase -- npx -y memorybase mcp
```

This tells Claude Code to start the MemoryBase MCP server whenever it needs your memory. You only need to run this once.

## Setup for Codex

```bash theme={null}
codex mcp add memorybase -- npx -y memorybase mcp
```

## Setup for Other Tools

Any tool that supports MCP can connect to MemoryBase. Configure it to run:

```bash theme={null}
npx -y memorybase mcp
```

as a `stdio` type MCP server.

## What Tools Does the MCP Server Expose?

See the [MCP Reference](/mcp/overview) tab for the full list of tools that the MCP server makes available to your coding assistant.
