AgentLayer MCP Server
AgentLayer MCP 서버
Cloudflare Workers에서 TypeScript + Hono를 통해 실시간 AI 인프라 데이터를 제공하는 MCP(Model Context Protocol) 서버입니다.
개요
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 허브 제출
이 서버는 AI 에이전트 통합을 위한 Model Context Protocol을 구현합니다. 다음 정보로 MCP 허브에 제출하세요:
서버 이름: 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 이슈 트래커를 사용해 주세요.
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