This file gives Claude context about this project when used with Claude Code.
mcp-teamviewer is an MCP (Model Context Protocol) server that exposes the TeamViewer Web API v1 as callable tools for Claude.
MCP_TV/
├── src/mcp_teamviewer/
│ ├── server.py # All MCP tools are defined here
│ └── __init__.py
├── pyproject.toml # Build config (hatchling), entry point: mcp-teamviewer
├── .env # Local only — contains TEAMVIEWER_API_TOKEN (gitignored)
├── .mcp.json # Local only — Claude Code MCP config (gitignored)
├── .env.example # Template for required environment variables
└── .mcp.json.example # Template for Claude Code / Claude Desktop config
# 1. Install the package
pip install -e .
# 2. Set your TeamViewer API token
cp .env.example .env
# Edit .env and add your TEAMVIEWER_API_TOKEN
# 3. Configure Claude Code
cp .mcp.json.example .mcp.json
# Edit .mcp.json if needed (e.g. use full path to venv binary)| Variable | Required | Description |
|---|---|---|
TEAMVIEWER_API_TOKEN |
Yes | TeamViewer Script Token from your account profile |
Get a token: Log in → Edit Profile → Apps → Create Script Token.
To verify the server starts and the token is valid:
# Quick API check (no MCP needed)
curl -H "Authorization: Bearer $TEAMVIEWER_API_TOKEN" \
https://webapi.teamviewer.com/api/v1/ping
# Expected: {"token_valid":true}To start the MCP server manually:
mcp-teamviewer
# or, if using a local venv:
.venv/bin/mcp-teamviewer- All tools are defined in
src/mcp_teamviewer/server.py - API base URL:
https://webapi.teamviewer.com/api/v1 - Auth: Bearer token via
TEAMVIEWER_API_TOKENenv var, loaded withpython-dotenv - HTTP client:
httpx(async) - MCP framework:
mcp>=1.0.0
New tools follow this pattern in server.py:
@server.tool()
async def tool_name(param: str) -> str:
"""Description shown to Claude."""
resp = await client.get("/endpoint", params={"key": param})
resp.raise_for_status()
return resp.text.env— contains real API token.mcp.json— may contain real API token and local paths.claude/— local Claude Code settings
Both are listed in .gitignore.