Skip to main content
Glama

EVE ESI 工具 🚀

这是一个用于 AI 代理集成的 EVE Online ESI API 接口,基于 模型上下文协议 (MCP) 服务器。将你的 EVE 角色连接到 Claude、Augment Code、Cursor 或任何支持 MCP 的 AI 助手,然后询问诸如 “我的货舱里有什么?”“推荐一个适合单人 FW 的 Hookbill 配置”“我最有价值的资产是什么?” 等问题。


架构

graph TB
    subgraph AI["AI Clients"]
        A[Claude Desktop]
        B[Augment Code]
        C[Cursor]
        D[Claude Code CLI]
    end

    subgraph MCP["MCP Server · mcp_server.py"]
        E["34 Tools\n──────────────────\nCharacter · Skills · Assets\nWallet · Fittings · Market\nUniverse · Navigation\nHauling · Fitting Analysis\nCross-Character"]
    end

    subgraph LIB["eve_esi library"]
        F["auth.py\nOAuth2 SSO + PKCE"]
        G["client.py\nESI HTTP Client\nauto token refresh"]
        H["endpoints/\nassets · characters · fittings\nfitting_analysis · hauling · market\nnavigation · skills · universe · wallet"]
    end

    subgraph EVE["EVE Online"]
        I["ESI API\nesi.evetech.net"]
        J["SSO\nlogin.eveonline.com"]
    end

    A & B & C & D -->|"stdio / MCP protocol"| E
    E --> G
    G --> H
    F -->|"tokens.json"| G
    G -->|"HTTPS + JWT Bearer"| I
    F -->|"PKCE / Auth Code flow"| J

OAuth2 认证流程

sequenceDiagram
    participant U as You
    participant CLI as cli.py
    participant Browser as Browser
    participant SSO as EVE SSO
    participant ESI as ESI API

    U->>CLI: python cli.py login
    CLI->>Browser: Open auth URL (PKCE challenge)
    Browser->>SSO: EVE login + scope approval
    SSO->>CLI: Redirect → localhost:8182/callback?code=...
    CLI->>SSO: POST /token (exchange code)
    SSO->>CLI: access_token + refresh_token
    CLI->>CLI: Store encrypted in tokens.json
    Note over CLI,ESI: All future requests auto-refresh token
    CLI->>ESI: GET /characters/{id}/
    ESI->>CLI: Character data ✓

前置要求

  • Python 3.11+

  • 一个 EVE Online 账号

  • 一个已注册的 EVE 开发者应用(免费 — 在 developers.eveonline.com 上只需 2 分钟即可完成)


安装

git clone https://github.com/yourname/eve-esi-tool
cd eve-esi-tool
pip install -e .

