ireporter-mcp
v0.1.17
Published
MCP server for ConMas i-Reporter — search forms, query reports, and export PDF/Excel/CSV via Claude Desktop or Claude Code
Maintainers
Readme
ireporter-mcp
ConMas i-Reporter Web API を Claude などの AI アシスタントから利用するための MCP サーバーです。
セットアップ
ワンクリックインストール(Claude Desktop)
ireporter-mcp.mcpb をダウンロードしてダブルクリックすると、Claude Desktop に自動インストールされます。
API URL・ユーザーID・パスワードの入力画面が表示されます。
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json (Mac) に追加:
{
"mcpServers": {
"ireporter": {
"command": "npx",
"args": [
"-y", "ireporter-mcp",
"--attachments-dir", "/Users/you/Downloads/ireporter"
],
"env": {
"IREPORTER_BASE_URL": "https://your-host.conmas-i-reporter.com/ConMasAPI/Rests/APIExecute.aspx",
"IREPORTER_USER_ID": "your_user",
"IREPORTER_PASSWORD": "your_password"
}
}
}
}Claude Code
claude mcp add ireporter -- npx -y ireporter-mcp環境変数 IREPORTER_BASE_URL, IREPORTER_USER_ID, IREPORTER_PASSWORD を設定してください。
Cursor
プロジェクトルートに .cursor/mcp.json を作成:
{
"mcpServers": {
"ireporter": {
"command": "npx",
"args": ["-y", "ireporter-mcp"],
"env": {
"IREPORTER_BASE_URL": "https://your-host.conmas-i-reporter.com/ConMasAPI/Rests/APIExecute.aspx",
"IREPORTER_USER_ID": "your_user",
"IREPORTER_PASSWORD": "your_password"
}
}
}
}Gemini CLI
~/.gemini/settings.json に追加:
{
"mcpServers": {
"ireporter": {
"command": "npx",
"args": ["-y", "ireporter-mcp"],
"env": {
"IREPORTER_BASE_URL": "https://your-host.conmas-i-reporter.com/ConMasAPI/Rests/APIExecute.aspx",
"IREPORTER_USER_ID": "your_user",
"IREPORTER_PASSWORD": "your_password"
}
}
}
}OpenAI Codex CLI
~/.codex/config.toml に追加:
[mcp_servers.ireporter]
command = "npx"
args = ["-y", "ireporter-mcp"]
[mcp_servers.ireporter.env]
IREPORTER_BASE_URL = "https://your-host.conmas-i-reporter.com/ConMasAPI/Rests/APIExecute.aspx"
IREPORTER_USER_ID = "your_user"
IREPORTER_PASSWORD = "your_password"または CLI から直接追加:
codex mcp add ireporter -- npx -y ireporter-mcpツール一覧
| ツール | 説明 |
|--------|------|
| ireporter-get-definitions | 「帳票定義」と明示されたときの帳票定義(テンプレート)一覧取得 |
| ireporter-get-definition | 帳票定義の詳細(クラスター構造等)を取得 |
| ireporter-get-records | 帳票の一覧(入力帳票)を取得。曖昧な「帳票の一覧」はこちら |
| ireporter-get-report-detail | 入力帳票の詳細を取得 |
| ireporter-get-cluster-value | 帳票内の単一クラスターの値を取得 |
| ireporter-download-report-view | 連携ビューのデータを CSV でエクスポート |
| ireporter-get-users | ユーザー一覧を取得 |
| ireporter-get-user | ユーザー詳細を取得 |
| ireporter-get-license | ライセンス利用状況を取得 |
| ireporter-list-media | ダウンロード可能な形式を確認 |
| ireporter-download-file | PDF / Excel でエクスポート |
呼び出し方の目安
- 「帳票の一覧」「帳票一覧」(曖昧)→
ireporter-get-records(入力帳票) - 「帳票定義の一覧」「帳票定義を出して」(明示)→
ireporter-get-definitions(帳票定義)
帳票一覧(get-records)の便利な呼び方
| 欲しい一覧 | パラメータ例 |
|------------|--------------|
| 直近N件(例: 10件) | limit: 10(一覧は更新日時降順のため、先頭が直近) |
| 直近の帳票 | recentDays: 7(または 30) |
| 今週の一覧 | recentDays: 7 |
| いつからいつまで | updateTimeFrom / updateTimeTo または registTimeFrom / registTimeTo(形式 yyyy/MM/dd HH:mm:ss) |
| 下書き一覧 | editStatus: ["0"] |
| 編集中のみ | editStatus: ["1"] |
| 入力完了のみ | editStatus: ["4"] |
| 全階層(直近30日) | 引数なし(日付未指定時は直近30日がデフォルト。labelId=-9) |
日付未指定の場合は直近30日を対象に検索する(API の全件取得を避けるため)。期間を細かく指定する場合は上記の From/To を使用する。
連携ビュー(download-report-view)の便利な呼び方
連携ビューは Manager で事前に定義されたビューのみ利用できる。viewName(ビュー物理名)は必須で、利用可能なビュー名を事前に確認しておく必要がある。その分、取得件数・開始位置を API で指定でき、高速に CSV 取得できる。
| 欲しい結果 | パラメータ例 |
|------------|--------------|
| 先頭N件・直近N件 | executeCount: N(必要に応じて recentDays: 7 や updateTimeFrom/To で期間を絞る) |
| いつからいつまで | updateTimeFrom / updateTimeTo または registTimeFrom / registTimeTo(形式 yyyy/MM/dd HH:mm:ss) |
| ページネーション | 1 ページ目: startIndex: 0, executeCount: 50。2 ページ目: startIndex: 50, executeCount: 50 |
| 直近7日分 | recentDays: 7(必要なら executeCount も指定) |
API で取得件数・開始位置を指定できるため、全件より高速に取得したいときに有用。
典型的な流れ
get-definitions → get-records → get-report-detail → download-file
get-definitions → download-report-view(連携ビュー CSV)API エラー(code: N)について
すべての API 呼び出しは、仕様として毎回 Login → 1 コマンド実行 → Logout を行い、セッションをまたぐ利用はしません。
「i-Reporter API returned an error (code: 5)」のように code が表示された場合、i-Reporter サーバー側でエラーが返っています。
- code: 5 = セッション無し: 本 MCP では毎回の API アクセスで login → コマンド実行 → logout を行うため、通常はセッション切れ(code: 5)を避けられます。code: 5 が出る場合はサーバー側のセッション設定やネットワークを確認してください。
- その他の原因例: リソースが存在しない、名前の誤り(例: 連携ビューの viewName)、権限不足、パラメータ不備など。
- エラーコード一覧: 各コードの詳細は i-Reporter システム連携マニュアル(外部連携インターフェース仕様書 等のエラーコード表)で確認してください。
設定リファレンス
認証(必須)
| 環境変数 | CLIフラグ | 説明 |
|----------|----------|------|
| IREPORTER_BASE_URL | --base-url | API の URL。完全パスでも基底URLでも可 |
| IREPORTER_USER_ID | --user | ユーザーID |
| IREPORTER_PASSWORD | --password | パスワード |
オプション
| 環境変数 | CLIフラグ | 説明 |
|----------|----------|------|
| IREPORTER_ATTACHMENTS_DIR | --attachments-dir | ダウンロード保存先 |
| IREPORTER_TIMEOUT_MS | --timeout | タイムアウト(デフォルト 30000ms) |
| HTTPS_PROXY | --https-proxy | プロキシURL |
| IREPORTER_ENABLED_CATEGORIES | --enabled-categories | 有効カテゴリ(カンマ区切り) |
| IREPORTER_EXCLUDE_TOOLS | --exclude-tools | 除外ツール名 |
カテゴリ: definition, contelligence, user, license, media
開発
git clone https://github.com/i-repo-community/ireporter-mcp.git
cd ireporter-mcp
pnpm install
pnpm dev # ウォッチモード起動
pnpm test # テスト実行
pnpm build # ビルドライセンス
MIT
