AgentLayer MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AgentLayer MCP ServerShow me current LLM costs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AgentLayer MCP Server
A Model Context Protocol (MCP) server providing real-time AI infrastructure data via TypeScript + Hono on Cloudflare Workers.
Overview
AgentLayer MCP Server exposes 5 endpoints for AI agent consumption:
Endpoint | Description |
| Real-time LLM pricing data across providers |
| Model performance benchmarks and comparisons |
| Track deprecated API versions and migration paths |
| AI model quality scores with sentiment analysis |
| Agent API spend tracking with x402 micropayment support |
Related MCP server: x402-api
Features
Authentication: API key auth on all endpoints
Rate Limiting: Configurable per-API-key limits
Usage Logging: Full request/response logging
Error Handling: Comprehensive error handling with meaningful responses
x402 Micropayments: Native support for x402 payment protocol
Stripe Billing: Subscription tiers (Starter $99/mo, Pro $299/mo, Scale $499/mo)
Sentiment Analysis: Automated Reddit/HN scraping for model sentiment scores
Tech Stack
Runtime: Cloudflare Workers
Framework: Hono (lightweight, fast)
Language: TypeScript
Database: Neon Postgres (serverless)
Payments: Stripe + x402 protocol
Data Ingestion: Firecrawl API
Quick Start
Prerequisites
Node.js 20+
Cloudflare account
Neon database
Stripe account
Firecrawl API key
Installation
npm installEnvironment Setup
Copy .env.example to .env and configure:
cp .env.example .envRequired variables:
NEON_DATABASE_URL- Neon Postgres connection stringFIRECRAWL_API_KEY- Firecrawl API keySTRIPE_SECRET_KEY- Stripe secret keySTRIPE_STARTER_PRICE_ID- Stripe price ID for Starter tierSTRIPE_PRO_MONTHLY_PRICE_ID- Stripe price ID for Pro tierSTRIPE_SCALE_MONTHLY_PRICE_ID- Stripe price ID for Scale tier
Database Setup
# Apply schema to Neon
npx tsx scripts/setup-neon-db.ts
# Verify tables created
npx tsx scripts/verify-db.tsDevelopment
npm run devDeploy
npm run deployAPI Documentation
Authentication
All endpoints require an API key via header or query parameter:
X-API-Key: your-api-key
# or
?api_key=your-api-keyEndpoints
GET /llm-costs
Returns LLM pricing data.
curl -H "X-API-Key: your-key" https://your-worker.workers.dev/llm-costsGET /model-benchmarks
Returns model benchmark results.
curl -H "X-API-Key: your-key" https://your-worker.workers.dev/model-benchmarksGET /api-deprecations
Returns deprecated API versions.
curl -H "X-API-Key: your-key" https://your-worker.workers.dev/api-deprecationsGET/POST /quality-scores
Quality scores with optional sentiment refresh.
# 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
Log agent API spend with x402 micropayment support.
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
Retrieve agent spend records.
curl -H "X-API-Key: your-key" "https://your-worker.workers.dev/agent-spend?agent_id=agent-123"MCP Hub Submission
Registry Submission (registry.modelcontextprotocol.io)
This server is published to the official MCP Registry. To submit updates:
Install the MCP publisher CLI:
brew install modelcontextprotocol/tap/mcp-publisher # or download from: https://github.com/modelcontextprotocol/registry/releasesAuthenticate with GitHub:
mcp-publisher login githubPublish to registry:
mcp-publisher publish
MCP Hub Directory (mcphub.net / mcpserverhub.com)
Submit your server at:
Server details:
Name: AgentLayer MCP Server
Category: AI Infrastructure / Data & Analytics
Description: Real-time AI infrastructure data (costs, benchmarks, deprecations, quality scores, spend tracking)
Repository: https://github.com/ToddFisher42/agentlayer-mcp-server
Demo URL: https://agentlayer-mcp-server.your-subdomain.workers.dev/mcp
MCP Endpoint
The server exposes an MCP-compatible endpoint at /mcp using Streamable HTTP transport:
{
"mcpServers": {
"agentlayer": {
"url": "https://agentlayer-mcp-server.your-subdomain.workers.dev/mcp"
}
}
}Available MCP Tools (6 tools)
Tool | Description |
| Get real-time LLM pricing data across providers |
| Get model performance benchmarks |
| Track deprecated API versions |
| Get AI model quality scores with sentiment analysis |
| Log AI agent API spend with x402 micropayment support |
| Retrieve agent API spend records |
Architecture
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 workflow (.github/workflows/deploy.yml):
Runs on push to
mainType checks with TypeScript
Deploys to Cloudflare Workers
Required GitHub secrets:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_IDNEON_DATABASE_URLFIRECRAWL_API_KEYSTRIPE_SECRET_KEYSTRIPE_STARTER_PRICE_IDSTRIPE_PRO_MONTHLY_PRICE_IDSTRIPE_SCALE_MONTHLY_PRICE_ID
License
MIT
Support
For issues and feature requests, please use the GitHub issue tracker.
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.Last updated2347MIT
- 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.Last updated850MIT
- 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.Last updated5552MIT
- AlicenseAqualityBmaintenanceProvides 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.Last updated242881MIT
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