agent-context-api MCP server
2026년 8월 24일 커밋토큰 카운팅, 모델별 예산 관리, 자격 증명 마스킹을 포함하여 코딩 에이전트를 위한 결정론적 컨텍스트 프리플라이트(preflight) 기능을 제공합니다.
다른 이름 dacode-dev/agent-context-api
- 스타
- 0
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- 0.7.4
- 마지막 커밋
- 2026년 8월 24일
- 라이선스
- MIT
agent-context-api MCP란?
agent-context-api은(는) MCP server입니다. 토큰 카운팅, 모델별 예산 관리, 자격 증명 마스킹을 포함하여 코딩 에이전트를 위한 결정론적 컨텍스트 프리플라이트(preflight) 기능을 제공합니다.
프로젝트 README에서 생성된 요약
agent-context-api MCP server 정보
이 서비스는 대규모 언어 모델에 전달하기 전 저장소 텍스트를 준비해야 하는 코딩 에이전트를 위해 결정론적 컨텍스트 프리플라이트 기능을 제공합니다. GPT 계열 토큰 카운팅, 모델별 예산 적용, 잠재적 자격 증명 마스킹과 같은 특정 작업을 수행합니다. 개발자는 이를 Cline과 같은 클라이언트를 위한 로컬 stdio MCP server로 실행하거나 호스팅된 streamable HTTP 엔드포인트를 사용할 수 있습니다. 최대 12,000자까지는 무료 로컬 티어가 제공되지만, 더 큰 요청은 x402 프로토콜을 통한 유효한 Base USDC 결제가 필요합니다.
컨텍스트 관리 외에도 이 API는 특화된 엔드포인트를 통해 관리형 데이터 실험 기능을 제공합니다. 여기에는 에이전트 작업 목록을 정규화하는 bounty-radar, 카탈로그 활성 상태를 확인하는 payanagent-health, ETH 및 Base 네트워크 신호를 집계하는 base-market-pulse가 포함됩니다. 이 서비스는 직접 폴링, 모니터링 및 스키마 드리프트 문제를 관리하는 대신, 유지 관리되고 타임스탬프가 찍힌 정규화된 데이터에 비용을 지불하고자 하는 개발자를 위해 설계되었습니다. 모든 컨텍스트 처리는 제출된 텍스트가 제3자에게 전송되지 않도록 로컬에서 이루어집니다.
활용 사례
- 1LLM을 위한 저장소 컨텍스트 준비에이전트는 코드를 모델에 보내기 전 프리플라이트 도구를 사용하여 토큰을 카운팅하고 자격 증명을 마스킹할 수 있습니다.
- 2에이전트 작업 기회 모니터링개발자는 정규화된 실시간 에이전트 작업 목록을 요청하여 자금이 확보된 기회를 식별할 수 있습니다.
- 3PayanAgent 카탈로그 상태 확인AI 클라이언트는 순위가 매겨진 PayanAgent 카탈로그의 활성 상태와 지연 시간을 확인할 수 있습니다.
- 4Base 네트워크 신호 집계사용자는 Coinbase, DEX Screener 및 Base JSON-RPC 메서드로부터 결합된 데이터를 가져올 수 있습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
agent-context-api MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 agent-context-api MCP 설치
$ claude mcp add --transport http agent-context-api https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcpCursor에 agent-context-api MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"agent-context-api": {
"url": "https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcp"
}
}
}VS Code에 agent-context-api MCP 설치
.vscode/mcp.json
{
"servers": {
"agent-context-api": {
"type": "http",
"url": "https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcp"
}
}
}VS Code CLI에 agent-context-api MCP 설치
$ code --add-mcp '{"name":"agent-context-api","type":"http","url":"https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcp"}'Codex에 agent-context-api MCP 설치
$ codex mcp add agent-context-api --url https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcpCodex config.toml에 agent-context-api MCP 설치
~/.codex/config.toml
[mcp_servers.agent-context-api] url = "https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcp"
Gemini CLI에 agent-context-api MCP 설치
$ gemini mcp add -s user --transport http agent-context-api https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcpGemini settings.json에 agent-context-api MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"agent-context-api": {
"url": "https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcp",
"type": "http"
}
}
}구성
X402_FACILITATOR
| 이름 | 설명 | 유형 |
|---|---|---|
| X402_FACILITATOR | — |
자동 검사
2026년 11월 15일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능dacode-dev/agent-context-api is public and reachablegithub.com/dacode-dev/agent-context-api ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-08-24github.com/dacode-dev/agent-context-api ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답Endpoint did not answer initialize: HTTP 404결함 발견
README
GitHub에서 보기Agent 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.
agent-context-api MCP 질문
agent-context-api MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add --transport http agent-context-api https://agent-context-api-proxy.agent-context-proxy.workers.dev/mcp를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
agent-context-api MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
컨텍스트 프리플라이트 도구는 어떤 기능을 수행하나요?
GPT 계열 토큰을 카운팅하고, 선택 사항인 모델별 예산을 적용하며, LLM에 전달할 저장소 텍스트에서 자격 증명으로 의심되는 정보를 마스킹하여 준비합니다.
컨텍스트 프리플라이트 서비스는 무료인가요?
로컬 MCP 도구는 최대 12,000자까지 무료로 사용할 수 있으며, 그 이상의 입력은 유료 HTTP 엔드포인트가 필요합니다.
API가 제 텍스트를 제3자에게 전송하나요?
아니요, API는 로컬에서 처리가 이루어지도록 설계되었으며 제출된 텍스트를 제3자에게 전송하지 않습니다.
컨텍스트 프리플라이트 요청 비용은 얼마인가요?
유료 엔드포인트의 기본 가격은 요청당 $0.005입니다.