- Home
- MCP servers
- Fitness
Fitness
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"ag2-mcp-servers-fitness-api": {
"command": "python",
"args": [
"mcp_server/main.py",
"stdio"
],
"env": {
"CONFIG": "{...}",
"SECURITY": "YOUR_API_KEY",
"CONFIG_PATH": "mcp_server/mcp_config.json"
}
}
}
}You run an MCP (Model Context Protocol) Server that connects to a predefined OpenAPI endpoint to expose a structured, adaptive model context interface. This server helps you test, explore, and integrate the Google Fitness API schema by providing a consistent, MCP-compliant way to interact with its data and actions from your clients.
How to use
Start the server in stdio mode to run locally and interact with clients via standard input/output. From there, you connect your MCP client to the server and perform requests that align with the exposed model context actions. You can configure security and runtime options through environment variables to suit development, testing, or production needs.
How to install
Prerequisites: Python 3.9+ and a working Python toolchain (pip and uv). Prepare your environment with the following steps.
- Install Python dependencies locally.
pip install -e ".[dev]"
- Alternatively, install using uv for editable mode.
uv pip install --editable ".[dev]"
- Run basic linting, formatting, and tests to ensure a clean environment.
ruff check
ruff format
./scripts/static-analysis.sh
./scripts/test.sh
- Start the MCP server in stdio mode.
python mcp_server/main.py stdio
Configuration and environment
You can configure the server using environment variables. The following are supported and commonly used in development and testing.
-
CONFIG_PATH: Path to a JSON configuration file (for example, mcp_server/mcp_config.json).
-
CONFIG: A JSON string containing the configuration.
-
SECURITY: Environment variables containing security parameters (for example, API keys).
Available tools
lint
Run linting and formatting checks with ruff to ensure code quality and consistency.
format
Automatically format code using ruff format to maintain style guidelines.
static-analysis
Perform static analysis (type checking with mypy, security checks with bandit, semantic checks with semgrep) to identify issues early.
tests
Run tests with pytest to verify functionality and generate coverage reports.
precommit
Use pre-commit hooks to automatically run checks before commits.
build-publish
Build and publish artifacts using Hatch when preparing releases.