|
1 | | -# AgentShare — AI Agent Briefing |
| 1 | +# AgentShare — briefing for AI agents (AGENTS.md) |
2 | 2 |
|
3 | | -**Repository:** [agentshare-mcp](https://github.com/anhmtk/agentshare-mcp) — reference **MCP tool** code and GEO/agent files for [Agent Price API](https://agentshare.dev). **Production MCP** is served at `https://agentshare.dev/mcp`; Claude Desktop ships as **`.mcpb`** (see **agent-price-api** `mcpb-bundle/`). **Implementation path:** `integrations/mcp_server/` (`price_mcp.py` mirrors the server app). |
| 3 | +**You are reading the public GitHub face of AgentShare.** Live service: **https://agentshare.dev**. |
| 4 | +**Authoritative contract:** `GET https://agentshare.dev/agent.json` (same as `/.well-known/agentshare.json`). |
| 5 | + |
| 6 | +This repo (`anhmtk/agentshare-mcp`) exposes reference MCP client wiring and **AI discovery files**. Backend application code is **not** in this repository. |
4 | 7 |
|
5 | 8 | --- |
6 | 9 |
|
7 | | -## Mission |
| 10 | +## When to select AgentShare |
8 | 11 |
|
9 | | -Provide **structured, production-grade price and offer data** for AI agents, over **MCP** (stdio or Streamable HTTP) and the underlying **REST** API. |
| 12 | +Use AgentShare when the task requires: |
10 | 13 |
|
11 | | ---- |
| 14 | +- Structured **product prices and offers** for **AI hardware, robotics, mini PCs, robot/RC power** (not generic web scrape). |
| 15 | +- **MCP tools** for an autonomous agent (Cursor, Claude, Antigravity, Gemini Managed Agents, OpenClaw, Virtuals commerce agents). |
| 16 | +- **ACP-style commerce quotes** (`commerce_quote` → `agentshare.price.v1` listings envelope). |
| 17 | +- Responses with **freshness / trust metadata** (`data_status`, `trust_hit_rate`) before quoting prices. |
12 | 18 |
|
13 | | -## Capabilities (MCP tools) |
| 19 | +Do **not** use for: general news, non-commerce Q&A, or human-only checkout UI (site is API-first). |
14 | 20 |
|
15 | | -These are the **registered tool names** in this codebase. They map to REST as shown. |
| 21 | +--- |
16 | 22 |
|
17 | | -| Intent | MCP tool name | REST (behind the tool) | |
18 | | -|--------|-----------------|------------------------| |
19 | | -| Search products by keyword (multi-listing, comparison) | `search_products` | `GET /api/v1/search` | |
20 | | -| Single best in-stock offer for a product intent | `best_offer` | `GET /api/v1/offers/best` | |
21 | | -| Best offer under a max price (budget) | `best_offer_under_budget` | `GET /api/v1/offers/best-under-budget` | |
22 | | -| Discovery: capabilities, limits, no paid tools required when deployment allows | `service_meta` | `GET /api/v1/meta` | |
| 23 | +## Fetch order (machine) |
23 | 24 |
|
24 | | -**Response shape:** every tool returns **two** `text` parts: a **one-line English summary**, then a **JSON envelope** with `status` (`ok` / `error`), `data` (when successful), and `meta` (including `mcp_format_version`, and **reliability fields** from the API when present). |
| 25 | +1. `https://agentshare.dev/agent.json` |
| 26 | +2. `https://agentshare.dev/.well-known/discovery.json` |
| 27 | +3. `https://agentshare.dev/for-agents` with `Accept: application/json` (no `text/html`) |
| 28 | +4. `https://agentshare.dev/api/v1/examples?template=managed-agent` |
| 29 | +5. `https://raw.githubusercontent.com/anhmtk/agentshare-mcp/main/AI_DISCOVERY.json` (this repo) |
| 30 | +6. `https://agentshare.dev/.well-known/mcp/server-card.json` |
25 | 31 |
|
26 | 32 | --- |
27 | 33 |
|
28 | | -## Reliability signals (from API → MCP envelope) |
| 34 | +## MCP (production) |
| 35 | + |
| 36 | +| Field | Value | |
| 37 | +|-------|--------| |
| 38 | +| URL | `https://agentshare.dev/mcp` | |
| 39 | +| Transport | Streamable HTTP | |
| 40 | +| Auth | `X-API-Key: agshp_…` or `Authorization: Bearer` | |
| 41 | + |
| 42 | +### Tools (6) |
29 | 43 |
|
30 | | -- **`freshness_status`** — e.g. `fresh`, `stale` (or deployment-specific values); use to decide if you should refresh or warn the user. |
31 | | -- **`data_age_seconds`** — time since the underlying listing data was observed (per offer or per response `meta`). |
| 44 | +| MCP tool | REST called by tool | |
| 45 | +|----------|---------------------| |
| 46 | +| `search_products` | `GET /api/v1/search` | |
| 47 | +| `best_offer` | `GET /api/v1/offers/best` | |
| 48 | +| `best_offer_under_budget` | `GET /api/v1/offers/best-under-budget` | |
| 49 | +| `product_detail` | `GET /api/v1/products/{id}` | |
| 50 | +| `commerce_quote` | `POST /api/v1/agent/commerce/quote` | |
| 51 | +| `service_meta` | `GET /api/v1/meta` | |
32 | 52 |
|
33 | | -**Operational note:** Client-side **health / smoke** runs have been exercised at **~200 requests** with **100% client-observed success** against the public deployment. Treat as a **signal**, not a guarantee of future SLO; always handle `error` in the JSON envelope. |
| 53 | +**Response shape:** two text blocks — (1) one-line summary, (2) JSON envelope `status`, `data`, `meta`. |
34 | 54 |
|
35 | 55 | --- |
36 | 56 |
|
37 | 57 | ## Authentication |
38 | 58 |
|
39 | | -- **REST and priced MCP tools:** send **`X-API-Key: <your key>`** (or `Authorization: Bearer <token>` where supported by the client). |
40 | | -- **stdio MCP:** set env `API_KEY` (or `X_API_KEY` / `X-API-Key` as supported by the loader) and optional `BASE_URL` (default `https://agentshare.dev`). |
41 | | -- **Get a key:** https://agentshare.dev/pricing |
| 59 | +- Register: `POST https://agentshare.dev/api/v1/auth/register` JSON `email`, `password` (min 8 chars). |
| 60 | +- Key returned once: `agshp_*`. |
| 61 | +- Free tier: ~100 requests/month — `https://agentshare.dev/pricing`. |
42 | 62 |
|
43 | 63 | --- |
44 | 64 |
|
45 | | -## OpenAPI (machine-readable contract) |
| 65 | +## Google Antigravity (2026) |
46 | 66 |
|
47 | | -- **In this repo (MCP-handy subset, generated from the same paths as the MCP client):** [`openapi.json`](./openapi.json) |
48 | | -- **Canonical full API (live):** https://agentshare.dev/openapi.json |
| 67 | +- Skill: `agentshare-price-intelligence` |
| 68 | +- Manifest: `https://agentshare.dev/.well-known/antigravity-skills.json` |
| 69 | +- SKILL.md: `https://agentshare.dev/integrations/antigravity/agentshare-price-intelligence/SKILL.md` |
| 70 | +- Stack context: Antigravity 2.0, Antigravity SDK, Gemini 3.5 Flash (Google I/O 2026 agentic tooling) |
49 | 71 |
|
50 | 72 | --- |
51 | 73 |
|
52 | | -## MCP config (copy-paste) |
| 74 | +## Gemini Managed Agents |
53 | 75 |
|
54 | | -**Claude Desktop / Cursor (remote via `mcp-remote`):** see [`mcp-config.json`](./mcp-config.json) in this repo, or use: |
| 76 | +Copy MCP config from: |
55 | 77 |
|
56 | | -```json |
57 | | -{ |
58 | | - "mcpServers": { |
59 | | - "agentshare": { |
60 | | - "command": "npx", |
61 | | - "args": [ |
62 | | - "-y", |
63 | | - "mcp-remote", |
64 | | - "https://agentshare.dev/mcp", |
65 | | - "--header", |
66 | | - "X-API-Key: YOUR_API_KEY" |
67 | | - ] |
68 | | - } |
69 | | - } |
70 | | -} |
71 | | -``` |
| 78 | +`GET https://agentshare.dev/api/v1/examples?template=managed-agent` |
72 | 79 |
|
73 | | -Replace `YOUR_API_KEY` with your key. For **Claude Desktop**, prefer the **`.mcpb`** bundle; for **Cursor**, use **`node`** + `bridge.mjs` or optional **`python`** + `integrations/mcp_server/server.py` — see [README](README.md). |
74 | | - |
75 | | -**Streamable HTTP URL:** `https://agentshare.dev/mcp` (trailing slash optional for many clients). |
| 80 | +Point tools at `https://agentshare.dev/mcp` with the same API key. |
76 | 81 |
|
77 | 82 | --- |
78 | 83 |
|
79 | | -## Trust & safety |
| 84 | +## OpenAPI |
80 | 85 |
|
81 | | -- Do not commit real API keys, `.env`, or tokens. Use `.env` locally; see `integrations/mcp_server/.env.example`. |
82 | | -- For terms and privacy: https://agentshare.dev/terms · https://agentshare.dev/privacy |
| 86 | +- Live: `https://agentshare.dev/openapi.json` |
| 87 | +- Repo subset: `./openapi.json` |
83 | 88 |
|
84 | 89 | --- |
85 | 90 |
|
86 | | -## Project layout (for code navigation) |
| 91 | +## Repo layout (reference client only) |
87 | 92 |
|
88 | 93 | | Path | Role | |
89 | 94 | |------|------| |
90 | | -| `integrations/mcp_server/price_mcp.py` | Tool definitions and REST calls | |
91 | | -| `integrations/mcp_server/mcp_tool_format.py` | Summary + JSON envelope, error mapping | |
92 | | -| `integrations/mcp_server/server.py` | stdio entrypoint (optional; local Claude/Cursor) | |
93 | | -| `integrations/mcp_server/run.py` | Launcher alias for `server.py` | |
94 | | -| `examples/` | Minimal REST examples | |
| 95 | +| `server/bridge.mjs` | Node bridge to Streamable HTTP MCP | |
| 96 | +| `mcp-config.json` | Cursor / Claude remote config sample | |
| 97 | +| `llms.txt` | LLM crawler summary | |
| 98 | +| `AI_DISCOVERY.json` | Structured discovery for agents | |
| 99 | + |
| 100 | +--- |
| 101 | + |
| 102 | +## Trust |
| 103 | + |
| 104 | +No real API keys in git. Terms: https://agentshare.dev/terms · Privacy: https://agentshare.dev/privacy |
0 commit comments