AI-Chat with Strava — Developing an LLM-Integration with MCP
Summary
This article details the development of an AI-powered integration between Strava and Anthropic's Claude, enabling users to analyze personal training data through natural language chat. The author utilized Claude Code within Visual Studio Code to program an MCP (Multi-modal Conversational Protocol) server in TypeScript. The process involved setting up a Strava developer app to obtain API credentials (Client ID, Client Secret, Access Token), configuring environment variables, and connecting the local MCP server to the Claude Desktop App via its developer settings. The integration successfully allowed Claude to retrieve and analyze Strava activity data, identify training trends (e.g., decreasing speed, reduced frequency, consistent routes), and generate personalized recommendations for improving running performance. The entire development and testing process was completed in approximately two hours.
Key takeaway
For AI Engineers and developers looking to create personalized data analysis tools, this project demonstrates a practical approach. You can leverage LLM coding assistants like Claude Code to rapidly develop integrations with third-party APIs, such as Strava, via an MCP server. This allows for natural language querying and AI-driven insights into personal data, significantly reducing development time and enabling novel application possibilities.
Key insights
Integrating LLMs with third-party APIs enables powerful, personalized data analysis and actionable recommendations.
Principles
- LLMs can autonomously research and plan complex coding tasks.
- Local MCP servers facilitate secure, private data integration with LLMs.
Method
Use an LLM's coding assistant (e.g., Claude Code) to generate an MCP server for a target API (e.g., Strava), configure API credentials, and connect the server to the LLM's desktop application for chat-based data interaction.
In practice
- Develop custom data analysis tools using LLM coding assistants.
- Integrate personal fitness trackers with AI for tailored coaching.
- Automate API interaction and data interpretation via natural language.
Topics
- LLM Integration
- AI Code Generation
- Strava API
- Sports Performance Analysis
- MCP Protocol
Code references
Best for: AI Engineer, Machine Learning Engineer, Software Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Towards AI - Medium.