第 1 步 — 注册 EVE 应用

  1. 前往 developers.eveonline.com → 登录 → Applications → Create Application

  2. 设置 Connection TypeAuthentication & API Access

  3. 设置 Callback URLhttp://localhost:8182/callback

  4. 添加你需要的 ESI 权限范围(参见下方的 权限范围参考

  5. 复制你的 Client ID 以及可选的 Client Secret

PKCE 与 Secret: 如果你在 config.yaml 中省略了 client_secret,该工具将使用 PKCE(对桌面应用更安全)。如果包含它,则使用带有 Basic Auth 的标准授权码流程。


第 2 步 — 配置

cp config.example.yaml config.yaml

编辑 config.yaml

eve_sso:
  client_id: "YOUR_CLIENT_ID_HERE"
  client_secret: "YOUR_SECRET_HERE"   # optional — remove for PKCE-only
  callback_url: "http://localhost:8182/callback"
  scopes:
    - "esi-skills.read_skills.v1"
    - "esi-skills.read_skillqueue.v1"
    - "esi-characters.read_blueprints.v1"
    - "esi-assets.read_assets.v1"
    - "esi-wallet.read_character_wallet.v1"
    - "esi-fittings.read_fittings.v1"
    - "esi-fittings.write_fittings.v1"
    - "esi-markets.read_character_orders.v1"
    - "esi-industry.read_character_jobs.v1"
    - "esi-location.read_location.v1"
    - "esi-location.read_ship_type.v1"
    - "esi-clones.read_clones.v1"
    - "esi-clones.read_implants.v1"
    - "esi-contracts.read_character_contracts.v1"
    - "esi-universe.read_structures.v1"

token_storage:
  path: "tokens.json"

第 3 步 — 登录

python cli.py login

浏览器窗口将打开以进行 EVE SSO 认证。批准后,你的令牌将保存到 tokens.json 中。每个角色运行一次即可。 你可以认证多个角色 — 所有工具都接受一个可选的 character_id 参数。


CLI 参考

python cli.py login    # Authenticate a character via EVE SSO
python cli.py chars    # List all authenticated characters
python cli.py info     # Show character info (corp, alliance, etc.)
python cli.py skills   # Show skill summary (total SP, top skills)
python cli.py wallet   # Show ISK wallet balance
python cli.py queue    # Show skill training queue

第 4 步 — 连接到你的 AI 工具

MCP 服务器使用 stdio 传输 — AI 客户端将其作为子进程启动,并通过 stdin/stdout 进行通信。

Augment Code (VS Code)

打开你的 VS Code 用户设置(Ctrl+Shift+P → “Preferences: Open User Settings (JSON)”)并添加:

{
  "augment.advanced": {
    "mcpServers": {
      "eve-esi": {
        "command": "python",
        "args": ["C:/path/to/eve-esi-tool/mcp_server.py"],
        "cwd": "C:/path/to/eve-esi-tool"
      }
    }
  }
}

然后重新加载 VS Code(Ctrl+Shift+P → “Developer: Reload Window”)。EVE ESI 工具将自动在 Agent 模式下可用。

Windows 提示: 在路径中使用正斜杠 / 或双反斜杠 \


Claude Desktop

在 Windows 上编辑 %APPDATA%\Claude\claude_desktop_config.json,或在 macOS 上编辑 ~/Library/Application Support/Claude/claude_desktop_config.json。如果文件不存在,请创建它:

{
  "mcpServers": {
    "eve-esi": {
      "command": "python",
      "args": ["/path/to/eve-esi-tool/mcp_server.py"],
      "cwd": "/path/to/eve-esi-tool"
    }
  }
}

重启 Claude Desktop。当 MCP 工具加载时,你会在聊天输入栏中看到一个 🔨 锤子图标。点击它即可查看所有可用工具。

启用开发者模式: 在 Claude Desktop → Settings → Developer → Enable Developer Mode 中,可以查看适用于你操作系统的配置文件路径。


Cursor

添加到项目根目录下的 .cursor/mcp.json,或全局的 ~/.cursor/mcp.json

{
  "mcpServers": {
    "eve-esi": {
      "command": "python",
      "args": ["/path/to/eve-esi-tool/mcp_server.py"],
      "cwd": "/path/to/eve-esi-tool"
    }
  }
}

Cursor Settings → Features → MCP → Enable MCP 中启用 MCP。


Claude Code (CLI)

# Add the server
claude mcp add eve-esi python /path/to/eve-esi-tool/mcp_server.py

# Or add with working directory
claude mcp add eve-esi --cwd /path/to/eve-esi-tool python mcp_server.py

# Verify it's registered
claude mcp list

可用的 MCP 工具

mindmap
  root((EVE ESI\nMCP Tools))
    Character
      list_authenticated_characters
      set_active_character
      get_character_info
      get_character_location
      get_character_ship
      get_character_status
    Skills
      get_skills_summary
      get_skill_queue
      get_character_attributes
      get_active_implants
    Assets
      get_assets_list
      search_assets
      get_assets_summary
    Wallet
      get_wallet_balance
      get_wallet_journal
    Fittings
      get_ship_fittings
      save_ship_fitting
    Market
      get_market_orders
      check_item_price
      get_blueprints_list
      get_industry_jobs_list
    Universe
      lookup_item_type
      search_item_type
      lookup_solar_system
      resolve_eve_names
    Navigation
      plan_route
    Hauling
      find_valuables_to_haul
    Fitting Analysis
      get_ship_fit_stats
      compare_ship_fits
      get_fit_required_skills
      check_fit_readiness
    Cross-Character
      get_all_characters_status
      compare_skills_across_characters
      compare_wallets

角色与状态

工具

描述

list_authenticated_characters

列出所有已认证角色的位置、舰船、钱包和在线状态

set_active_character

设置当省略 character_id 时默认使用的角色

get_character_info

姓名、军团、联盟、生日、安全状态

get_character_location

当前星系

get_character_ship

当前驾驶的舰船

get_character_status

一键快照:位置 + 舰船 + 钱包余额

技能

工具

描述

get_skills_summary

总技能点、未分配技能点、所有已习得技能

get_skill_queue

技能队列及完成时间

get_character_attributes

智力/记忆/感知/意志/魅力 + 属性重置可用性

get_active_implants

当前植入的植入体

资产与钱包

工具

描述

get_assets_list

所有拥有的物品及其位置/数量

search_assets

按物品类型名称搜索资产

get_assets_summary

按空间站分组的资产及 ISK 价值

get_wallet_balance

ISK 余额

get_wallet_journal

最近的钱包交易记录

配置与市场

工具

描述

get_ship_fittings

游戏中所有已保存的配置

save_ship_fitting

保存新配置到游戏 ✍️

get_market_orders

角色的活跃卖单/买单

check_item_price

任意地区的最佳买入/卖出价格(默认:吉他)

get_blueprints_list

所有蓝图及其 ME/TE/生产次数信息

get_industry_jobs_list

活跃/已完成的制造与研究任务

宇宙与导航

工具

描述

lookup_item_type

任意物品 ID 的完整类型信息 + 属性

search_item_type

按名称查找物品 ID

lookup_solar_system

星系信息(安全等级、行星、星门)

resolve_eve_names

将任意 EVE ID 转换为名称

plan_route

带有最近邻优化的多星系路线规划

运输

工具

描述

find_valuables_to_haul

扫描资产中的小型/高价值物品,并规划带有价格信息的提取路线

配置分析

工具

描述

get_ship_fit_stats

解析 EFT 配置 → 完整属性(防御、装配、导航、电容、采矿、货舱)

compare_ship_fits

并排比较两个 EFT 配置的差异

get_fit_required_skills

提取驾驶给定 EFT 配置所需的所有技能

check_fit_readiness

检查哪些角色可以驾驶该配置以及缺少哪些技能

跨角色

工具

描述

get_all_characters_status

所有已认证角色的位置、舰船和钱包状态

compare_skills_across_characters

比较所有角色之间的特定技能(或总技能点)

compare_wallets

所有钱包余额 + 账户总 ISK

✍️ save_ship_fitting 是唯一会写入你账户的工具。所有其他工具均为只读。


对话示例

连接后,你可以询问自然语言问题:

"What ship is my character flying and where are they?"
"Show me my top 10 most valuable assets"
"What skills am I training and when does the queue finish?"
"Check the Jita price for a Raven Navy Issue"
"Do I have any active industry jobs?"
"What are my saved fittings for a Rifter?"
"Suggest a solo PvP fit for my Caldari Navy Hookbill based on my skills"
"How much would I make if I sold all my blueprints in Jita?"
"Compare my Covetor fit to a Hulk fit — which is better for moon mining?"
"What skills do I need to fly this Hulk fit?" (paste EFT)
"Which of my characters can fly this fit and what are they missing?"
"Give me a status update on all my characters"
"Compare Mining Barge and Astrogeology skills across all my alts"
"Find all my valuable items scattered around and plan a pickup route back to Jita"

多角色支持

你可以认证多个 EVE 角色。每个角色运行一次 python cli.py login — 所有令牌都存储在 tokens.json 中。

# Log in additional characters (run once per character)
python cli.py login

# List all authenticated characters
python cli.py chars

活跃角色

使用 set_active_character 来选择当省略 character_id 时默认使用的角色。如果没有设置活跃角色,则使用第一个认证的角色。

所有独立工具也都接受一个可选的 character_id 参数,用于对特定小号进行临时查询。

跨角色工具

这些工具一次性对所有已认证角色进行操作 — 无需逐个查询:

  • get_all_characters_status — 一次调用获取所有人的位置、舰船和钱包

  • compare_skills_across_characters — 并排比较特定技能或总技能点

  • compare_wallets — 所有钱包余额 + 舰队总 ISK

  • check_fit_readiness — 检查哪些角色可以驾驶给定配置以及他们缺少什么


项目结构

eve-esi-tool/
├── mcp_server.py          # MCP server — 34 tools for AI agents
├── cli.py                 # Command-line interface
├── config.example.yaml    # Config template
├── config.yaml            # Your config (not committed)
├── tokens.json            # OAuth tokens (not committed)
├── scripts/               # Temporary/ad-hoc scripts (auto-cleaned)
├── eve_esi/
│   ├── auth.py            # OAuth2 SSO + PKCE flow + token storage
│   ├── client.py          # ESI HTTP client with auto token refresh
│   ├── config.py          # Config loading (YAML)
│   └── endpoints/
│       ├── assets.py          # Character assets
│       ├── characters.py      # Character info, location, ship
│       ├── fitting_analysis.py # EFT parsing, stats, comparison, skill requirements
│       ├── fittings.py        # Ship fittings CRUD
│       ├── hauling.py         # Asset analysis & pickup-run planner
│       ├── market.py          # Orders, prices, blueprints, industry
│       ├── navigation.py      # Route planning & multi-stop optimization
│       ├── skills.py          # Skills, queue, attributes, implants
│       ├── universe.py        # Type info, system info, name resolution
│       └── wallet.py          # Wallet balance and journal
└── CLAUDE.md              # Agent instructions (Claude Code / Cursor)

权限范围参考

权限范围

启用功能

esi-skills.read_skills.v1

get_skills_summary, compare_skills_across_characters, check_fit_readiness

esi-skills.read_skillqueue.v1

get_skill_queue, get_character_attributes

esi-clones.read_implants.v1

get_active_implants

esi-assets.read_assets.v1

get_assets_list, search_assets, get_assets_summary, find_valuables_to_haul

esi-wallet.read_character_wallet.v1

get_wallet_balance, get_wallet_journal, compare_wallets

esi-fittings.read_fittings.v1

get_ship_fittings

esi-fittings.write_fittings.v1

save_ship_fitting

esi-markets.read_character_orders.v1

get_market_orders

esi-characters.read_blueprints.v1

get_blueprints_list

esi-industry.read_character_jobs.v1

get_industry_jobs_list

esi-location.read_location.v1

get_character_location, get_character_status, get_all_characters_status

esi-location.read_ship_type.v1

get_character_ship, get_character_status, get_all_characters_status

esi-contracts.read_character_contracts.v1

未来:合同工具

esi-universe.read_structures.v1

玩家建筑中的资产位置

注意: 配置分析工具(get_ship_fit_stats, compare_ship_fits, get_fit_required_skills)和宇宙/导航工具(plan_route, lookup_item_type 等)使用 公共 ESI 端点,不需要任何权限范围。


安全说明

  • tokens.jsonconfig.yaml 已通过 .gitignore 从 git 中排除

  • 令牌存储在本地 — 绝不会发送给任何第三方

  • MCP 服务器仅在你的 AI 客户端处于活动状态时运行

  • 所有 ESI 调用均通过 HTTPS 直接发送至 esi.evetech.net

  • 唯一的写入操作是 save_ship_fitting — 无法移动 ISK 或物品


故障排除

No authenticated characters 错误

python cli.py login   # run this first

登录期间出现 400 Bad Request

  • 确保 config.yaml 中的 callback_url 与你在 EVE 开发者门户中设置的完全一致

MCP 工具未在 Augment/Claude 中显示

  • 检查 command 路径是否指向正确的 Python 可执行文件

  • 确保已在项目目录中运行 pip install -e .

  • 编辑配置后重新加载 VS Code / 重启 Claude Desktop

特定工具出现权限范围错误

  • config.yaml 中添加新权限范围后,重新运行 python cli.py login

  • 确保新权限范围也已添加到你的 EVE 开发者应用中


FastMCP 构建 · ESI 数据来自 EVE Online ESI

-
security - not tested
A
license - permissive license
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

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/Berman510/EOE_MCP'

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