Skip to main content
Glama
arrow2nd

tako-mcp

by arrow2nd
README.md
# tako-mcp

[Octopus Energy Japan](https://octopusenergy.co.jp/) GraphQL API の MCP サーバー。

電力の使用量・コスト見積、契約情報、料金プランなどを MCP ツール経由で取得できます。Claude をはじめとする LLM でのエネルギー使用状況の分析に活用できます。

## 特徴

- 30分単位の電力消費量・コスト見積の取得
- アカウント・契約情報の取得(プロダクト・基本料金含む)
- 郵便番号からのエリア情報検索
- プライバシー重視: 住所等の個人情報はツールレスポンスから除外

## 必要条件

- Node.js 22+
- Octopus Energy Japan のアカウント(メールアドレス・パスワード)

## 使い方

デフォルトは stdio トランスポートで動作します。

```bash
OCTOPUS_EMAIL=you@example.com OCTOPUS_PASSWORD=your-password OCTOPUS_ACCOUNT_NUMBER=A-AAAA1111 npx tako-mcp
```

### HTTP モード

`--http` フラグで Streamable HTTP トランスポートに切り替えられます。

```bash
OCTOPUS_EMAIL=you@example.com OCTOPUS_PASSWORD=your-password OCTOPUS_ACCOUNT_NUMBER=A-AAAA1111 npx tako-mcp --http
```

`PORT` 未指定時は空きポートが自動選択されます。

### 環境変数

| 変数名 | 必須 | 説明 |
|---|---|---|
| `OCTOPUS_EMAIL` | Yes | Octopus Energy Japan のログインメールアドレス |
| `OCTOPUS_PASSWORD` | Yes | Octopus Energy Japan のログインパスワード |
| `OCTOPUS_ACCOUNT_NUMBER` | Yes | アカウント番号(例: `A-AAAA1111`) |
| `PORT` | No | HTTP モード時のポート番号(デフォルト: 自動選択) |

## MCP ツール一覧

| ツール | 説明 | 認証 |
|---|---|---|
| `get_account_info` | アカウント・契約情報(プロダクト・基本料金含む、住所は除外) | 必要 |
| `get_electricity_consumption` | 30分単位の電力消費量・コスト見積 | 必要 |
| `get_postal_areas` | 郵便番号からエリア情報を検索 | 不要 |

## MCP リソース一覧

| URI | 説明 | 認証 |
|---|---|---|
| `octopus://consumption/today` | 当日(JST)の30分単位の電力消費量・コスト見積(合計サマリ付き) | 必要 |

## クライアント設定

### Claude Desktop / Claude Code

```json
{
  "mcpServers": {
    "tako-mcp": {
      "command": "npx",
      "args": ["-y", "tako-mcp"],
      "env": {
        "OCTOPUS_EMAIL": "you@example.com",
        "OCTOPUS_PASSWORD": "your-password",
        "OCTOPUS_ACCOUNT_NUMBER": "A-AAAA1111"
      }
    }
  }
}
```

### HTTP モード

```json
{
  "mcpServers": {
    "tako-mcp": {
      "type": "http",
      "url": "http://localhost:<port>/mcp"
    }
  }
}
```

## 開発

```bash
npm install
npm run dev        # tsx で起動
npm run build      # tsup でバンドル
npm run typecheck  # 型チェック
npm run check      # Lint & フォーマット (Biome)
```

## ライセンス

MIT

TDQS

A3.8/5.0

Scored across 3 tools

Disambiguation5/5

All three tools have clearly distinct purposes: account info, electricity consumption, and postal area lookup. No overlap exists between them.

Naming Consistency5/5

All tools follow a consistent 'get_' prefix with a noun, forming a uniform verb_noun pattern.

Tool Count3/5

3 tools is quite low for a server that seems to cover energy management plus an unrelated postal lookup. The scope feels thin.

Completeness2/5

The server lacks obvious tools for billing, agreement management, or other energy-related operations. The inclusion of a Japanese postal area tool suggests an inconsistent or incomplete domain coverage.

Maintenance

ActivityInactive
ResponsivenessNo issues