- Rename MCPToken to UserToken across models, views, and tests - Update URL names from mcp-token-* to token-* - Add Daedalus/Pallas integration design doc (v2) - Switch docker-compose to build local mnemosyne:local image via shared build config instead of pulling from git.helu.ca
35 lines
1.4 KiB
Python
35 lines
1.4 KiB
Python
"""URL routes for the per-user API token self-service dashboard.
|
|
|
|
Mounted at ``/profile/tokens/…``. Humans use this surface to mint
|
|
opaque :class:`mcp_server.models.UserToken` rows that authenticate to
|
|
Mnemosyne — used by MCP tool clients (Claude Desktop, Cline) on
|
|
``/mcp/`` and by the Daedalus REST integration on
|
|
``/library/api/*`` / ``/mcp_server/api/teams/*``.
|
|
|
|
Other MCP-server surfaces live elsewhere:
|
|
|
|
* ``/mcp_server/api/…`` (DRF control plane consumed by Daedalus) is
|
|
mounted at project root — see ``mnemosyne.urls`` and
|
|
``mcp_server.api.urls`` — and keeps its own ``mcp-server-api``
|
|
namespace.
|
|
* The MCP bearer-auth surface itself (tool calls via
|
|
``Authorization: Bearer …``) is mounted by ``mnemosyne.asgi`` at
|
|
``/mcp/`` and is not routed here.
|
|
"""
|
|
|
|
from django.urls import path
|
|
|
|
from . import views
|
|
|
|
app_name = "mcp_server"
|
|
|
|
urlpatterns = [
|
|
# Self-service token dashboard (human-facing).
|
|
path("profile/tokens/", views.token_list, name="token-list"),
|
|
path("profile/tokens/add/", views.token_create, name="token-create"),
|
|
path("profile/tokens/<int:pk>/", views.token_detail, name="token-detail"),
|
|
path("profile/tokens/<int:pk>/edit/", views.token_edit, name="token-edit"),
|
|
path("profile/tokens/<int:pk>/revoke/", views.token_revoke, name="token-revoke"),
|
|
path("profile/tokens/<int:pk>/delete/", views.token_delete, name="token-delete"),
|
|
]
|