# Mealie MCP Server (TypeScript)
[](https://www.npmjs.com/package/mealie-mcp-server-ts)
This project enables AI assistants to interact with your [Mealie](https://github.com/mealie-recipes/mealie) recipe database through MCP clients such as Claude Desktop.
Based on [rldiao/mealie-mcp-server](https://github.com/rldiao/mealie-mcp-server) - rewritten in TypeScript.
## Installation
```bash
npm install -g mealie-mcp-server-ts
```
Or run directly with npx:
```bash
npx mealie-mcp-server-ts
```
## Prerequisites
- Node.js 18+
- Running Mealie instance with API key
## Usage with Claude Desktop
Add the server to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"mealie": {
"command": "npx",
"args": [
"-y",
"mealie-mcp-server-ts"
],
"env": {
"MEALIE_BASE_URL": "https://your-mealie-instance.com",
"MEALIE_API_KEY": "your-mealie-api-key"
}
}
}
}
```
### WSL Users
If running on Windows with WSL:
```json
{
"mcpServers": {
"mealie": {
"command": "wsl",
"args": [
"env",
"MEALIE_BASE_URL=https://your-mealie-instance.com",
"MEALIE_API_KEY=your-mealie-api-key",
"npx",
"-y",
"mealie-mcp-server-ts"
]
}
}
}
```
### Alternative: Local Installation
If you prefer to run from a local clone:
```json
{
"mcpServers": {
"mealie": {
"command": "node",
"args": [
"/path/to/mealie-mcp-server-ts/dist/index.js"
],
"env": {
"MEALIE_BASE_URL": "https://your-mealie-instance.com",
"MEALIE_API_KEY": "your-mealie-api-key"
}
}
}
}
```
## Development
1. Clone the repository and install dependencies:
```bash
npm install
```
2. Copy the environment template and configure:
```bash
cp .env.template .env
```
3. Edit the `.env` file with your Mealie instance details:
```
MEALIE_BASE_URL=https://your-mealie-instance.com
MEALIE_API_KEY=your-mealie-api-key
```
4. Build the project:
```bash
npm run build
```
5. Run the server:
```bash
npm start
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.