
iceener/tesla-streamable-mcp-server
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
MCP Server for interacting with Tesla (via Tessie API). Written in TypeScript, Node and Hono.dev
Обзор
Streamable HTTP MCP server for Tesla vehicle control via the Tessie API. this repository pins @modelcontextprotocol/server and the test-only @modelcontextprotocol/client to 2.0.0-beta.5, with Zod 4 and the candidate 2026-07-28 protocol. The dated protocol and stable v2 SDK are not final at this commit; do not claim final conformance until the release gate is verified. The Bun and Cloudflare Workers entry points share one fetch-native handler per deployment and create a fresh MCP server for every request. Modern HTTP is stateless; compatibility with 2025-era clients uses the SDK's stateless fallback and does not create MCP sessions. You connect this server to your MCP client at your own responsibility. Language models can make mistakes, misinterpret instructions, or perform unintended actions. Always verify commands before execution, especially for actions like unlocking, opening trunks, or sending navigation destinations.
README
Показан фрагмент оригинального README. Открыть оригинал.
Tesla MCP Server
Streamable HTTP MCP server for Tesla vehicle control via the Tessie API.
Release status (2026-07-27): this repository pins
@modelcontextprotocol/serverand the test-only@modelcontextprotocol/clientto2.0.0-beta.5, with Zod 4 and the candidate2026-07-28protocol. The dated protocol and stable v2 SDK are not final at this commit; do not claim final conformance until the release gate is verified.
The Bun and Cloudflare Workers entry points share one fetch-native handler per deployment and create a fresh MCP server for every request. Modern HTTP is stateless; compatibility with 2025-era clients uses the SDK’s stateless fallback and does not create MCP sessions.
Author: overment
[!WARNING] You connect this server to your MCP client at your own responsibility. Language models can make mistakes, misinterpret instructions, or perform unintended actions. Always verify commands before execution, especially for actions like unlocking, opening trunks, or sending navigation destinations.
The HTTP layer enforces bounded request bodies, exact Host and Origin allowlists, strict CORS, and static bearer authentication when enabled. A production deployment must still set its real HTTPS
MCP_PUBLIC_URLand exact allowlists, protect secrets, and provide appropriate rate limiting and audit controls.
Notice
This repo works in two ways:
- As a fetch-native Bun server for local workflows
- As a fetch-native Cloudflare Worker for remote interactions
Features
- ✅ State — Battery, range, location, climate, doors, charging status
- ✅ Commands — Lock/unlock, climate, trunks, sentry, navigation
- ✅ Location-aware — GPS coordinates for context-aware interactions
- ✅ Dual Runtime — Node.js/Bun or Cloudflare Workers
Design Principles
- LLM-friendly: Two unified tools, not 1:1 API mirrors
- Watch-ready: Designed for AI agents with location context
- Secure: Tessie API key stored as secret, clients use separate bearer token
- Clear feedback: Detailed command results and vehicle state
Installation
Prerequisites: Bun, Tessie Account.
Ways to Run (Pick One)
- Local Development — Standard setup with bearer token auth
- Cloudflare Worker (wrangler dev) — Local Worker testing
- Cloudflare Worker (deploy) — Remote production
1. Local Development — Quick Start
-
Get Tessie credentials:
- Visit developer.tessie.com
- Go to Developer Settings → Generate Access Token
- Copy your access token
- Note your vehicle’s VIN
-
Configure environment:
cd tesla-mcp
bun install
cp .env.example .env
Edit .env:
PORT=3000
AUTH_ENABLED=true
AUTH_STRATEGY=bearer
# Generate with: openssl rand -hex 32
BEARER_TOKEN=your-random-auth-token
# Tessie credentials
Установка
npx mcp-remote http://localhost:3000/mcp --transport http-onlyКонфигурация
{
"mcpServers": {
"tesla": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:3000/mcp", "--transport", "http-only"],
"env": { "NO_PROXY": "127.0.0.1,localhost" }
}
}
}