{# "How to connect" popup of the AI access (MCP) screen: one tab per AI app. Right after "New token" it shows the new token, filled into every snippet. vars: url, read_only, token (or None) #} {% import "tungsten_mcp/macros.html" as ui with context %} {% set b = 'font-medium text-gray-950 dark:text-white' %} {% set tabs = ([('claude', 'Claude app', 'sparkles')] if oauth and not token else []) + [('code', 'Claude Code', 'terminal'), ('desktop', 'Claude Desktop', 'monitor'), ('other', 'Other apps', 'plug')] %} {% set secret = token or 'YOUR_TOKEN' %} {% set claude_code = 'claude mcp add --transport http tungsten ' ~ url ~ ' --header "Authorization: Bearer ' ~ secret ~ '"' %} {% set desktop = {"mcpServers": {"tungsten": {"command": "npx", "args": ["-y", "mcp-remote", url, "--header", "Authorization:${AUTH_HEADER}"], "env": {"AUTH_HEADER": "Bearer " ~ secret}}}} %} {% set other = {"mcpServers": {"tungsten": {"type": "http", "url": url, "headers": {"Authorization": "Bearer " ~ secret}}}} %}
It is shown only this once. Lost it? Revoke it and make a new one. The steps below already have it filled in.
{{ ui.copy(None, token) }} {% endcall %} {% else %} {% call ui.part(1, 'Make a token' if not oauth else 'Make a token (only for apps without login)') %} {% if oauth %}No token needed. In Claude (web, desktop or phone) open Settings, Connectors, Add custom connector, paste the Server URL above and press Add, then Connect. Log in here and press Allow.
Claude Code works the same way: run this, then type /mcp in Claude Code to log in.
{{ ui.code('claude mcp add --transport http tungsten ' ~ url) }}Run this in a terminal{% if not token %}, with your token in place of YOUR_TOKEN{% endif %}:
{{ ui.code(claude_code) }}In Claude Desktop open Settings, Developer, Edit Config, add this to the file, {% if not token %}put in your token, {% endif %}save and restart Claude. It needs Node.js on your computer.
{{ ui.code(desktop | tojson(indent=2)) }}Cursor, VS Code, Windsurf and other MCP apps: add a Streamable HTTP server with the URL above and this header. Many apps take this JSON as is:
{{ ui.code(other | tojson(indent=2)) }}A token opens your data like your password does. Don't paste it in chats or code you share. Use a read-only token when the AI only needs to look.
{% endcall %}