MCP server de agent-context-api
Commit 24 ago 2026Proporciona un preflight de contexto determinista para agentes de programación, incluyendo conteo de tokens, gestión de presupuesto según el modelo y redacción de credenciales.
También conocido como dacode-dev/agent-context-api
- Stars
- 0
- Herramientas
- —
- Descargas, 30 días
- —
- Última versión
- 0.7.4
- Último commit
- 24 ago 2026
- Licencia
- MIT
¿Qué es agent-context-api MCP?
agent-context-api es un MCP server. Proporciona un preflight de contexto determinista para agentes de programación, incluyendo conteo de tokens, gestión de presupuesto según el modelo y redacción de credenciales.
Resumen generado a partir del README del proyecto
Acerca del MCP server de agent-context-api
Este servicio proporciona un preflight de contexto determinista para agentes de programación que necesitan preparar el texto de un repositorio antes de enviarlo a un modelo de lenguaje extenso. Realiza tareas específicas como contar tokens de la familia GPT, aplicar presupuestos adaptados al modelo y redactar posibles credenciales. Los desarrolladores pueden ejecutar esto como un MCP server local vía stdio para clientes como Cline o utilizar el endpoint streamable HTTP alojado. Aunque existe un nivel local gratuito para entradas de hasta 12,000 caracteres, las solicitudes más grandes requieren un pago válido en Base USDC a través del protocolo x402.
Más allá de la gestión de contexto, la API ofrece experimentos de datos gestionados mediante endpoints especializados. Estos incluyen bounty-radar para normalizar listados de trabajo de agentes, payanagent-health para verificar la actividad del catálogo y base-market-pulse para agregar señales de las redes ETH y Base. El servicio está diseñado para desarrolladores que prefieren pagar por datos mantenidos, con marca de tiempo y normalizados, en lugar de gestionar sus propios problemas de polling, monitoreo y deriva de esquemas. Todo el procesamiento de contexto ocurre localmente para garantizar que el texto enviado no se envíe a terceros.
Qué puedes hacer con él
- 1Preparar el contexto del repositorio para LLMsUn agente puede usar la herramienta de preflight para contar tokens y redactar credenciales antes de enviar el código a un modelo.
- 2Monitorear oportunidades de trabajo para agentesUn desarrollador puede solicitar una lista normalizada de listados de trabajo de agentes activos para identificar oportunidades financiadas.
- 3Verificar el estado del catálogo PayanAgentUn cliente de IA puede verificar la actividad y latencia del catálogo clasificado de PayanAgent.
- 4Agregar señales de la red BaseUn usuario puede recuperar datos combinados de Coinbase, DEX Screener y métodos Base JSON-RPC.
Escrito a partir del README del proyecto. Cada caso de uso se verifica con una cita del mismo.
Cómo instalar agent-context-api MCP
Formatos verificados el 10 nov 2026Añadir a CursorAñadir a GooseInstalar agent-context-api MCP en Claude Code
$ claude mcp add --transport http agent-context-api https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcpInstalar agent-context-api MCP en Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"agent-context-api": {
"url": "https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcp"
}
}
}Instalar agent-context-api MCP en VS Code
.vscode/mcp.json
{
"servers": {
"agent-context-api": {
"type": "http",
"url": "https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcp"
}
}
}Instalar agent-context-api MCP en VS Code CLI
$ code --add-mcp '{"name":"agent-context-api","type":"http","url":"https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcp"}'Instalar agent-context-api MCP en Codex
$ codex mcp add agent-context-api --url https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcpInstalar agent-context-api MCP en Codex config.toml
~/.codex/config.toml
[mcp_servers.agent-context-api] url = "https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcp"
Instalar agent-context-api MCP en Gemini CLI
$ gemini mcp add -s user --transport http agent-context-api https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcpInstalar agent-context-api MCP en Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"agent-context-api": {
"url": "https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcp",
"type": "http"
}
}
}Configuración
X402_FACILITATOR
| Nombre | Descripción | Tipo |
|---|---|---|
| X402_FACILITATOR | — |
Verificaciones automáticas
Ejecutado 15 nov 2026Informe completo →Aún no verificado. Un servidor necesita una puntuación de 80, ningún hallazgo grave y suficientes datos para que podamos revisarlo. Cómo funcionan las verificaciones · Qué corregir para obtener más puntos
- Repositorio de origen vinculado y accesibledacode-dev/agent-context-api is public and reachablegithub.com/dacode-dev/agent-context-api ↗Aprobado
- El paquete indica este repositorio como su origenNo verificado
- Procedencia de la compilación (atestación de Sigstore)No verificado
- Licencia de código abierto (OSI)MITspdx.org/licenses/MIT.html ↗Aprobado
- Commit o lanzamiento en el último añoLast commit or release 2026-08-24github.com/dacode-dev/agent-context-api ↗Aprobado
- OpenSSF ScorecardNo verificado
- El nombre del paquete no es similar a un paquete popularNo verificado
- No hay avisos críticos en el paquete ni en sus dependenciasNo verificado
- Sin instrucciones ocultas para el modelo0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersAprobado
- Las herramientas destructivas están etiquetadasNo verificado
- El endpoint remoto responde al handshake de MCPEndpoint did not answer initialize: HTTP 404Hallazgo
README
Ver en GitHubAgent Context API
A small paid API for coding agents that need a deterministic context preflight before sending repository text to an LLM. It counts GPT-family tokens, applies an optional model-aware budget, and redacts likely credentials.
It also exposes managed data experiments. bounty-radar normalizes live agent-work listings and preserves the difference between a canonical escrow signal and an ordinary venue listing. payanagent-health produces a fresh liveness snapshot of the ranked PayanAgent catalog. base-market-pulse combines fresh public ETH, DEX, and Base-network signals. The source code is public, but the paid value is operated aggregation, source health, bounded probing, and timestamped results that a buyer does not have to run.
agent-work-brief is the decision-oriented bundle: it combines canonical escrowed work with catalog liveness, excludes ordinary unfunded listings, and classifies opportunities that require capital before an agent spends time evaluating them.
Why pay when the source is public?
Self-hosting is deliberately allowed. The paid convenience is the maintained run: polling changing upstreams, normalizing responses, detecting partial outages, enforcing bounded work, and serving a timestamped result from a ready endpoint. A buyer can fork the code, but then owns deployment, monitoring, rate-limit handling, schema drift, and repairs. There is no claim of exclusivity; the service must earn trust through freshness and reliable operation.
Local development
npm install
npm test
X402_FACILITATOR=https://facilitator.openx402.ai npm start
The service listens on http://localhost:8787 by default. GET /health is free. POST /v1/context-preflight returns an x402 402 Payment Required response until the caller supplies a valid Base USDC payment.
For production Base mainnet operation, use a facilitator that advertises x402Version: 2, scheme: exact, and network: eip155:8453 at its /supported endpoint; the maintained deployment uses https://facilitator.openx402.ai. The public https://x402.org/facilitator endpoint is suitable for Base Sepolia testing, not this mainnet payout configuration. Always verify current facilitator support before changing deployments.
API example
curl -X POST http://localhost:8787/v1/context-preflight \
-H 'content-type: application/json' \
-d '{"text":"const token = \"sk-example\";","model":"claude-sonnet","token_budget":1000}'
The default price is $0.005 per request. Set PAY_TO to change the public payout address, X402_FACILITATOR to select a compatible facilitator, and PUBLIC_HOSTS to provide a comma-separated allowlist of Worker/custom hostnames used in x402 resource URLs. Do not put private keys or facilitator credentials in this repository; the service does not need a signing key to receive payments.
Managed bounty radar
POST /v1/bounty-radar costs $0.01 through x402. Send filters such as:
{"include_unverified":false,"min_reward_usd":0,"limit":20}
The response includes source health, deadlines, claim bonds, external-spend requirements, and a payment_evidence field. Only listings explicitly marked canonical and escrowed are labeled funded; other listings remain visible only when requested and are labeled unverified.
PayanAgent catalog health
POST /v1/payanagent-health costs $0.01 through x402. It accepts an optional limit from 1 to 25 and checks the ranked public catalog using only read-only HEAD requests (falling back to OPTIONS when required). HTTP 402 means that a live payment gate responded; the service never sends payment headers or calls paid routes. The response contains per-offer status, HTTP code, latency, summary counts, and generated_at.
Base market pulse
POST /v1/base-market-pulse costs $0.01 through x402 and accepts {}. The equivalent GET route exists for agent directories and simple HTTP clients. It reads Coinbase's public ETH/USD spot endpoint, DEX Screener's public Base WETH/USDC pair feed, and public Base JSON-RPC methods for the current block and gas price. It returns per-source health, timestamped values, and partial results when one source is unavailable. It is informational data only and does not trade or submit transactions.
POST /v1/agent-work-brief costs $0.03 and accepts optional min_reward_usd, limit, and health_limit filters. It is intended for agents deciding whether current work is worth pursuing; it makes no claims, payments, or downstream paid calls.
GET /.well-known/x402 (also available as /.well-known/x402.json) publishes the machine-readable service manifest, routes, prices, network, asset, and payout address. The manifest is generated from the request host so it remains correct when the zero-cost development tunnel rotates.
When the optional agent-tools hub gateway is enabled, it forwards settled requests to /hub/v1/base-market-pulse with a hub-issued X-Hub-Secret. That upstream path returns 404 without the secret and is separate from the direct x402 routes.
MCP integration
The repository also includes a local stdio MCP server for Cline and other MCP clients:
npm run start:mcp
The preflight_context tool provides a free local tier up to 12,000 characters. Larger inputs return the paid HTTP endpoint and its x402 price. Set PAID_ENDPOINT to the currently deployed endpoint when launching the MCP server. See llms-install.md for a copy-paste client configuration.
The same server is available as a hosted, stateless Streamable HTTP MCP endpoint at https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcp and is described by server.json. It is published in the official MCP Registry for client and downstream-directory discovery. This hosted route is intended for clients that can discover remote MCP servers; local execution remains available for self-hosting and offline preflight work. glama.json identifies the GitHub maintainer for directory indexing and ownership.
Design notes
server.jscontains the Express app, x402 payment middleware, discovery metadata, and route wiring.mcp-core.jsdefines the shared MCP tool surface;mcp-server.jsruns it over stdio and/mcpruns it over Streamable HTTP.analysis.jscontains deterministic context analysis;bounty-radar.jscontains source normalization and evidence policy.payanagent-health.jscontains the bounded, read-only catalog collector and probe logic.market-pulse.jscontains the bounded public market/RPC collectors and partial-source health output.test/server.test.jscovers redaction, budgets, the health route, and funded/unfunded labeling;test/payanagent-health.test.jscovers health classification and the no-payment probe contract.- The API intentionally does not send submitted text to a third party; processing is local.
- This is an experiment. Revenue must be verified from settlement records, not inferred from 402 responses, requests, or directory listings.
Preguntas sobre agent-context-api MCP
¿Cómo agrego agent-context-api MCP a Claude Code?
Ejecuta claude mcp add --transport http agent-context-api https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcp en tu terminal. Añade --scope user para que esté disponible en todos los proyectos.
¿Cómo agrego agent-context-api MCP a Cursor?
Abre ~/.cursor/mcp.json y añade el servidor en mcpServers, usando la configuración de Cursor que se muestra en la sección de instalación de arriba.
¿Qué hace la herramienta de context preflight?
Cuenta tokens de la familia GPT, aplica un presupuesto opcional basado en el modelo y redacta posibles credenciales para preparar el texto del repositorio para un LLM.
¿Es gratuito el servicio de context preflight?
La herramienta MCP local ofrece un nivel gratuito para entradas de hasta 12,000 caracteres, mientras que las entradas más grandes requieren el endpoint HTTP de pago.
¿La API envía mi texto a terceros?
No, la API está diseñada para que el procesamiento se realice localmente y no envía el texto enviado a terceros.
¿Cuánto cuesta una solicitud de context preflight?
El precio predeterminado para el endpoint de pago es de $0.005 por solicitud.