{# "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}}}} %}
{% call ui.note('What the AI can do') %} {% endcall %} {% if token %} {% call ui.note('Copy your token now', 'warning') %}

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 %}
  • Claude and most apps log in by themselves (first tab below). Skip this step for them.
  • {% endif %}
  • Close this, press New token, give it a name and save.
  • The token is shown once, with these steps filled in for it.
  • {% endcall %} {% endif %}
    {{ 1 if token else 2 }}

    Add this panel to your AI app

    {{ ui.copy('Server URL', url) }} {% if oauth and not token %}

    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) }}
    {% endif %}

    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)) }}
    {% call ui.part(2 if token else 3, 'Try it') %}
  • Ask your AI something like "Which resources are in my Tungsten panel?" or "Show the 5 newest orders".
  • The first time, the app may ask you to allow the Tungsten tools.
  • {% endcall %} {% call ui.note('Keep it safe', 'warning') %}

    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 %}