AgentLayer MCP Server
AgentLayer MCPサーバー
Cloudflare Workers上のTypeScript + Honoを使用して、リアルタイムのAIインフラデータを提供するModel Context Protocol (MCP) サーバーです。
概要
AgentLayer MCPサーバーは、AIエージェントが利用するための5つのエンドポイントを公開しています:
エンドポイント | 説明 |
| プロバイダー全体のリアルタイムLLM価格データ |
| モデルのパフォーマンスベンチマークと比較 |
| 非推奨のAPIバージョンと移行パスの追跡 |
| センチメント分析を含むAIモデルの品質スコア |
| x402マイクロペイメント対応のエージェントAPI利用料追跡 |
Related MCP server: x402-api
特徴
認証: すべてのエンドポイントでAPIキー認証
レート制限: APIキーごとに設定可能な制限
利用ログ: 完全なリクエスト/レスポンスログ
エラーハンドリング: 有意義なレスポンスを伴う包括的なエラーハンドリング
x402マイクロペイメント: x402決済プロトコルのネイティブサポート
Stripe決済: サブスクリプション階層(Starter 月額99ドル、Pro 月額299ドル、Scale 月額499ドル)
センチメント分析: モデルのセンチメントスコアのためのReddit/HNの自動スクレイピング
技術スタック
ランタイム: Cloudflare Workers
フレームワーク: Hono (軽量、高速)
言語: TypeScript
データベース: Neon Postgres (サーバーレス)
決済: Stripe + x402プロトコル
データ取り込み: Firecrawl API
クイックスタート
前提条件
Node.js 20以上
Cloudflareアカウント
Neonデータベース
Stripeアカウント
Firecrawl APIキー
インストール
npm install環境設定
.env.example を .env にコピーし、以下を設定します:
cp .env.example .env必要な変数:
NEON_DATABASE_URL- Neon Postgres接続文字列FIRECRAWL_API_KEY- Firecrawl APIキーSTRIPE_SECRET_KEY- StripeシークレットキーSTRIPE_STARTER_PRICE_ID- Starter階層のStripe価格IDSTRIPE_PRO_MONTHLY_PRICE_ID- Pro階層のStripe価格IDSTRIPE_SCALE_MONTHLY_PRICE_ID- Scale階層のStripe価格ID
データベース設定
# Apply schema to Neon
npx tsx scripts/setup-neon-db.ts
# Verify tables created
npx tsx scripts/verify-db.ts開発
npm run devデプロイ
npm run deployAPIドキュメント
認証
すべてエンドポイントは、ヘッダーまたはクエリパラメータを介したAPIキーが必要です:
X-API-Key: your-api-key
# or
?api_key=your-api-keyエンドポイント
GET /llm-costs
LLM価格データを返します。
curl -H "X-API-Key: your-key" https://your-worker.workers.dev/llm-costsGET /model-benchmarks
モデルのベンチマーク結果を返します。
curl -H "X-API-Key: your-key" https://your-worker.workers.dev/model-benchmarksGET /api-deprecations
非推奨のAPIバージョンを返します。
curl -H "X-API-Key: your-key" https://your-worker.workers.dev/api-deprecationsGET/POST /quality-scores
オプションのセンチメント更新を含む品質スコア。
# Get scores
curl -H "X-API-Key: your-key" https://your-worker.workers.dev/v1/quality-scores
# Trigger sentiment refresh
curl -H "X-API-Key: your-key" "https://your-worker.workers.dev/v1/quality-scores?refresh=true"POST /agent-spend
x402マイクロペイメント対応のエージェントAPI利用料を記録します。
curl -X POST -H "X-API-Key: your-key" \
-H "Content-Type: application/json" \
-d '{"agent_id":"agent-123","model":"gpt-4","tokens_used":1500,"cost":0.045,"payment_receipt":"x402-receipt"}' \
https://your-worker.workers.dev/agent-spendGET /agent-spend
エージェントの利用料記録を取得します。
curl -H "X-API-Key: your-key" "https://your-worker.workers.dev/agent-spend?agent_id=agent-123"MCP Hubへの提出
このサーバーは、AIエージェント統合のためのModel Context Protocolを実装しています。以下のようにMCP Hubに提出してください:
サーバー名: agentlayer-mcp-server
説明: リアルタイムAIインフラデータ(コスト、ベンチマーク、非推奨情報、品質スコア、利用料追跡)
トランスポート: APIキー認証付きHTTP
アーキテクチャ
src/
├── index.ts # Main Hono app with all endpoints
├── routes/
│ └── v1-quality-scores.ts # Quality scores route with sentiment refresh
└── scrapers/
└── reddit-hn-sentiment.ts # Reddit/HN sentiment scraper via FirecrawlCI/CD
GitHub Actionsワークフロー (.github/workflows/deploy.yml):
mainへのプッシュ時に実行TypeScriptによる型チェック
Cloudflare Workersへのデプロイ
必要なGitHubシークレット:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_IDNEON_DATABASE_URLFIRECRAWL_API_KEYSTRIPE_SECRET_KEYSTRIPE_STARTER_PRICE_IDSTRIPE_PRO_MONTHLY_PRICE_IDSTRIPE_SCALE_MONTHLY_PRICE_ID
ライセンス
MIT
サポート
問題や機能リクエストについては、GitHubのissueトラッカーを使用してください。
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 Servers
- AlicenseAqualityDmaintenanceProvides access to real-time LLM pricing, speed metrics, and performance benchmarks for over 300 models from Artificial Analysis. It enables users to list, filter, and compare models based on costs, tokens per second, and intelligence indices.2378MIT
- AlicenseAqualityDmaintenanceMCP server for pay-per-call DeFi and crypto data via x402 micropayments on Base. 8 endpoints: token prices, TVL, funding rates, token security, gas tracker, whale monitoring, wallet profiling, and yield scanning.846MIT
- AlicenseAqualityFmaintenanceUnified AI compute API gateway for agents. Access 30+ services and 95+ models across 8 backends (Groq, Together AI, DeepInfra, Fireworks, Replicate, RunPod) with native x402 USDC payments, Stripe, and crypto top-up.5502MIT
- AlicenseAqualityCmaintenanceProvides AI agents with real-time AI ecosystem data (news, status, pricing, latency) and premium tools paid via USDC on Base, compatible with any MCP client.242561MIT
Related MCP Connectors
52 paid x402 API endpoints for AI agents — crypto, data, DeFi, market intelligence.
Pay-per-call x402 gateway: agent tools, OpenAI-compatible LLM, market data, RPC, security audits.
Live status, API pricing and rate limits for ChatGPT, Claude, Gemini, Cursor and 42+ AI tools.
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/ToddFisher42/agentlayer-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server