개발자

Authmarks MCP server for AI agents: connect Claude Code, Cursor and more

Connect AI agents to Authmarks with the Model Context Protocol: the read-only MCP endpoint, its tools and scopes, setup for Claude Code, Cursor and mcp-remote, example prompts and troubleshooting.

2026-11-26 게시 · 5분 분량

Endpointhttps://www.authmarks.com/api/mcp
TransportMCP Streamable HTTP, stateless, JSON responses
Protocol versions2025-06-18 and 2025-03-26
AuthBearer token (amk_ organisation API token)
ToolsSix, all read-only

What you get: a read-only MCP server that lets an AI agent answer questions about your Authmarks organisation, such as "which LMS connections are waiting for approval?" or "which grade returns failed this week?", without you writing any API code. The Model Context Protocol (MCP) is an open standard that lets AI applications call external tools through one common interface. The Authmarks server exposes the same data as the REST API, behind the same organisation token and scopes, and it has no tools that change anything.

Endpoint and transport

ItemValue
URLPOST https://www.authmarks.com/api/mcp
TransportMCP Streamable HTTP, stateless. Each request stands alone; there is no session id.
Responsesapplication/json. The server does not open an SSE stream.
Protocol versions2025-06-18 and 2025-03-26
Methodsinitialize, notifications/initialized (answers 202), ping, tools/list, tools/call
Other HTTP methodsGET and DELETE answer 405
AuthAuthorization: Bearer amk_… on every request
LimitsBody up to 64 KB, one JSON-RPC message per request (no batches), 600 requests a minute per token

Tools

Every tool is read-only and needs the scope shown. Results come back as text content and also as structuredContent, so agents can read the fields directly.

ToolInputsReturnsScope
list_lms_connectionsnoneLMS connections: id, label, issuer, client_id, product, status (pending, active, disabled), source, deployments, created_at, approved_atlms_read
list_grade_returnsconnection_id (required), limit, cursorGrade returns: id, resource_link_id, lineitem, activity_progress, grading_progress, status (sent, failed), created_at, plus next_cursorlms_read
list_assignmentslimit, cursorAssignments: id, title, status, course_id, module_id, starts_at, due_at, created_at, plus next_cursorassignments_read
list_submissionsassignment_id (required), limit, cursorSubmissions: student (id, name, email), document_id, sealed, record_id, sealed_at, record_url, plus next_cursorrecords_read
get_recordrecord_id (required)One record: id, document_id, sealed_at, content_sha256, record_url, verify_urlrecords_read
verify_hashsha256 (required, 64 hex)The same answer as the public verify-by-hash checkany valid token

limit is 1 to 200 (default 50). Field meanings are in the API reference. No tool returns scores, percentages or detector output.

Step 1: create a token for the agent

Give every agent its own token, with only the scopes its job needs:

  1. Open Settings → Developers → API tokens (owners and admins).
  2. Create a token labeled for the agent and the person, for example agent-claude-code-jlee.
  3. Pick scopes. For LMS questions only, lms_read is enough. Add records_read only if the agent needs student submissions.
  4. Set an expiry that fits how long the agent will run.
  5. Copy the token (shown once) into an environment variable:
export AUTHMARKS_TOKEN="amk_paste_your_token_here"

The Developers tab also shows these setup snippets with your organisation filled in.

Step 2: connect your client

Claude Code

claude mcp add --transport http authmarks https://www.authmarks.com/api/mcp --header "Authorization: Bearer $AUTHMARKS_TOKEN"

Run /mcp inside Claude Code to check that authmarks is connected and its six tools are listed.

Cursor

Create .cursor/mcp.json in your project (or ~/.cursor/mcp.json for every project):

{
  "mcpServers": {
    "authmarks": {
      "url": "https://www.authmarks.com/api/mcp",
      "headers": { "Authorization": "Bearer ${env:AUTHMARKS_TOKEN}" }
    }
  }
}

${env:AUTHMARKS_TOKEN} reads the token from your environment, so the file itself holds no secret and is safe to commit. Restart Cursor after setting the variable.

Any other client (mcp-remote)

Clients that only launch local (stdio) servers, or cannot send custom headers, can use the mcp-remote bridge:

npx mcp-remote https://www.authmarks.com/api/mcp --header "Authorization:Bearer ${AUTHMARKS_TOKEN}"

