6 Commits

Author SHA1 Message Date
matthias 7c8061eeea chore: rename strava-mcp-server package to strava-mcp-server-hnrx in uv.lock
CI/CD Pipeline / Lint & Check (push) Successful in 9s
CI/CD Pipeline / Publish to PyPI (push) Successful in 14s
CI/CD Pipeline / Build & Push Docker Image (push) Successful in 1m20s
2026-05-14 20:10:39 +02:00
matthias 7d0364e0ed chore: update landing page copy, improve code formatting, and add PyPI publish workflow
CI/CD Pipeline / Lint & Check (push) Failing after 7s
Deploy Website to S3 / deploy (push) Successful in 6s
CI/CD Pipeline / Publish to PyPI (push) Has been skipped
CI/CD Pipeline / Build & Push Docker Image (push) Has been skipped
2026-05-14 20:10:27 +02:00
matthias 2223a2aafa feat: add repository link to navigation menu with localization support
CI/CD Pipeline / Lint & Check (push) Successful in 10s
Deploy Website to S3 / deploy (push) Successful in 6s
CI/CD Pipeline / Build & Push Docker Image (push) Successful in 1m21s
2026-05-14 19:46:38 +02:00
matthias 63d41ed9db chore: update S3 deployment configuration to use specific endpoint and path-style addressing
CI/CD Pipeline / Lint & Check (push) Successful in 9s
Deploy Website to S3 / deploy (push) Successful in 7s
CI/CD Pipeline / Build & Push Docker Image (push) Successful in 1m20s
2026-05-14 19:42:04 +02:00
matthias 94e7cd6a8c feat: add project landing page and automated deployment workflow
CI/CD Pipeline / Lint & Check (push) Successful in 10s
Deploy Website to S3 / deploy (push) Failing after 48s
CI/CD Pipeline / Build & Push Docker Image (push) Successful in 1m19s
2026-05-14 19:33:59 +02:00
matthias b463b2eeb8 refactor: simplify athlete profile formatting and export full API response in tool output, plus add AGENTS.md documentation
CI/CD Pipeline / Lint & Check (push) Successful in 9s
CI/CD Pipeline / Build & Push Docker Image (push) Successful in 1m20s
2026-05-13 01:21:16 +02:00
9 changed files with 607 additions and 31 deletions
+22
View File
@@ -34,6 +34,28 @@ jobs:
- name: Run Ruff (Lint & Syntax Check) - name: Run Ruff (Lint & Syntax Check)
run: uv run ruff check src run: uv run ruff check src
publish-pypi:
name: Publish to PyPI
needs: lint
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v2
with:
version: "latest"
- name: Build package
run: uv build
- name: Publish to PyPI
run: uv publish --token ${{ secrets.PYPI_TOKEN }}
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
build-and-push: build-and-push:
name: Build & Push Docker Image name: Build & Push Docker Image
needs: lint needs: lint
+29
View File
@@ -0,0 +1,29 @@
name: Deploy Website to S3
on:
push:
branches:
- main
paths:
- 'website/**'
- '.gitea/workflows/deploy-website.yaml'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Sync to S3
uses: https://github.com/jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }}
AWS_S3_ENDPOINT: "https://s3.hnrx.net"
AWS_S3_FORCE_PATH_STYLE: 'true'
AWS_REGION: 'garage'
SOURCE_DIR: 'website'
+5
View File
@@ -0,0 +1,5 @@
Das Git Repo zu dem Projekt:
"Strava MCP Server"
findest du hier: https://git.hnrx.net/hnrx/strava-mcp-server
Issues: https://git.hnrx.net/hnrx/strava-mcp-server/issues
+4 -1
View File
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
[project] [project]
name = "strava-mcp-server" name = "strava-mcp-server-hnrx"
dynamic = ["version"] dynamic = ["version"]
description = "A Model Context Protocol (MCP) server that exposes the Strava API v3 as tools, resources, and prompts for AI agents." description = "A Model Context Protocol (MCP) server that exposes the Strava API v3 as tools, resources, and prompts for AI agents."
readme = "README.md" readme = "README.md"
@@ -54,6 +54,9 @@ dev = [
[tool.hatch.version] [tool.hatch.version]
source = "vcs" source = "vcs"
[tool.hatch.build.targets.wheel]
packages = ["src/strava_mcp_server"]
[tool.pytest.ini_options] [tool.pytest.ini_options]
asyncio_mode = "auto" asyncio_mode = "auto"
testpaths = ["tests"] testpaths = ["tests"]
+15 -29
View File
@@ -2,7 +2,7 @@ import json
from mcp.server.fastmcp import FastMCP, Context from mcp.server.fastmcp import FastMCP, Context
from mcp.types import TextContent, Annotations, EmbeddedResource, TextResourceContents from mcp.types import TextContent, Annotations, EmbeddedResource, TextResourceContents
from strava_mcp_server.strava_client import StravaClient from strava_mcp_server.strava_client import StravaClient
from strava_mcp_server.utils import format_date_iso, format_date_human from strava_mcp_server.utils import format_date_human
def register(mcp: FastMCP, strava: StravaClient) -> None: def register(mcp: FastMCP, strava: StravaClient) -> None:
@@ -28,34 +28,20 @@ def register(mcp: FastMCP, strava: StravaClient) -> None:
] ]
location = ", ".join(location_parts) if location_parts else "N/A" location = ", ".join(location_parts) if location_parts else "N/A"
essential_data = { full_name = (
"id": athlete.get("id"), f"{athlete.get('firstname', '')} {athlete.get('lastname', '')}".strip()
"username": athlete.get("username"), )
"name": f"{athlete.get('firstname')} {athlete.get('lastname')}".strip(),
"location": location,
"sex": athlete.get("sex"),
"weight": athlete.get("weight"),
"measurement_units": athlete.get("measurement_preference"),
"is_premium": athlete.get("premium", False),
"profile_medium": athlete.get("profile_medium"),
"created_at": format_date_iso(athlete.get("created_at")),
"updated_at": format_date_iso(athlete.get("updated_at")),
"bio": athlete.get("bio"),
"follower_count": athlete.get("follower_count"),
"friend_count": athlete.get("friend_count"),
}
markdown_summary = f""" markdown_summary = f"""
👤 **Profile for {essential_data["name"]}** (ID: {essential_data["id"]}) 👤 **Profile for {full_name}** (ID: {athlete.get("id")})
- Username: {essential_data["username"] or "N/A"} - Username: {athlete.get("username") or "N/A"}
- Location: {essential_data["location"]} - Location: {location}
- Sex: {essential_data["sex"] or "N/A"} - Sex: {athlete.get("sex") or "N/A"}
- Weight: {essential_data["weight"] or "N/A"} kg - Weight: {athlete.get("weight") or "N/A"} kg
- Measurement Units: {essential_data["measurement_units"] or "N/A"} - Measurement Units: {athlete.get("measurement_preference") or "N/A"}
- Strava Summit Member: {"Yes" if essential_data["is_premium"] else "No"} - Strava Summit Member: {"Yes" if athlete.get("premium") else "No"}
- Profile Image (Medium): {essential_data["profile_medium"] or "N/A"} - Profile Image (Medium): {athlete.get("profile_medium") or "N/A"}
- Joined Strava: {format_date_human(essential_data["created_at"])} - Joined Strava: {format_date_human(athlete.get("created_at"))}
- Last Updated: {format_date_human(essential_data["updated_at"])} - Last Updated: {format_date_human(athlete.get("updated_at"))}
""".strip() """.strip()
return [ return [
@@ -69,7 +55,7 @@ def register(mcp: FastMCP, strava: StravaClient) -> None:
resource=TextResourceContents( resource=TextResourceContents(
uri="internal://athlete/profile", uri="internal://athlete/profile",
mimeType="application/json", mimeType="application/json",
text=json.dumps(essential_data, indent=2), text=json.dumps(athlete, indent=2),
), ),
annotations=Annotations(audience=["assistant"]), annotations=Annotations(audience=["assistant"]),
), ),
Generated
+1 -1
View File
@@ -893,7 +893,7 @@ wheels = [
] ]
[[package]] [[package]]
name = "strava-mcp-server" name = "strava-mcp-server-hnrx"
source = { editable = "." } source = { editable = "." }
dependencies = [ dependencies = [
{ name = "fastapi" }, { name = "fastapi" },
Binary file not shown.

After

Width:  |  Height:  |  Size: 749 KiB

+206
View File
@@ -0,0 +1,206 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Strava MCP Server | Modern Training Data Access</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="bg-gradient"></div>
<div class="container">
<nav>
<div class="logo">STRAVA<span>MCP</span></div>
<ul class="nav-links">
<li><a href="#features" data-i18n="nav-features">Features</a></li>
<li><a href="#architecture" data-i18n="nav-arch">Architecture</a></li>
<li><a href="#installation" data-i18n="nav-install">Installation</a></li>
<li><a href="https://git.hnrx.net/hnrx/strava-mcp-server" data-i18n="nav-repo">GitHub</a></li>
</ul>
<div class="lang-switch">
<button class="lang-btn active" onclick="setLanguage('en')">EN</button>
<button class="lang-btn" onclick="setLanguage('de')">DE</button>
</div>
</nav>
<header class="hero">
<img src="assets/hero.png" alt="Futuristic Background" class="hero-img">
<h1 data-i18n="hero-title">Empower your AI with Strava Data.</h1>
<p data-i18n="hero-subtitle">A production-ready Model Context Protocol (MCP) server that exposes the Strava
API for AI agents and LLMs.</p>
<div class="btn-group">
<a href="https://git.hnrx.net/hnrx/strava-mcp-server" class="btn btn-primary" data-i18n="btn-start">Get
Started</a>
<a href="#architecture" class="btn btn-secondary" data-i18n="btn-more">Learn More</a>
</div>
</header>
<section id="features">
<div class="section-title">
<h2 data-i18n="features-title">Features</h2>
<p data-i18n="features-subtitle">Comprehensive access to your training data through standardized MCP
tools.</p>
</div>
<div class="grid">
<div class="card">
<span class="card-icon">👤</span>
<h3 data-i18n="feat-1-t">Athlete Profiles</h3>
<p data-i18n="feat-1-d">Detailed profiles, heart rate zones, and power stats for personalized
analysis.</p>
</div>
<div class="card">
<span class="card-icon">🚴</span>
<h3 data-i18n="feat-2-t">Activity Deep-Dive</h3>
<p data-i18n="feat-2-d">Access laps, streams, comments, and detailed segment efforts.</p>
</div>
<div class="card">
<span class="card-icon">📍</span>
<h3 data-i18n="feat-3-t">Segments & Routes</h3>
<p data-i18n="feat-3-d">Explore popular segments and your saved routes with all metadata.</p>
</div>
<div class="card">
<span class="card-icon">⚙️</span>
<h3 data-i18n="feat-4-t">Hardware Tracking</h3>
<p data-i18n="feat-4-d">Manage your equipment and track the mileage of your bikes and shoes.</p>
</div>
</div>
</section>
<section id="architecture" class="architecture">
<div>
<h2 data-i18n="arch-title">Dual-Output Architecture</h2>
<p data-i18n="arch-p">Optimized for both humans and machines. Every tool delivers two outputs:</p>
<br>
<ul style="list-style: none; color: var(--text-dim);">
<li style="margin-bottom: 1rem;"><strong style="color: var(--primary);" data-i18n="arch-user-t">User
Content:</strong> <span data-i18n="arch-user-d">Formatted markdown for an aesthetic display
in the chat.</span></li>
<li><strong style="color: #fff;" data-i18n="arch-llm-t">Assistant Resource:</strong> <span
data-i18n="arch-llm-d">Structured JSON for precise data processing by the LLM.</span></li>
</ul>
</div>
<div class="code-window">
<div class="code-header">
<div class="dot red"></div>
<div class="dot yellow"></div>
<div class="dot green"></div>
</div>
<div class="code-content">
<pre>
<span class="comment">// JSON Resource for Assistant</span>
{
<span class="keyword">"id"</span>: <span class="string">"12345678"</span>,
<span class="keyword">"name"</span>: <span class="string">"Morning Ride"</span>,
<span class="keyword">"distance"</span>: <span class="string">"45200"</span>,
<span class="keyword">"moving_time"</span>: <span class="string">"5400"</span>,
<span class="keyword">"audience"</span>: [<span class="string">"assistant"</span>]
}</pre>
</div>
</div>
</section>
<section id="installation" class="quick-start">
<h2 data-i18n="install-title">Quick Start</h2>
<p data-i18n="install-p">Start the server locally with a single command via UV.</p>
<div class="terminal">
<span>$</span> uv run strava-mcp-server
</div>
</section>
<footer>
<p>&copy; 2024 Strava MCP Server. Build for high-performance AI Agents.</p>
</footer>
</div>
<script>
const translations = {
en: {
"nav-features": "Features",
"nav-arch": "Architecture",
"nav-install": "Installation",
"nav-repo": "Source",
"hero-title": "Empower your AI with Strava Data.",
"hero-subtitle": "A production-ready Model Context Protocol (MCP) server that exposes the Strava API for AI agents and LLMs.",
"btn-start": "Get Started",
"btn-more": "Learn More",
"features-title": "Features",
"features-subtitle": "Comprehensive access to your training data through standardized MCP tools.",
"feat-1-t": "Athlete Profiles",
"feat-1-d": "Detailed profiles, heart rate zones, and power stats for personalized analysis.",
"feat-2-t": "Activity Deep-Dive",
"feat-2-d": "Access laps, streams, comments, and detailed segment efforts.",
"feat-3-t": "Segments & Routes",
"feat-3-d": "Explore popular segments and your saved routes with all metadata.",
"feat-4-t": "Hardware Tracking",
"feat-4-d": "Manage your equipment and track the mileage of your bikes and shoes.",
"arch-title": "Dual-Output Architecture",
"arch-p": "Optimized for both humans and machines. Every tool delivers two outputs:",
"arch-user-t": "User Content:",
"arch-user-d": "Formatted markdown for an aesthetic display in the chat.",
"arch-llm-t": "Assistant Resource:",
"arch-llm-d": "Structured JSON for precise data processing by the LLM.",
"install-title": "Quick Start",
"install-p": "Start the server locally with a single command via UV."
},
de: {
"nav-features": "Funktionen",
"nav-arch": "Architektur",
"nav-install": "Installation",
"nav-repo": "Quellcode",
"hero-title": "Analysiere deine Strava-Daten mit KI-Power.",
"hero-subtitle": "Ein produktionsreifer Model Context Protocol (MCP) Server, der die Strava API für AI Agents und LLMs nutzbar macht.",
"btn-start": "Loslegen",
"btn-more": "Mehr erfahren",
"features-title": "Funktionen",
"features-subtitle": "Umfangreicher Zugriff auf deine Trainingsdaten über standardisierte MCP Tools.",
"feat-1-t": "Athleten-Profile",
"feat-1-d": "Detaillierte Profile, Herzfrequenz-Zonen und Power-Stats für personalisierte Analysen.",
"feat-2-t": "Aktivitäts-Analyse",
"feat-2-d": "Zugriff auf Laps, Streams, Kommentare und detaillierte Segment-Efforts.",
"feat-3-t": "Segmente & Routen",
"feat-3-d": "Erkunde beliebte Segmente und deine gespeicherten Routen mit allen Metadaten.",
"feat-4-t": "Hardware-Tracking",
"feat-4-d": "Verwalte deine Ausrüstung und verfolge die Laufleistung deiner Bikes und Schuhe.",
"arch-title": "Dual-Output Architektur",
"arch-p": "Optimiert für Mensch und Maschine. Jedes Tool liefert zwei Ausgaben:",
"arch-user-t": "User Content:",
"arch-user-d": "Formatiertes Markdown für eine ästhetische Anzeige im Chat.",
"arch-llm-t": "Assistant Resource:",
"arch-llm-d": "Strukturiertes JSON für präzise Datenverarbeitung durch das LLM.",
"install-title": "Schnellstart",
"install-p": "Starte den Server lokal mit nur einem Befehl über UV."
}
};
function setLanguage(lang) {
localStorage.setItem('preferredLang', lang);
// Update all text elements
document.querySelectorAll('[data-i18n]').forEach(el => {
const key = el.getAttribute('data-i18n');
if (translations[lang][key]) {
el.textContent = translations[lang][key];
}
});
// Update toggle buttons
document.querySelectorAll('.lang-btn').forEach(btn => {
btn.classList.remove('active');
if (btn.textContent.toLowerCase() === lang) {
btn.classList.add('active');
}
});
document.documentElement.lang = lang;
}
// Initialize from storage or browser language
const savedLang = localStorage.getItem('preferredLang') || (navigator.language.startsWith('de') ? 'de' : 'en');
setLanguage(savedLang);
</script>
</body>
</html>
+325
View File
@@ -0,0 +1,325 @@
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');
:root {
--primary: #FC4C02;
--primary-glow: rgba(252, 76, 2, 0.4);
--bg-dark: #0A0A0A;
--bg-card: rgba(255, 255, 255, 0.05);
--text-main: #FFFFFF;
--text-dim: #A0A0A0;
--glass-border: rgba(255, 255, 255, 0.1);
--transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Outfit', sans-serif;
background-color: var(--bg-dark);
color: var(--text-main);
line-height: 1.6;
overflow-x: hidden;
}
/* Background Effects */
.bg-gradient {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(circle at 80% 20%, #1a100a 0%, transparent 40%),
radial-gradient(circle at 10% 80%, #0d0a14 0%, transparent 40%);
z-index: -1;
}
/* Layout */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 2rem;
}
/* Navigation */
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 2rem 0;
backdrop-filter: blur(10px);
position: sticky;
top: 0;
z-index: 100;
}
.logo {
font-size: 1.5rem;
font-weight: 800;
letter-spacing: -1px;
display: flex;
align-items: center;
gap: 0.5rem;
}
.logo span {
color: var(--primary);
}
.nav-links {
display: flex;
gap: 2.5rem;
list-style: none;
}
.nav-links a {
color: var(--text-dim);
text-decoration: none;
font-size: 0.9rem;
font-weight: 500;
transition: var(--transition);
}
.nav-links a:hover {
color: var(--primary);
}
.lang-switch {
display: flex;
gap: 0.5rem;
background: rgba(255, 255, 255, 0.05);
padding: 0.25rem;
border-radius: 100px;
border: 1px solid var(--glass-border);
}
.lang-btn {
padding: 0.4rem 0.8rem;
border-radius: 100px;
font-size: 0.75rem;
font-weight: 600;
cursor: pointer;
border: none;
background: transparent;
color: var(--text-dim);
transition: var(--transition);
}
.lang-btn.active {
background: var(--primary);
color: white;
}
/* Hero Section */
.hero {
padding: 8rem 0;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
position: relative;
}
.hero-img {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 140%;
opacity: 0.15;
pointer-events: none;
z-index: -1;
}
.hero h1 {
font-size: 5rem;
font-weight: 800;
line-height: 1.1;
margin-bottom: 1.5rem;
background: linear-gradient(to bottom, #fff 40%, #888);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.hero p {
font-size: 1.25rem;
color: var(--text-dim);
max-width: 600px;
margin-bottom: 3rem;
}
.btn-group {
display: flex;
gap: 1.5rem;
}
.btn {
padding: 1rem 2.5rem;
border-radius: 100px;
font-weight: 600;
text-decoration: none;
transition: var(--transition);
font-size: 1rem;
}
.btn-primary {
background: var(--primary);
color: white;
box-shadow: 0 10px 30px var(--primary-glow);
}
.btn-primary:hover {
transform: translateY(-5px);
box-shadow: 0 15px 40px var(--primary-glow);
}
.btn-secondary {
background: rgba(255, 255, 255, 0.05);
color: white;
border: 1px solid var(--glass-border);
backdrop-filter: blur(10px);
}
.btn-secondary:hover {
background: rgba(255, 255, 255, 0.1);
}
/* Features Grid */
.section-title {
text-align: center;
margin-bottom: 4rem;
}
.section-title h2 {
font-size: 3rem;
margin-bottom: 1rem;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
margin-bottom: 8rem;
}
.card {
background: var(--bg-card);
border: 1px solid var(--glass-border);
padding: 3rem;
border-radius: 2rem;
transition: var(--transition);
backdrop-filter: blur(20px);
}
.card:hover {
border-color: var(--primary);
transform: translateY(-10px);
background: rgba(252, 76, 2, 0.03);
}
.card-icon {
font-size: 2.5rem;
margin-bottom: 1.5rem;
display: block;
}
.card h3 {
font-size: 1.5rem;
margin-bottom: 1rem;
}
.card p {
color: var(--text-dim);
}
/* Code Preview Section */
.architecture {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 4rem;
align-items: center;
margin-bottom: 8rem;
background: rgba(255, 255, 255, 0.02);
padding: 4rem;
border-radius: 3rem;
border: 1px solid var(--glass-border);
}
.code-window {
background: #000;
border-radius: 1rem;
overflow: hidden;
border: 1px solid var(--glass-border);
box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.code-header {
background: #1A1A1A;
padding: 0.75rem 1rem;
display: flex;
gap: 0.5rem;
}
.dot {
width: 12px;
height: 12px;
border-radius: 50%;
}
.red { background: #FF5F56; }
.yellow { background: #FFBD2E; }
.green { background: #27C93F; }
.code-content {
padding: 1.5rem;
font-family: 'Monaco', 'Consolas', monospace;
font-size: 0.85rem;
color: #f8f8f2;
}
.code-content pre {
white-space: pre-wrap;
}
.keyword { color: #ff79c6; }
.string { color: #f1fa8c; }
.comment { color: #6272a4; }
/* Quick Start */
.quick-start {
text-align: center;
max-width: 800px;
margin: 0 auto 8rem;
}
.terminal {
background: #111;
padding: 1.5rem 2rem;
border-radius: 1rem;
font-family: monospace;
margin-top: 2rem;
display: inline-block;
border: 1px solid var(--glass-border);
}
.terminal span {
color: var(--primary);
margin-right: 1rem;
}
footer {
padding: 4rem 0;
border-top: 1px solid var(--glass-border);
text-align: center;
color: var(--text-dim);
}
/* Mobile Responsiveness */
@media (max-width: 768px) {
.hero h1 { font-size: 3rem; }
.architecture { grid-template-columns: 1fr; padding: 2rem; }
.nav-links { display: none; }
}