mq_login
Authenticate to the Agent-MQ message queue using a token to enable AI agents to communicate across sessions and machines.
Instructions
Login with a token. Server defaults to config.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | ||
| server | No |
Implementation Reference
- mcp/src/index.ts:55-63 (handler)The tool 'mq_login' is defined and its handler is implemented inline in mcp/src/index.ts.
server.tool("mq_login", "Login with a token. Server defaults to config.", { token: z.string(), server: z.string().optional(), }, async ({ token, server: srv }) => { const cfg = client.loadConfig(); const finalServer = srv?.replace(/\/+$/, "") || cfg.server; client.saveConfig({ server: finalServer, token }); return { content: [{ type: "text", text: JSON.stringify({ status: "ok", server: finalServer }) }] }; });