Skip to content

Commit ec11fb1

Browse files
committed
fix(mcp): restore stdio server.py/run.py; fix README typo and Glama CMD
- Optional local Python stdio alongside .mcpb / bridge docs - Dockerfile.glama: CMD server.py; README BASE_URL table fixed Made-with: Cursor
1 parent a8c847a commit ec11fb1

5 files changed

Lines changed: 17 additions & 57 deletions

File tree

AGENTS.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AgentShare — AI Agent Briefing
22

3-
**Repository:** [agentshare-mcp](https://github.com/anhmtk/agentshare-mcp)stdio MCP server that proxies [Agent Price API](https://agentshare.dev) tools. **Implementation path:** `integrations/mcp_server/` (see `price_mcp.py`).
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).
44

55
---
66

@@ -70,7 +70,7 @@ These are the **registered tool names** in this codebase. They map to REST as sh
7070
}
7171
```
7272

73-
Replace `YOUR_API_KEY` with your key. For **local stdio** (no `npx`), use `python` + `integrations/mcp_server/server.py` — see [README](README.md).
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).
7474

7575
**Streamable HTTP URL:** `https://agentshare.dev/mcp` (trailing slash optional for many clients).
7676

@@ -89,5 +89,6 @@ Replace `YOUR_API_KEY` with your key. For **local stdio** (no `npx`), use `pytho
8989
|------|------|
9090
| `integrations/mcp_server/price_mcp.py` | Tool definitions and REST calls |
9191
| `integrations/mcp_server/mcp_tool_format.py` | Summary + JSON envelope, error mapping |
92-
| `integrations/mcp_server/server.py` | stdio entrypoint |
92+
| `integrations/mcp_server/server.py` | stdio entrypoint (optional; local Claude/Cursor) |
93+
| `integrations/mcp_server/run.py` | Launcher alias for `server.py` |
9394
| `examples/` | Minimal REST examples |

README.md

Lines changed: 9 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
## Description
1010

11-
**AgentShare** provides **structured marketplace prices and offers for AI agents** via a JSON **REST API** and **MCP** ([Streamable HTTP](https://agentshare.dev/mcp/)). This repository contains the **stdio MCP server** (Python) used with Claude Desktop, Cursor, and other MCP clients, plus minimal REST examples. The production API, pricing, and full docs live at **https://agentshare.dev**.
11+
**AgentShare** provides **structured marketplace prices and offers for AI agents** via a JSON **REST API** and **MCP** ([Streamable HTTP](https://agentshare.dev/mcp/)). This repository holds **reference Python tool code** (`integrations/mcp_server/`), **GEO/agent docs** (`AGENTS.md`, `llms.txt`, …), and **REST examples**. The live **`/mcp`** implementation and **`.mcpb`** bundle are maintained in **[agent-price-api](https://github.com/anhmtk/agent-price-api)** (`mcpb-bundle/agentshare-price-mcp`).
1212

1313
All MCP tools are **read-only**: they fetch data from the AgentShare API and do not modify your accounts or remote marketplace listings.
1414

@@ -43,66 +43,27 @@ All MCP tools are **read-only**: they fetch data from the AgentShare API and do
4343

4444
## Getting an API key
4545

46-
To use this MCP server or the REST API, you need an API key. Visit [https://agentshare.dev/pricing](https://agentshare.dev/pricing) to get your free tier key (**100 requests / month** on the public free plan at time of writing — always confirm on the site).
46+
To use MCP or the REST API, you need an API key. Visit [https://agentshare.dev/pricing](https://agentshare.dev/pricing) to get your free tier key (**100 requests / month** on the public free plan at time of writing — always confirm on the site).
4747

4848
---
4949

5050
## Installation
5151

52-
### Quick install (pip)
52+
**Recommended — Claude Desktop:** **`.mcpb`** from **[agent-price-api](https://github.com/anhmtk/agent-price-api)**`mcpb-bundle/agentshare-price-mcp``mcpb pack`.
5353

54-
```bash
55-
git clone https://github.com/anhmtk/agentshare-mcp.git
56-
cd agentshare-mcp
57-
pip install -r integrations/mcp_server/requirements.txt
58-
export API_KEY=your_api_key # Windows: $env:API_KEY="..."
59-
# optional: export BASE_URL=https://agentshare.dev
60-
python integrations/mcp_server/server.py
61-
```
62-
63-
Get a key: https://agentshare.dev/pricing
64-
65-
### Claude Desktop (`claude_desktop_config.json`) — stdio
66-
67-
Use a **local stdio** server (Python). Replace the path with the **absolute** path to `server.py` in *your* clone of this repo.
68-
69-
```json
70-
{
71-
"mcpServers": {
72-
"agentshare": {
73-
"command": "python",
74-
"args": ["/ABSOLUTE/PATH/TO/agentshare-mcp/integrations/mcp_server/server.py"],
75-
"env": {
76-
"API_KEY": "your-api-key-here",
77-
"BASE_URL": "https://agentshare.dev"
78-
}
79-
}
80-
}
81-
}
82-
```
54+
**Cursor / IDE:** Node **`bridge.mjs`** (same as `.mcpb`) or **`npx mcp-remote`** with `--header X-API-Key:…` — see [`mcp-config.json`](mcp-config.json).
8355

84-
- On Windows, prefer forward slashes in `args`, e.g. `D:/code/agentshare-mcp/integrations/mcp_server/server.py`.
85-
86-
**Remote MCP (Streamable HTTP):** clients that support URL + API key headers can use `https://agentshare.dev/mcp/` with `X-API-Key` or `Authorization: Bearer`. Use **[`mcp-config.json`](mcp-config.json)** for **`npx mcp-remote`**. Details: [MCP Quickstart](https://agentshare.dev/docs) (section MCP).
87-
88-
**Advanced — HTTP via `mcp-remote` (Node / npx):** if you use [`mcp-remote`](https://github.com/geelen/mcp-remote) to bridge HTTPS → stdio, pass your key with `--header` (see troubleshooting in [Cursor MCP setup](https://agentshare.dev/docs)); this repo does **not** publish an `npx agentshare-mcp` package.
89-
90-
The official **Claude Desktop Extension** (`.mcpb`) uses a small Node **bridge** (see the **agent-price-api** repo, `mcpb-bundle/agentshare-price-mcp`) and does **not** rely on `mcp-remote`.
91-
92-
### Clone & run stdio locally
56+
**Optional — Python stdio** (this repo), from clone root:
9357

9458
```bash
9559
pip install -r integrations/mcp_server/requirements.txt
9660
export API_KEY=your_api_key
97-
# optional: export BASE_URL=http://localhost:8000
9861
python integrations/mcp_server/server.py
9962
```
10063

101-
Same as `python integrations/mcp_server/run.py`. See [`integrations/mcp_server/README.md`](integrations/mcp_server/README.md) for tools and environment variables.
102-
103-
### Claude Desktop Extension (`.mcpb`)
64+
Same as `python integrations/mcp_server/run.py`.
10465

105-
A packaged extension (**AgentShare — Real-time Price & Offer MCP**) can be installed from the `.mcpb` built in the main **agent-price-api** repo (`mcpb-bundle/agentshare-price-mcp`). That bundle connects to `https://agentshare.dev/mcp` via a small Node bridge. See [MCP Quickstart](https://agentshare.dev/docs) on the site.
66+
**Glama:** use **`integrations/mcp_server/Dockerfile.glama`** (runs `server.py`).
10667

10768
---
10869

@@ -112,11 +73,8 @@ A packaged extension (**AgentShare — Real-time Price & Offer MCP**) can be ins
11273

11374
| Variable | Required | Default | Description |
11475
|----------|----------|---------|-------------|
115-
| `API_KEY` | For price tools || Sent as `X-API-Key` to the API |
116-
| `BASE_URL` | No | `https://agentshare.dev` | API base URL (e.g. local dev) |
117-
| `MCP_UPSTREAM_TIMEOUT_SEC` | No | `120` | HTTP timeout for upstream API calls |
118-
119-
**Remote MCP (Streamable HTTP):** clients that support URL + headers can call `https://agentshare.dev/mcp/` with `X-API-Key` or `Authorization: Bearer`. Details: [docs](https://agentshare.dev/docs) (MCP section).
76+
| `API_KEY` | For price tools (REST / some clients) || Sent as `X-API-Key` to the API |
77+
| `BASE_URL` | No | `https://agentshare.dev` | API base URL |
12078

12179
---
12280

integrations/mcp_server/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ export API_KEY=your_key
1414
python integrations/mcp_server/server.py
1515
```
1616

17+
Prefer **`.mcpb`** or **Node bridge** for Claude when you do not need Python stdio — see [README](../../README.md).
18+
1719
## Tools
1820

1921
| Tool | Auth | Description |
@@ -30,4 +32,4 @@ python integrations/mcp_server/server.py
3032

3133
## Cursor Setup
3234

33-
See [Cursor MCP setup](https://agentshare.dev/docs) (MCP section) for manual Cursor configuration steps.
35+
See [Cursor MCP setup](https://agentshare.dev/docs) (MCP section) or repo [README](../../README.md).

integrations/mcp_server/price_mcp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
def _load_dotenv() -> None:
31-
"""Load .env from mcp_server dir or project root (same as legacy server.py)."""
31+
"""Load .env from mcp_server dir or project root."""
3232
here = Path(__file__).resolve().parent
3333
project_root = here.parent.parent
3434
for p in (here / ".env", project_root / ".env"):

integrations/mcp_server/run.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python
21
"""Launcher for Agent Price API MCP server (stdio). Run from project root: python integrations/mcp_server/run.py"""
32
import sys
43
from pathlib import Path

0 commit comments

Comments
 (0)