Nextcloud Cookbook MCP Server
Integrates with the Nextcloud Cookbook app API to enable AI assistants to manage recipes, categories, and keywords. It supports listing, searching, creating, and importing recipes from URLs via a standardized Model Context Protocol interface.
README
Nextcloud Cookbook MCP Server
A Model Context Protocol (MCP) server that provides integration with the Nextcloud Cookbook app API. This server allows AI assistants like Claude to interact with your Nextcloud recipes through a standardized interface.
Features
- List and search recipes
- Get detailed recipe information
- Create, update, and delete recipes
- Import recipes from URLs
- Get recipe images
- Manage categories and keywords
- Full Docker support for easy deployment
Prerequisites
- Node.js 18 or higher (for local development)
- Docker and Docker Compose (for containerized deployment)
- Nextcloud instance with Cookbook app installed
- Nextcloud app password (recommended) or user password
Getting a Nextcloud App Password
- Log into your Nextcloud instance
- Go to Settings > Security
- Scroll to "Devices & sessions"
- Enter a name (e.g., "MCP Server") and click "Create new app password"
- Copy the generated password (you won't see it again!)
Installation
Option 1: Docker Deployment (Recommended)
-
Clone or download this repository
-
Copy
.env.exampleto.env:cp .env.example .env -
Edit
.envwith your Nextcloud credentials:NEXTCLOUD_URL=https://your-nextcloud-instance.com NEXTCLOUD_USERNAME=your-username NEXTCLOUD_PASSWORD=your-app-password PORT=3000 -
Build and run with Docker Compose:
docker-compose up -d -
The server will be available on
stdio(standard input/output)
Option 2: Local Development
-
Install dependencies:
npm install -
Copy
.env.exampleto.envand configure your credentials -
Build the TypeScript code:
npm run build -
Run the server:
npm start
Configuration
Configure the server using environment variables:
| Variable | Description | Required | Default |
|---|---|---|---|
NEXTCLOUD_URL |
Your Nextcloud instance URL | Yes | - |
NEXTCLOUD_USERNAME |
Your Nextcloud username | Yes | - |
NEXTCLOUD_PASSWORD |
App password or user password | Yes | - |
PORT |
Server port (currently unused for stdio) | No | 3000 |
Configuring Claude Code
To use this MCP server with Claude Code, add it to your MCP settings:
For stdio transport:
Add to your Claude Code MCP configuration file:
{
"mcpServers": {
"nextcloud-cookbook": {
"command": "node",
"args": ["/path/to/nextcloud-cookbook-mcp/dist/index.js"],
"env": {
"NEXTCLOUD_URL": "https://your-nextcloud-instance.com",
"NEXTCLOUD_USERNAME": "your-username",
"NEXTCLOUD_PASSWORD": "your-app-password"
}
}
}
}
Or if using Docker:
{
"mcpServers": {
"nextcloud-cookbook": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "NEXTCLOUD_URL=https://your-nextcloud-instance.com",
"-e", "NEXTCLOUD_USERNAME=your-username",
"-e", "NEXTCLOUD_PASSWORD=your-app-password",
"nextcloud-cookbook-mcp"
]
}
}
}
Available Tools
The MCP server provides the following tools:
Recipe Management
list_recipes- List all recipes in the cookbooksearch_recipes- Search recipes by keyword, tag, or categoryget_recipe- Get detailed information about a specific recipecreate_recipe- Create a new recipeupdate_recipe- Update an existing recipedelete_recipe- Delete a recipeimport_recipe- Import a recipe from a URL
Images
get_recipe_image_url- Get the URL for a recipe image (full, thumb, or thumb16)
Organization
list_categories- List all recipe categories with countslist_keywords- List all recipe keywords/tagsget_recipes_by_keyword- Get recipes tagged with a specific keyword
Example Usage
Once configured with Claude Code, you can interact with your Nextcloud Cookbook using natural language:
User: "Show me all my recipes"
Claude: [Uses list_recipes tool]
User: "Search for pasta recipes"
Claude: [Uses search_recipes tool with query "pasta"]
User: "Get the details for recipe ID 42"
Claude: [Uses get_recipe tool with id 42]
User: "Import this recipe: https://example.com/recipe"
Claude: [Uses import_recipe tool]
User: "Create a new recipe for chocolate chip cookies"
Claude: [Uses create_recipe tool with recipe data]
Development
Project Structure
nextcloud-cookbook-mcp/
├── src/
│ ├── index.ts # MCP server implementation
│ └── nextcloud-client.ts # Nextcloud API client
├── dist/ # Compiled JavaScript (generated)
├── Dockerfile # Docker container configuration
├── docker-compose.yml # Docker Compose setup
├── package.json # Node.js dependencies
├── tsconfig.json # TypeScript configuration
└── README.md # This file
Building
npm run build
Development Mode
npm run dev
Watch Mode (auto-rebuild)
npm run watch
Troubleshooting
Authentication Errors
- Verify your Nextcloud URL is correct (include https://)
- Ensure you're using an app password, not your regular password
- Check that your username is correct (usually lowercase)
Connection Errors
- Verify your Nextcloud instance is accessible
- Check if the Cookbook app is installed and enabled
- Ensure there are no firewall rules blocking access
Docker Issues
- Make sure Docker is running
- Check logs with:
docker-compose logs -f - Rebuild the image:
docker-compose build --no-cache
API Reference
For detailed Nextcloud Cookbook API documentation, see: https://nextcloud.github.io/cookbook/dev/api/0.1.2/index.html
License
MIT
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。