In a JSON client config, that looks like:

{
  "mcpServers": {
    "authmarks": {
      "command": "npx",
      "args": ["mcp-remote", "https://www.authmarks.com/api/mcp", "--header", "Authorization:Bearer ${AUTHMARKS_TOKEN}"],
      "env": { "AUTHMARKS_TOKEN": "amk_paste_your_token_here" }
    }
  }
}

There is no space after Authorization: in the bridge's argument; some clients split arguments on spaces. If your client stores the env block in a shared file, set the variable in your shell instead.

Test it with curl

You can call the server directly to see exactly what an agent sees:

curl -sS https://www.authmarks.com/api/mcp \
  -H "Authorization: Bearer $AUTHMARKS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}'
curl -sS https://www.authmarks.com/api/mcp \
  -H "Authorization: Bearer $AUTHMARKS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "MCP-Protocol-Version: 2025-06-18" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_lms_connections","arguments":{}}}'
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "content": [{ "type": "text", "text": "{\"data\":[{\"id\":\"lc_9a8b7c6d\",\"label\":\"Moodle staging\",\"status\":\"pending\"}],\"next_cursor\":null}" }],
    "structuredContent": {
      "data": [
        {
          "id": "lc_9a8b7c6d",
          "label": "Moodle staging",
          "issuer": "https://moodle.example.edu",
          "client_id": "ZqP3x0aBcD",
          "product": "moodle",
          "status": "pending",
          "source": "dynamic",
          "deployments": [],
          "created_at": "2026-11-24T16:40:00Z",
          "approved_at": null
        }
      ],
      "next_cursor": null
    }
  }
}

The text content above is shortened for the page.

Example prompts

  • "Which LMS connections are waiting for approval?"
  • "List grade returns that failed this week, grouped by connection."
  • "Which assignments are due in the next seven days?"
  • "For the assignment 'Essay 2', how many submissions are sealed and how many are not? List the unsealed ones by student name."
  • "Get record rec_k9x2_a1_4f8e2c1d9b7a6e5f and give me its verification link."
  • "Is this SHA-256 sealed by Authmarks: 9f2c4a1b…?"

The agent decides which tools to call. If it lacks a scope, the tool answers with a forbidden error and a good agent will tell you which scope is missing.

Safety by design

  • Read-only. There are no write tools. The server cannot create, change or delete anything, so a confused or manipulated agent cannot alter your data through it.
  • Scoped tokens. Each tool checks the token's scope. A token for LMS health cannot read student submissions.
  • One organisation. A token only reaches its own organisation.
  • Origin checks. A browser request whose Origin header is not the Authmarks site is refused, which blocks DNS-rebinding attacks from web pages.
  • Small requests. A 64 KB body limit and no batches keep each call simple to audit.
  • Revocable. Revoking the token in Settings ends the agent's access at once.

Student names and emails are personal data. Give records_read only to agents that need it, and remember that whatever a tool returns becomes part of the agent's conversation with its model provider. See Building with AI agents and Security for integrations.

Troubleshooting

SymptomCause and fix
401 on every callThe header is missing or the token is wrong, revoked or expired. Check that the environment variable is set in the shell that started the client (echo ${AUTHMARKS_TOKEN:0:4} should print amk_).
A tool answers forbidden (403)The token lacks that tool's scope, or the plan lacks LTI for lms_read. Create a token with the scope.
429Over 600 requests a minute for this token. Wait Retry-After seconds; ask the agent to use limit=200 instead of many small pages.
405The client sent GET (an SSE stream) or DELETE (session end). This server is stateless and JSON-only; current clients fall back to POST automatically. Update the client if it does not.
Unsupported protocol versionUse a client that speaks 2025-06-18 or 2025-03-26.
400 or parse errorThe body is over 64 KB, is not JSON, or is a JSON-RPC batch (an array). Send one message per request.
Refused from a browser-based toolThe request carried an Origin header from another site. Call the server from a desktop client, a server or mcp-remote.
Tools list is emptyThe client did not finish initialize. Remove and re-add the server, then check /mcp (Claude Code) or Cursor's MCP settings.

출처

변경 내역

  • 2026-11-26 — First published.

오류를 발견하셨나요? sales@authmarks.com으로 이메일을 보내 주시면 페이지를 수정하고 수정 날짜를 표시하겠습니다.