{% extends 'dg_core/base.html' %} {% load i18n %} {% block title %}{% translate "Connect an agent" %}{% endblock %} {% block content %}

{% translate "Connect an agent" %}

{% blocktranslate trimmed %} An agent such as Claude works here as you: it reaches only what you may use yourself, and loses an app the moment you do. What it changes says so in the history. {% endblocktranslate %}

{% translate "Claude: claude.ai, Desktop and mobile" %}

{% blocktranslate trimmed %} In Claude, open Settings › Connectors, choose Add custom connector, and paste this address. Claude then asks you to sign in here and allow it. {% endblocktranslate %}

{% if not request.is_secure %}

{% blocktranslate trimmed %} Claude reaches this site from Anthropic's servers, so only when it is on the internet over HTTPS. On an internal network, use Claude Code instead. {% endblocktranslate %}

{% endif %}
Claude Code

{% blocktranslate trimmed %}Run this once, then /mcp in Claude Code to sign in here in your browser:{% endblocktranslate %}

claude mcp add --transport http datagroceries {{ mcp_url }}
{% translate "VS Code (Copilot in agent mode)" %}

{% blocktranslate trimmed %}Put this in .vscode/mcp.json and start the server: VS Code asks you to sign in here in your browser.{% endblocktranslate %}

{"servers": {"datagroceries": {"type": "http", "url": "{{ mcp_url }}"}}}
{% translate "Connected apps" %}
{% for connection in connections %}
{{ connection.application.name }}
{% blocktranslate with date=connection.since|date:"j M Y" %}signed in {{ date }}{% endblocktranslate %}
{% csrf_token %}
{% empty %}

{% translate "No app has signed in as you yet." %}

{% endfor %}

{% translate "Personal tokens" %}

{% blocktranslate trimmed %} For scripts, CI and agents that cannot sign in the way Claude does. A program sends the token with every request as Authorization: Bearer <token>. Make one per program, so you can revoke it on its own. {% endblocktranslate %}

{% translate "Your tokens" %}
{% for token in tokens %}
{{ token.name }}
{{ token.get_scopes_display }}
{% if token.is_expired %}{% translate "expired" %}{% elif token.is_inactive %}{% translate "stopped: unused for three months" %}{% elif token.expires_at %}{% blocktranslate with date=token.expires_at|date:"j M Y" %}expires {{ date }}{% endblocktranslate %}{% else %}{% translate "until revoked" %}{% endif %} · {% if token.last_used_at %}{% blocktranslate with date=token.last_used_at|date:"j M Y" %}last used {{ date }}{% endblocktranslate %}{% else %}{% translate "never used" %}{% endif %}
{% csrf_token %}
{% empty %}

{% translate "You have no tokens yet." %}

{% endfor %}
{% translate "New token" %}
{% csrf_token %}
{% translate "What it may open" %}
{% for value, label in scopes %}
{% endfor %}

{% translate "A connection or a token stops after three months without use." %}

{% endblock %}