コンテンツにスキップ
AstroWay/api v2.254.12 · ja
すべてのシステムが正常です

AIエージェントとMCP

AIエージェントに、ハルシネーションではなく本物の占星術計算をさせたい?AstroWayは Claude (Anthropic)、ChatGPT-4 (OpenAI)、Llama 3.3 (Groq)、DeepSeek、Google Gemini、Mistral に接続できる - MCP、llms.txt、または直接のHTTP呼び出し経由で。3つの統合方法 - エージェントのタイプに合わせて選ぼう:

  • llms.txt: ドキュメントを読むエージェント向けのdiscoveryファイル(Cursor IDE、Windsurf、ブラウザ上のClaude、LangChain/LlamaIndex上のカスタムRAGパイプライン)。
  • MCPサーバー: Claude Desktop、Cursor IDE、Windsurf、VS Code (llm CLI)、あらゆるMCP互換クライアント(OpenAI Realtime API経由のMCP対応GPTを含む)向けのzero-code。
  • HTTP API: 独自エージェントやフレームワーク(LangChain、LlamaIndex、AutoGen、CrewAI)からの直接アクセス。

llms.txt: AIエージェント向けdiscovery

Section titled “llms.txt: AIエージェント向けdiscovery”

サイトは llms.txt 形式の機械可読ファイルを2つ公開している:

  • /llms.txt: セクション別にグループ化された全ドキュメントページのインデックス(API Reference、Use Cases、Examples、Products)。小さく、どんなcontext windowにも収まる。
  • /llms-full.txt: ドキュメント全体を1つのplain-textファイルにまとめたもの。ベクトルDBへのオフラインインデックス化や、contextへの一括投入に適している。
シナリオファイル
Cursor/Windsurfで「astrowayのdocsを読んで統合を手伝って」/llms.txt(エージェントが必要なセクションを自分で取得)
FAQボット用の独自RAGパイプライン / ベクトルDB/llms-full.txt(1回のfetchでコーパス全体)
ブラウザ上のClaude/ChatGPT:「これがうちのAPI、クライアントを作って」/llms-full.txt をプロンプトに貼り付け
呼び出しを実行するproductionエージェントMCPサーバーまたはHTTP API(下記参照)
const docs = await fetch('https://api.astroway.info/llms-full.txt').then(r => r.text());
const systemPrompt = `You are an integration assistant for AstroWay API.
Documentation:
${docs}
When the user asks how to do X, return a working code snippet using their API key.`;

MCPサーバー(Claude Desktopに推奨)

Section titled “MCPサーバー(Claude Desktopに推奨)”

Model Context Protocol (MCP) は、AIモデルにツールを接続するためのオープン標準。AstroWayのMCPサーバーは、APIの各オペレーションに1つずつ、計783のツールを提供し、さらに12のプロンプトと14のリソースも備えている。

claude_desktop_config.json に追加:

{
"mcpServers": {
"astroway": {
"command": "npx",
"args": ["@astroway/mcp"],
"env": {
"ASTROWAY_API_KEY": "aw_live_your_key_here"
}
}
}
}

再起動後、Claude Desktopは783のツールすべてを認識する。リストを絞りたい場合は ASTROWAY_TOOL_GROUPS を設定するか、ドメイン別サーバーに接続しよう。詳しくは MCPの設定 を参照。

ツール機能
astroway_western_chartネイタルチャートの計算
astroway_relational_synastry2人のシナストリー
astroway_horoscope_dailyデイリーホロスコープ
astroway_ai_interpret_natalネイタルチャートのAI解釈
astroway_hd_human_design完全なHDチャート
astroway_prognostics_transits現在のトランジット

完全なリスト: 783ツール、API全体、それぞれ型付きのレスポンスschema付き。

ユーザー: 1990年7月14日14時30分、キーウ生まれの人のネイタルチャートを作って。10ハウスの蟹座の太陽はどういう意味?

Claude: astroway_western_chart で計算し、次に astroway_ai_interpret_placement で解釈。実データに基づく惑星位置と、意味のある解釈を返す。

MCP非対応のAIエージェントには、HTTP APIを直接使おう。

// The AI agent calls /interpret/natal for an interpretation
const r = await fetch('https://api.astroway.info/v1/interpret/natal', {
method: 'POST',
headers: {
'X-Api-Key': process.env.ASTROWAY_API_KEY!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
date: '1990-07-14',
time: '14:30:00',
timezoneOffset: 3,
latitude: 50.4501,
longitude: 30.5234,
}),
});
const { data: result } = await r.json();
// result.interpretation - ready AI interpretation
// result.disclaimer - disclaimer to display
// 1. Get raw data from /chart (cheaper - 20 credits)
const chart = await fetch('https://api.astroway.info/v1/chart', { ... });
const { data } = await chart.json();
// 2. Pass the data to your own LLM
const prompt = `Interpret this natal chart: ${JSON.stringify(data.planets)}`;
const llmResponse = await myLLM.generate(prompt);

パーソナル占星術アシスタント

Section titled “パーソナル占星術アシスタント”

MCPサーバー + Claude/ChatGPT。ユーザーが質問し、エージェントが計算して解釈する。予算: 個人利用ならFreeプラン。

/horoscope/daily で12星座分のホロスコープを毎日生成。1日12リクエスト = 240クレジット。Freeプランで余裕あり。

クライアントごとに /interpret/natal + /interpret/transits。1日100クライアント = 1日10,000クレジット。Proプラン。

参考になりましたか?
編集を提案

最終更新日: