Skip to main content
Glama
relation-mcp

relation-mcp

relation-mcp

CI npm version License: MIT

A Model Context Protocol server for Re:lation (by 株式会社インゲージ). Lets Claude / Claude Code / any MCP client search and triage support tickets, create internal records, and inspect the address book directly from an agent.

Works against the official Re:lation REST API (https://<tenant>.relationapp.jp/api/v2/). Read the full API reference at developer.ingage.jp.

Features

  • search_tickets — filter by status, assignee, labels, free-text query

  • get_ticket / update_ticket — fetch detail, change status/assignee/labels

  • reply_mail — customer-facing email reply, guarded by a confirm_send: true interlock

  • list_mail_accounts — discover the mail_account_id needed for reply_mail

  • create_record — post an internal 応対メモ (not visible to the customer)

  • create_comment — post a team comment on a ticket

  • search_customers / get_customer — address-book lookup

  • list_labels / list_users — reference data for scripting automations

  • Built-in token-bucket rate limiter (stays under the 60 req/min tenant limit)

  • Typed errors (RelationApiError, RelationAuthError, RelationRateLimitError)

Safety note on reply_mail

reply_mail sends a real email to the customer on the ticket. To keep agents from accidentally firing it during tool chaining, the tool requires a confirm_send: true parameter — if missing or false, the call is rejected before hitting the Re:lation API. Use it deliberately.

Related MCP server: Tiflux

Install

npm install -g relation-mcp
# or run ad-hoc with npx
npx relation-mcp

Configure

Generate an access token in Re:lation (admin UI → API token), then export:

export RELATION_SUBDOMAIN=yourtenant          # the part before .relationapp.jp
export RELATION_MESSAGE_BOX_ID=1              # default 受信箱 ID
export RELATION_ACCESS_TOKEN=your_token_here

A copy of .env.example is included for reference.

Use with Claude Code / Claude Desktop

Add this to your MCP config (e.g. ~/.claude/config.json or the Claude Desktop config):

{
  "mcpServers": {
    "relation": {
      "command": "npx",
      "args": ["-y", "relation-mcp"],
      "env": {
        "RELATION_SUBDOMAIN": "yourtenant",
        "RELATION_MESSAGE_BOX_ID": "1",
        "RELATION_ACCESS_TOKEN": "your_token_here"
      }
    }
  }
}

Then prompt the agent:

Find tickets where status is open and the subject contains "本人確認", then summarize the top 5.

Tool reference

All tools accept an optional message_box_id to override the default for a single call.

Tool

Purpose

search_tickets

POST /tickets/search — status, assignee, label, color, free text

get_ticket

GET /tickets/{id}

update_ticket

PUT /tickets/{id} — status, assignee, labels, color, pending reason

reply_mail

POST /mails/reply — customer-facing reply (requires confirm_send: true)

list_mail_accounts

GET /mail_accounts — lookup mail_account_id

create_record

POST /records — internal 応対メモ

create_comment

POST /comments — internal team comment

search_customers

POST /customers/search — address-book search

get_customer

GET /customers/{id}

list_labels

GET /labels

list_users

GET /users

Development

git clone https://github.com/sewon-supernova/relation-mcp.git
cd relation-mcp
npm install
npm run typecheck
npm test
npm run build

Run locally against a real tenant:

cp .env.example .env   # fill in values
npm run build
node dist/index.js     # speaks MCP over stdio

Roadmap

  • list_message_boxes

  • list_pending_reasons / list_case_categories

  • Pagination helpers (auto-iterate page)

  • Prompt templates (MCP prompts/*) for common triage flows

  • E2E tests against a staging tenant

  • Docker image

License

MIT — see full text.

Not affiliated with 株式会社インゲージ

This is an unofficial, community-maintained client. "Re:lation" and "relationapp.jp" are trademarks of their respective owners.

Available Tools

11 tools
create_commentCreate a team comment on a ticketA

Post a team comment to a ticket. Not visible to the customer — used for internal discussion.

Inputs: ticket_id (required), body (required), message_box_id, operator_id.

create_recordCreate an internal record (応対メモ)A

Create an internal "応対メモ" on a ticket. Visible only to the support team; the end customer never sees it. Use this for triage notes, investigation context, or handoff messages.

Inputs: ticket_id (required), body (required), message_box_id, operator_id, +2 more.

get_customerGet a customerB

Fetch a single customer (address-book entry) by id.

Inputs: customer_id (required), message_box_id.

get_ticketGet a single ticketA

Fetch a single ticket by ticket_id, including all messages and metadata.

Inputs: ticket_id (required), message_box_id.

list_labelsList labels in a message boxB

List all labels configured for a message_box. Useful before calling update_ticket with label_ids.

Inputs: message_box_id.

list_mail_accountsList configured mail accountsA

List the mail accounts (送信元) configured for a message_box. Use this to discover mail_account_id before calling reply_mail.

Inputs: message_box_id.

list_usersList operators (agents) for assignmentC

List operator users who can be assigned to tickets.

Inputs: message_box_id.

reply_mailReply to a ticket via email (CUSTOMER-FACING — sends real mail)A

Send an email reply on a Re:lation ticket. The email goes directly to the customer.

Safety: you MUST pass confirm_send: true. Without it the call is rejected. This guards against an agent accidentally firing a send during tool chaining.

Flow:

  1. Find the message to reply to (use get_ticket or search_tickets to find a message_id).

  2. Find the mail_account_id to send from (use list_mail_accounts).

  3. Call reply_mail with subject / body / to / status_cd / confirm_send.

After a successful send the returned object contains the new message_id and ticket_id.

Inputs: message_id (required), mail_account_id (required), to (required), subject (required), +8 more.

search_customersSearch address book (顧客/アドレス帳)B

Search customers in the address book by email, phone, name, or company.

Inputs: message_box_id, emails, tels, last_name, +4 more.

search_ticketsSearch Re:lation ticketsC

Search tickets by status, label, assignee, date range, and free-text query. Returns a paginated list.

Inputs: message_box_id, status_cds, assignee_ids, label_ids, +5 more.

update_ticketUpdate a ticketB

Update ticket status, assignee, labels, color, or pending reason. Only provided fields are changed.

Inputs: ticket_id (required), message_box_id, status_cd, assignee_id, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 11 tools

    Disambiguation4/5

    Tool purposes are mostly distinct, but `create_comment` and `create_record` both create internal notes with nearly identical functionality, which could cause confusion for an agent. The descriptions help differentiate slightly.

    Naming Consistency5/5

    All tool names follow a consistent `verb_noun` pattern in snake_case (e.g., `create_record`, `search_tickets`), making the naming predictable and unambiguous.

    Tool Count5/5

    With 11 tools, the set is well-scoped for a ticket management system, covering the essential operations without being overly numerous or sparse.

    Completeness2/5

    Notable gaps exist: there is no `create_ticket` tool, so agents cannot initiate new tickets. Additionally, no delete or update operations for comments or records, and no customer creation/update, which limits the agent's ability to fully manage the domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables MCP clients to drive Relay, an AI support-triage agent, by exposing tools for customer lookup, documentation search, ticket classification, reply, and escalation, with full guardrails and read-only mode option.
      7
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to query and operate a help desk and service desk through MCP over HTTP, including tickets, requester communications, internal notes, attachments, stage and SLA history, time entries, clients, requesters, desks, knowledge base, contracts, and billing/satisfaction reports.
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables MCP clients to search and manage customer support tickets, customer records, and knowledge base articles, with read-only and human-approved write workflows.
      8
      1
      MIT