AF

andekqr/fitatu-mcp-unofficial

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

10 stars 8 forks 质量 79 趋势 38MIT

Unofficial Model Context Protocol server for Fitatu, with tools for food search and meal plan management.

概览

Unofficial Model Context Protocol (MCP) server for accessing and updating data in your own Fitatu account. It provides typed tools for profile data, meal plans, nutrition summaries, food search, and recipe management over stdio or Streamable HTTP. This project is not affiliated with, endorsed by, or sponsored by Fitatu. Use it only with your own account and treat Fitatu credentials and account data as sensitive. - Profile, day-plan, and nutrition summary queries. - Latest or date-specific body measurement lookup and partial updates for explicit calendar dates. - Food and recipe search with identifiers required by mutation tools. - Meal item creation, update, replacement, movement, and removal. - Recipe creation, inspection, update, and deletion. - MCP transports for local stdio and Streamable HTTP clients. - Local development and Docker workflows. - Node.js >=22.18.0 - npm - A Fitatu account Docker and ngrok are optional and required only for their respective workflows.

README

以下为原文 README 节选,完整内容请查看原文。

Fitatu MCP Unofficial

Unofficial Model Context Protocol (MCP) server for accessing and updating data in your own Fitatu account. It provides typed tools for profile data, meal plans, nutrition summaries, food search, and recipe management over stdio or Streamable HTTP.

[!IMPORTANT] This project is not affiliated with, endorsed by, or sponsored by Fitatu. Use it only with your own account and treat Fitatu credentials and account data as sensitive.

Features

  • Profile, day-plan, and nutrition summary queries.
  • Latest or date-specific body measurement lookup and partial updates for explicit calendar dates.
  • Food and recipe search with identifiers required by mutation tools.
  • Meal item creation, update, replacement, movement, and removal.
  • Recipe creation, inspection, update, and deletion.
  • MCP transports for local stdio and Streamable HTTP clients.
  • Local development and Docker workflows.

Requirements

  • Node.js >=22.18.0
  • npm
  • A Fitatu account

Docker and ngrok are optional and required only for their respective workflows.

Quick start

Install dependencies and create the local configuration file:

npm install
cp .env.example .env

Set FITATU_EMAIL and FITATU_PASSWORD in .env, then start the development server:

npm run dev:server

The default MCP endpoint is http://localhost:3000/mcp.

MCP client configuration

Choose one transport with MCP_TRANSPORT:

Transport Best for Process model
stdio A local client that launches its own MCP server One server process per client
http A persistent server shared by one or more clients Long-running server on /mcp

stdio

Build the server before configuring the client:

npm run build

Use absolute paths to the repository’s .env and dist/index.js files:

{
	"mcpServers": {
		"fitatu": {
			"command": "node",
			"args": [
				"--env-file=/absolute/path/to/fitatu-mcp-unofficial/.env",
				"/absolute/path/to/fitatu-mcp-unofficial/dist/index.js"
			],
			"env": {
				"MCP_TRANSPORT": "stdio"
			}
		}
	}
}

The client starts and stops the server. In stdio mode, logs are written to stderr because stdout is reserved for the JSON-RPC stream.

Streamable HTTP

Start the server with npm run dev:server, or build and run it with:

npm run build
npm start

Clients with native Streamable HTTP support can connect directly to:

http://localhost:3000/mcp

For a client that launches remote MCP connections through a command, use mcp-remote:

{
	"mcpServers": {
		"fitatu": {
			"command": "npx",
			"args": ["mcp-remote", "http://localhost:3000/mcp"]
		}
	}
}

To inspect the local server interactively:

npm run inspector

Connect the Inspector to http://localhost:3000/mcp.

Remote MCP access with ngrok

在 GitHub 查看完整 README

安装

npx mcp-remote http://localhost:3000/mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "fitatu": { "command": "node", "args": [ "--env-file=/absolute/path/to/fitatu-mcp-unofficial/.env", "/absolute/path/to/fitatu-mcp-unofficial/dist/index.js" ], "env": { "MCP_TRANSPORT": "stdio" } } } }