wind_index
WIND 株価指数基礎データ MCP サービス
これは読み取り専用の MCP サービスで、Oracle テーブル WIND_IMP.AINDEXDESCRIPTION 内の株価指数の基礎情報を、ローカルおよび LAN 上のエージェントに提供します。
現在、以下の 2 つのツールを提供しています:
get_index_by_code(code):S_INFO_CODEによる完全一致検索です。例:000300;search_indices_by_name(name, limit=20):指数名の一部で検索し、最大 100 件を返します。
本サービスは SQL を受け付けず、データベースへの書き込み操作も提供しません。クエリは固定 SQL と Oracle バインドパラメータを使用します。
実行環境
Windows 10/11;
Python 3.11 以降;
アクセス可能な Oracle ホスト、ポート、Service Name が用意されていること;
初版は
python-oracledbの Thin モードを使用するため、Oracle Client のインストールは不要です。
Related MCP server: index-valuation
インストール
PowerShell で以下を実行します:
Set-Location 'D:\1.Project\19.CodexProject\9.MCP'
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install --upgrade pip
.\.venv\Scripts\python.exe -m pip install -e '.[dev]'.env.example を .env にコピーし、実際の設定値を記入します。このマシンには既に動作する .env が作成されています。このファイルは .gitignore で除外されているため、リポジトリには入りません。
ローカル stdio モード
手動で起動した場合、プロセスは MCP クライアントが標準入力からメッセージを送信するのを待ちます:
.\.venv\Scripts\python.exe -m index_mcp.run_stdioCodex はプロジェクトレベルまたはユーザーレベルの config.toml を使用します。以下の設定により、Codex がローカルサービスを直接起動します:
[mcp_servers.wind_index]
command = 'D:\1.Project\19.CodexProject\9.MCP\.venv\Scripts\python.exe'
args = ["-m", "index_mcp.run_stdio"]
cwd = 'D:\1.Project\19.CodexProject\9.MCP'
required = true
default_tools_approval_mode = "auto"設定を保存したら Codex を再起動し、/mcp で wind_index を確認します。Codex の公式ドキュメントでは、デスクトップ版、CLI、IDE 拡張機能が MCP 設定を共有し、stdio と Streamable HTTP をサポートしています:Codex MCP ドキュメント。
LAN HTTP モード
サービスを起動します:
Set-Location 'D:\1.Project\19.CodexProject\9.MCP'
.\.venv\Scripts\python.exe -m index_mcp.run_http現在の設定:
ローカルアドレス:
http://127.0.0.1:8765/mcpLAN アドレス:
http://172.18.3.114:8765/mcpヘルスチェック:
http://172.18.3.114:8765/healthMCP エンドポイントには
Authorization: Bearer <MCP_API_KEY>が必要です;/healthは API Key を必要とせず、{"status":"ok"}のみを返します。
Windows ファイアウォールが LAN 接続をブロックする場合は、管理者 PowerShell でローカルサブネットに対してのみポートを開放できます:
New-NetFirewallRule -DisplayName 'WIND Index MCP 8765' `
-Direction Inbound -Action Allow -Protocol TCP -LocalPort 8765 `
-RemoteAddress LocalSubnet8765 ポートをパブリックネットワークに直接マッピングしないでください。信頼できないネットワークをまたいで使用する場合は、フロントプロキシで HTTPS を有効にし、OAuth にアップグレードしてください。
Codex から LAN サービスへの接続
まず、Codex を実行するコンピューターに、サーバー側の .env の MCP_API_KEY を値とする環境変数を設定します:
$env:WIND_INDEX_MCP_API_KEY = '<从服务端安全复制 API Key>'次に、Codex の config.toml で設定します:
[mcp_servers.wind_index_lan]
url = "http://172.18.3.114:8765/mcp"
bearer_token_env_var = "WIND_INDEX_MCP_API_KEY"
required = true
default_tools_approval_mode = "auto"公式設定項目 bearer_token_env_var は環境変数から Bearer Token を読み取るため、シークレットを直接 config.toml に書き込む必要がありません。Streamable HTTP をサポートする他の MCP クライアントは、同じ URL を使用し、同じ Authorization リクエストヘッダーを設定するだけで済みます。
検証
自動テストを実行します:
.\.venv\Scripts\python.exe -m pyteststdio のエンドツーエンド呼び出しを検証します:
.\.venv\Scripts\python.exe .\scripts\smoke_test.py stdioHTTP サービス起動後、別の PowerShell ウィンドウで検証します:
.\.venv\Scripts\python.exe .\scripts\smoke_test.py http設定項目
変数 | 説明 | デフォルト/例 |
| Oracle ホスト |
|
| Oracle ポート |
|
| Oracle Service Name |
|
| 読み取り専用アカウント | 必須 |
| データベースパスワード | 必須・秘密 |
| 最小接続数 |
|
| 最大接続数 |
|
| TCP/接続取得タイムアウト |
|
| Oracle 呼び出しごとのタイムアウト |
|
| HTTP リッスンアドレス |
|
| HTTP ポート |
|
| MCP パス |
|
| HTTP Bearer API Key | 32 文字以上 |
| Host ホワイトリスト(カンマ区切り) |
|
| ログレベル |
|
DHCP によりサーバーの LAN IP が変更された場合は、.env の MCP_ALLOWED_HOSTS とクライアント側の URL を同時に更新する必要があります。
API Key のローテーション
新しい Key を生成します:
.\.venv\Scripts\python.exe -c "import secrets; print(secrets.token_urlsafe(48))"出力をサーバー側の .env の MCP_API_KEY に書き込み、HTTP サービスを再起動し、各クライアントの環境変数を更新します。Key を Git、チャット履歴、ログにコミットしないでください。
他のテーブルへの拡張
新しいテーブルごと、または密接に関連するクエリのグループごとに、独立したドメインモジュールを作成します:
src/index_mcp/domains/<domain>/
├─ models.py
├─ repository.py
├─ service.py
└─ tools.pyRepository は固定かつパラメータ化された読み取り専用 SQL のみを保持します。Service は入力の正規化とビジネス境界を担当し、Tools は MCP コントラクトを担当します。server.py に新しいツールを登録するだけで、既存のコネクションプール、認証、ログ、そして stdio/HTTP の両エントリポイントを再利用できます。
セキュリティ上の注意
.envと.venvは Git で無視されています;stdio ログは
stderrにのみ書き込まれ、MCP プロトコルストリームを汚染しません;HTTP は Bearer API Key と Host ホワイトリストを使用します;
CORS はデフォルトでオフです;
HTTP 経由の API Key は信頼できる LAN でのみ有効であり、ネットワーク上の盗聴者は平文トラフィックを傍受できる可能性があります;
データベースアカウントは Oracle 側で最小限の読み取り専用権限に保ってください。
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.
This server cannot be installed
Maintenance
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
- Index OneOAuthio.indexone
Query financial index data, run backtests, and deploy systematic investment strategies on Index One.
Read-only China A-share data for AI agents: market, limit-up, capital flow and disclosures.
Commodity price indices, forward curves and catalog search. Requires a General Index account.
The stock market, in SQL — scan, replay, or subscribe across ~12k US tickers and top 100 cryptos.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables interaction with Oracle databases through MCP by executing SELECT queries, describing table structures, and listing available tables with secure, read-only access.3112MIT
- FlicenseNot gradedqualityDmaintenanceEnables querying index valuations (PE, PB, etc.) for 63 Chinese stock indices, with support for fuzzy search, batch queries, historical data, and trend analysis.1-
- FlicenseNot gradedqualityCmaintenanceA read-only MCP server for exploring and querying Oracle schemas safely. Provides tools for table listing, schema description, column search, and validated SELECT execution.2-
- FlicenseNot gradedqualityBmaintenanceProvides read-only access to a SQL Server investment database, enabling searching symbols, retrieving prices and history, and generating research snapshots.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/ryanwu2023/MyMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server