Skip to main content
Glama
torify-dev

Torify — Japanese Locale APIs for AI Agents

by torify-dev

torify-examples

Torify — AIエージェント向け日本語ロケールAPIのコード例。

和暦、請求書検証、法人検索、住所正規化などを含む31のエンドポイント。

torify.dev License: MIT


クイックスタート

無料枠 (MCP — ウォレット不要、登録不要)

claude_desktop_config.json に追加してください:

{
  "mcpServers": {
    "torify": {
      "type": "http",
      "url": "https://torify-mcp.torify.workers.dev"
    }
  }
}

1日100リクエスト/IPまで無料。Claude DesktopおよびCursorで動作します。

x402 従量課金 (Base L2上で1コールあたり$0.02 USDC)

npm install x402-fetch viem
export PRIVATE_KEY="0x..."
npx ts-node typescript/x402-example.ts

APIキーサブスクリプション (月額$49)

export TORIFY_API_KEY="your-key"
npx ts-node typescript/apikey-example.ts

Related MCP server: japan-ux-mcp

和暦変換

# Gregorian → Wareki
curl "https://torify.dev/v1/wareki/convert?direction=g2w&date=2024-05-01"
# { "ok": true, "data": { "era": "令和", "eraYear": 6, "formatted": "令和6年5月1日" } }

# Wareki → Gregorian (edge case: Showa ended Jan 7, 1989; Heisei started Jan 8, 1989)
curl "https://torify.dev/v1/wareki/convert?direction=w2g&era=showa&eraYear=64&month=1&day=7"
# { "ok": true, "data": { "gregorian": "1989-01-07" } }

請求書番号の検証

# Format + check digit validation (no payment needed)
curl "https://torify.dev/v1/invoice/validate?number=T8010401050783"
# { "ok": true, "data": { "valid": true } }

ステータス: 国税庁レジストリとの統合は外部APIの承認待ちです。近日公開予定。

# NTA registry lookup — is this T-number actually registered?
curl "https://torify.dev/v1/invoice/verify?number=T8010401050783" \
  -H "X-API-Key: $TORIFY_API_KEY"
# { "ok": true, "data": { "registered": true, "registrantName": "国税庁", "confidence": 0.99 } }

法人番号検索

ステータス: 法人番号検索は外部APIの承認待ちです。近日公開予定。

curl "https://torify.dev/v1/houjin/lookup?number=8010401050783" \
  -H "X-API-Key: $TORIFY_API_KEY"
# { "ok": true, "data": { "name": "国税庁", "address": "東京都千代田区霞が関3丁目1番1号", "status": "active" } }

郵便番号検索

curl "https://torify.dev/v1/postal/lookup?zipcode=1000013"
# { "ok": true, "data": { "prefecture": "東京都", "city": "千代田区", "town": "霞が関" } }

電話番号の検証

# Tokyo (2-digit area code 03)
curl "https://torify.dev/v1/phone/validate?phone=03-1234-5678"
# { "ok": true, "data": { "valid": true, "type": "landline", "region": "東京" } }

# Rural (4-digit area code 0266)
curl "https://torify.dev/v1/phone/validate?phone=0266-12-3456"
# { "ok": true, "data": { "valid": true, "type": "landline", "region": "長野" } }

住所の正規化

curl "https://torify.dev/v1/address/normalize" \
  --get --data-urlencode "address=東京都千代田区霞が関3丁目1番1号" \
  -H "X-API-Key: $TORIFY_API_KEY"
# { "ok": true, "data": { "prefecture": "東京都", "city": "千代田区", "town": "霞が関", "block": "3丁目1番1号" } }

TypeScriptとx402 (自律決済)

import { wrapFetchWithPayment } from "x402-fetch";
import { createWalletClient, http } from "viem";
import { base } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";

const wallet = createWalletClient({
  account: privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`),
  chain: base,
  transport: http()
});
const fetch402 = wrapFetchWithPayment(fetch, wallet);

// Agent pays $0.02 USDC automatically — no API key needed
const res = await fetch402("https://torify.dev/v1/invoice/verify?number=T8010401050783");
const { ok, data } = await res.json();
console.log(data.registered, data.confidence); // true, 0.99

PythonとAPIキー

import os, requests

headers = {"X-API-Key": os.environ["TORIFY_API_KEY"]}

r = requests.get(
    "https://torify.dev/v1/address/normalize",
    params={"address": "東京都千代田区霞が関3丁目1番1号"},
    headers=headers
)
data = r.json()["data"]
print(data["prefecture"], data["city"], data["town"])
# 東京都 千代田区 霞が関

すべてのエンドポイント

完全なドキュメント: torify.dev/docs

カテゴリ

エンドポイント

和暦・日付

wareki/convert, holiday/check, age/calculate

法務・税務

invoice/validate, invoice/verify, tax/calculate

法人

houjin/lookup, industry/lookup

住所

postal/lookup, address/normalize, region/lookup

テキスト

name/romanize, kanji/to-kana, kana/convert, text/normalize

金融

bank/lookup, bank/transfer/validate, yucho/convert

本人確認

mynumber/validate, phone/validate, passport/validate


ライセンス

MIT — サンプルコードのみ。Torify APIサービスはプロプライエタリ(非公開)です。

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Provides Japanese UX conventions as an MCP server to help AI generate correct Japanese UI elements like proper name order, furigana, phone formats, and polite language. It includes tools for form generation, validation, keigo suggestions, and cultural adaptation for developers building Japanese-facing products.
    6
    112
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Japan-specific utilities for AI agents — era ↔ Western year conversion, kanji-to-romaji, postal code lookup, national holidays, kana conversion, and Japanese name splitting. 9 tools, MIT licensed, install via uvx.
    9
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/torify-dev/torify-examples'

If you have feedback or need assistance with the MCP directory API, please join our Discord server