agent-tools-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_tools_mcp-0.1.0/.gitignore +10 -0
- agent_tools_mcp-0.1.0/LICENSE +16 -0
- agent_tools_mcp-0.1.0/PKG-INFO +113 -0
- agent_tools_mcp-0.1.0/README.md +88 -0
- agent_tools_mcp-0.1.0/agent_tools_mcp/__init__.py +5 -0
- agent_tools_mcp-0.1.0/agent_tools_mcp/__main__.py +33 -0
- agent_tools_mcp-0.1.0/agent_tools_mcp/server.py +114 -0
- agent_tools_mcp-0.1.0/pyproject.toml +39 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
Copyright 2026 JoursBleu
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
8
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
9
|
+
License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
14
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
15
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
16
|
+
specific language governing permissions and limitations under the License.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agent-tools-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Search and call x402 paid services from any MCP-compatible agent (Claude, Cursor, Cline).
|
|
5
|
+
Project-URL: Homepage, https://agent-tools.cloud
|
|
6
|
+
Project-URL: Repository, https://github.com/JoursBleu/agent-tools-mcp
|
|
7
|
+
Project-URL: Issues, https://github.com/JoursBleu/agent-tools-mcp/issues
|
|
8
|
+
Project-URL: Registry, https://registry.modelcontextprotocol.io/
|
|
9
|
+
Author-email: JoursBleu <kangletian@hotmail.com>
|
|
10
|
+
License: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agent,agent-tools,crypto,directory,mcp,model-context-protocol,web3,x402
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Requires-Dist: httpx>=0.27
|
|
23
|
+
Requires-Dist: mcp>=1.2.0
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# agent-tools-mcp
|
|
27
|
+
|
|
28
|
+
[](https://modelcontextprotocol.io)
|
|
29
|
+
[](https://pypi.org/project/agent-tools-mcp/)
|
|
30
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
31
|
+
|
|
32
|
+
Discover and call **x402 paid services** from any MCP-compatible agent (Claude, Cursor, Cline, Continue, …).
|
|
33
|
+
|
|
34
|
+
Backed by [agent-tools.cloud](https://agent-tools.cloud), an open directory of 400+ x402 paid APIs (`awesome-x402`, `x402.org/ecosystem`, …).
|
|
35
|
+
|
|
36
|
+
## Tools
|
|
37
|
+
|
|
38
|
+
| Tool | What it does |
|
|
39
|
+
|---|---|
|
|
40
|
+
| `search(intent, top_k, max_price_usd, category)` | Natural-language search across the directory |
|
|
41
|
+
| `get(slug)` | Full details (URL, price, call template) of a service |
|
|
42
|
+
| `list_categories()` | Browse categories |
|
|
43
|
+
| `stats()` | Directory size & health snapshot |
|
|
44
|
+
|
|
45
|
+
## Quick Start
|
|
46
|
+
|
|
47
|
+
### Claude Code CLI
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
claude mcp add agent-tools -- uvx agent-tools-mcp
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Claude Desktop / Cursor / Cline
|
|
54
|
+
|
|
55
|
+
Add to your MCP config (`~/.config/Claude/claude_desktop_config.json`, `~/.cursor/mcp.json`, …):
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"mcpServers": {
|
|
60
|
+
"agent-tools": {
|
|
61
|
+
"command": "uvx",
|
|
62
|
+
"args": ["agent-tools-mcp"]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Remote (no install)
|
|
69
|
+
|
|
70
|
+
Most clients also accept a `url`-based remote MCP server:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"mcpServers": {
|
|
75
|
+
"agent-tools": { "url": "https://agent-tools.cloud/mcp/v2" }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### From source
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pip install agent-tools-mcp # or `uv tool install agent-tools-mcp`
|
|
84
|
+
agent-tools-mcp # stdio server, ready for an MCP client
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Environment Variables
|
|
88
|
+
|
|
89
|
+
| Var | Default | Purpose |
|
|
90
|
+
|---|---|---|
|
|
91
|
+
| `AGENT_TOOLS_API_BASE` | `https://agent-tools.cloud` | Point at a different deployment (e.g. self-hosted) |
|
|
92
|
+
| `AGENT_TOOLS_LOG_LEVEL` | `INFO` | Server log level (stderr only) |
|
|
93
|
+
| `AGENT_TOOLS_HTTP_LOG_LEVEL` | `WARNING` | httpx/httpcore log level |
|
|
94
|
+
|
|
95
|
+
## Debugging
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Probe with the official MCP Inspector
|
|
99
|
+
npx -y @modelcontextprotocol/inspector uvx agent-tools-mcp
|
|
100
|
+
|
|
101
|
+
# Or raw JSON-RPC
|
|
102
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | uvx agent-tools-mcp
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+
|
|
107
|
+
Apache-2.0. See [LICENSE](LICENSE).
|
|
108
|
+
|
|
109
|
+
## Related
|
|
110
|
+
|
|
111
|
+
- Directory site: <https://agent-tools.cloud>
|
|
112
|
+
- x402 spec: <https://x402.org>
|
|
113
|
+
- MCP spec: <https://modelcontextprotocol.io>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# agent-tools-mcp
|
|
2
|
+
|
|
3
|
+
[](https://modelcontextprotocol.io)
|
|
4
|
+
[](https://pypi.org/project/agent-tools-mcp/)
|
|
5
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
6
|
+
|
|
7
|
+
Discover and call **x402 paid services** from any MCP-compatible agent (Claude, Cursor, Cline, Continue, …).
|
|
8
|
+
|
|
9
|
+
Backed by [agent-tools.cloud](https://agent-tools.cloud), an open directory of 400+ x402 paid APIs (`awesome-x402`, `x402.org/ecosystem`, …).
|
|
10
|
+
|
|
11
|
+
## Tools
|
|
12
|
+
|
|
13
|
+
| Tool | What it does |
|
|
14
|
+
|---|---|
|
|
15
|
+
| `search(intent, top_k, max_price_usd, category)` | Natural-language search across the directory |
|
|
16
|
+
| `get(slug)` | Full details (URL, price, call template) of a service |
|
|
17
|
+
| `list_categories()` | Browse categories |
|
|
18
|
+
| `stats()` | Directory size & health snapshot |
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
### Claude Code CLI
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
claude mcp add agent-tools -- uvx agent-tools-mcp
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Claude Desktop / Cursor / Cline
|
|
29
|
+
|
|
30
|
+
Add to your MCP config (`~/.config/Claude/claude_desktop_config.json`, `~/.cursor/mcp.json`, …):
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"mcpServers": {
|
|
35
|
+
"agent-tools": {
|
|
36
|
+
"command": "uvx",
|
|
37
|
+
"args": ["agent-tools-mcp"]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Remote (no install)
|
|
44
|
+
|
|
45
|
+
Most clients also accept a `url`-based remote MCP server:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"mcpServers": {
|
|
50
|
+
"agent-tools": { "url": "https://agent-tools.cloud/mcp/v2" }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### From source
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install agent-tools-mcp # or `uv tool install agent-tools-mcp`
|
|
59
|
+
agent-tools-mcp # stdio server, ready for an MCP client
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Environment Variables
|
|
63
|
+
|
|
64
|
+
| Var | Default | Purpose |
|
|
65
|
+
|---|---|---|
|
|
66
|
+
| `AGENT_TOOLS_API_BASE` | `https://agent-tools.cloud` | Point at a different deployment (e.g. self-hosted) |
|
|
67
|
+
| `AGENT_TOOLS_LOG_LEVEL` | `INFO` | Server log level (stderr only) |
|
|
68
|
+
| `AGENT_TOOLS_HTTP_LOG_LEVEL` | `WARNING` | httpx/httpcore log level |
|
|
69
|
+
|
|
70
|
+
## Debugging
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Probe with the official MCP Inspector
|
|
74
|
+
npx -y @modelcontextprotocol/inspector uvx agent-tools-mcp
|
|
75
|
+
|
|
76
|
+
# Or raw JSON-RPC
|
|
77
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | uvx agent-tools-mcp
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## License
|
|
81
|
+
|
|
82
|
+
Apache-2.0. See [LICENSE](LICENSE).
|
|
83
|
+
|
|
84
|
+
## Related
|
|
85
|
+
|
|
86
|
+
- Directory site: <https://agent-tools.cloud>
|
|
87
|
+
- x402 spec: <https://x402.org>
|
|
88
|
+
- MCP spec: <https://modelcontextprotocol.io>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""Entry point: `agent-tools-mcp` (CLI script) or `python -m agent_tools_mcp`.
|
|
2
|
+
|
|
3
|
+
Defaults to stdio transport so MCP clients (Claude Desktop, Cursor, Cline) can
|
|
4
|
+
spawn this process directly via the `command` field in their config.
|
|
5
|
+
"""
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import logging
|
|
9
|
+
import os
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
from .server import build_server
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def main() -> None:
|
|
16
|
+
# CRITICAL: every log must go to stderr; stdout is reserved for JSON-RPC.
|
|
17
|
+
logging.basicConfig(
|
|
18
|
+
stream=sys.stderr,
|
|
19
|
+
level=os.environ.get("AGENT_TOOLS_LOG_LEVEL", "INFO"),
|
|
20
|
+
format="%(asctime)s %(levelname)s %(name)s: %(message)s",
|
|
21
|
+
)
|
|
22
|
+
# Mute noisy libraries by default; opt in via env if debugging.
|
|
23
|
+
for noisy in ("httpx", "httpcore", "urllib3"):
|
|
24
|
+
logging.getLogger(noisy).setLevel(
|
|
25
|
+
os.environ.get("AGENT_TOOLS_HTTP_LOG_LEVEL", "WARNING")
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
server = build_server()
|
|
29
|
+
server.run() # stdio transport by default
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
if __name__ == "__main__":
|
|
33
|
+
main()
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"""Stdio MCP server exposing the agent-tools.cloud x402 directory.
|
|
2
|
+
|
|
3
|
+
Tools:
|
|
4
|
+
- search(intent, top_k, max_price_usd) - natural-language service discovery
|
|
5
|
+
- get(slug) - full details + call template
|
|
6
|
+
- list_categories() - browse by category
|
|
7
|
+
|
|
8
|
+
Reads `AGENT_TOOLS_API_BASE` env var (default https://agent-tools.cloud).
|
|
9
|
+
"""
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
import logging
|
|
13
|
+
import os
|
|
14
|
+
from typing import Any
|
|
15
|
+
|
|
16
|
+
import httpx
|
|
17
|
+
from mcp.server.fastmcp import FastMCP
|
|
18
|
+
|
|
19
|
+
log = logging.getLogger("agent_tools_mcp")
|
|
20
|
+
|
|
21
|
+
DEFAULT_API_BASE = "https://agent-tools.cloud"
|
|
22
|
+
DEFAULT_TIMEOUT = 15.0
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _api_base() -> str:
|
|
26
|
+
return os.environ.get("AGENT_TOOLS_API_BASE", DEFAULT_API_BASE).rstrip("/")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _user_agent() -> str:
|
|
30
|
+
from . import __version__
|
|
31
|
+
return f"agent-tools-mcp/{__version__} (+https://github.com/JoursBleu/agent-tools-mcp)"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def build_server() -> FastMCP:
|
|
35
|
+
mcp = FastMCP(
|
|
36
|
+
name="agent-tools",
|
|
37
|
+
instructions=(
|
|
38
|
+
"Use these tools to find and inspect x402 paid services from the "
|
|
39
|
+
"agent-tools.cloud directory. Call `search` first with a natural "
|
|
40
|
+
"language intent, then `get` to fetch full call details."
|
|
41
|
+
),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
@mcp.tool()
|
|
45
|
+
async def search(
|
|
46
|
+
intent: str,
|
|
47
|
+
top_k: int = 5,
|
|
48
|
+
max_price_usd: float | None = None,
|
|
49
|
+
category: str | None = None,
|
|
50
|
+
) -> dict[str, Any]:
|
|
51
|
+
"""Find x402 paid services matching a natural-language intent.
|
|
52
|
+
|
|
53
|
+
Args:
|
|
54
|
+
intent: What the agent wants to do, in plain English or Chinese
|
|
55
|
+
(e.g. "fetch user tweets", "check on-chain whale activity").
|
|
56
|
+
top_k: Max number of services to return (default 5, max 25).
|
|
57
|
+
max_price_usd: Hard upper bound on per-call price in USD.
|
|
58
|
+
category: Optional category filter (see `list_categories`).
|
|
59
|
+
"""
|
|
60
|
+
top_k = max(1, min(int(top_k), 25))
|
|
61
|
+
params: dict[str, Any] = {"q": intent, "limit": top_k}
|
|
62
|
+
if category:
|
|
63
|
+
params["category"] = category
|
|
64
|
+
async with httpx.AsyncClient(
|
|
65
|
+
timeout=DEFAULT_TIMEOUT, headers={"User-Agent": _user_agent()}
|
|
66
|
+
) as cx:
|
|
67
|
+
r = await cx.get(f"{_api_base()}/api/v1/search", params=params)
|
|
68
|
+
r.raise_for_status()
|
|
69
|
+
data = r.json()
|
|
70
|
+
|
|
71
|
+
items = data.get("items") or data.get("services") or []
|
|
72
|
+
if max_price_usd is not None:
|
|
73
|
+
items = [
|
|
74
|
+
s for s in items
|
|
75
|
+
if (s.get("price_usd") is None) or float(s["price_usd"]) <= max_price_usd
|
|
76
|
+
]
|
|
77
|
+
return {
|
|
78
|
+
"intent": intent,
|
|
79
|
+
"count": len(items[:top_k]),
|
|
80
|
+
"items": items[:top_k],
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@mcp.tool()
|
|
84
|
+
async def get(slug: str) -> dict[str, Any]:
|
|
85
|
+
"""Get full details (URL, price, schema, call template) of a service by slug."""
|
|
86
|
+
async with httpx.AsyncClient(
|
|
87
|
+
timeout=DEFAULT_TIMEOUT, headers={"User-Agent": _user_agent()}
|
|
88
|
+
) as cx:
|
|
89
|
+
r = await cx.get(f"{_api_base()}/api/v1/services/{slug}")
|
|
90
|
+
r.raise_for_status()
|
|
91
|
+
return r.json()
|
|
92
|
+
|
|
93
|
+
@mcp.tool()
|
|
94
|
+
async def list_categories() -> dict[str, Any]:
|
|
95
|
+
"""List all available service categories in the directory."""
|
|
96
|
+
async with httpx.AsyncClient(
|
|
97
|
+
timeout=DEFAULT_TIMEOUT, headers={"User-Agent": _user_agent()}
|
|
98
|
+
) as cx:
|
|
99
|
+
r = await cx.get(f"{_api_base()}/api/v1/categories")
|
|
100
|
+
r.raise_for_status()
|
|
101
|
+
return r.json()
|
|
102
|
+
|
|
103
|
+
@mcp.tool()
|
|
104
|
+
async def stats() -> dict[str, Any]:
|
|
105
|
+
"""High-level stats about the directory: total services, healthy count, sources."""
|
|
106
|
+
async with httpx.AsyncClient(
|
|
107
|
+
timeout=DEFAULT_TIMEOUT, headers={"User-Agent": _user_agent()}
|
|
108
|
+
) as cx:
|
|
109
|
+
r = await cx.get(f"{_api_base()}/api/v1/stats")
|
|
110
|
+
r.raise_for_status()
|
|
111
|
+
return r.json()
|
|
112
|
+
|
|
113
|
+
log.info("agent-tools-mcp server built (api_base=%s)", _api_base())
|
|
114
|
+
return mcp
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.24"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "agent-tools-mcp"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Search and call x402 paid services from any MCP-compatible agent (Claude, Cursor, Cline)."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "Apache-2.0" }
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [{ name = "JoursBleu", email = "kangletian@hotmail.com" }]
|
|
13
|
+
keywords = ["mcp", "model-context-protocol", "x402", "agent-tools", "agent", "crypto", "web3", "directory"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 4 - Beta",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"License :: OSI Approved :: Apache Software License",
|
|
18
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
19
|
+
"Programming Language :: Python :: 3.10",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Topic :: Software Development :: Libraries",
|
|
23
|
+
]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"mcp>=1.2.0",
|
|
26
|
+
"httpx>=0.27",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://agent-tools.cloud"
|
|
31
|
+
Repository = "https://github.com/JoursBleu/agent-tools-mcp"
|
|
32
|
+
Issues = "https://github.com/JoursBleu/agent-tools-mcp/issues"
|
|
33
|
+
Registry = "https://registry.modelcontextprotocol.io/"
|
|
34
|
+
|
|
35
|
+
[project.scripts]
|
|
36
|
+
agent-tools-mcp = "agent_tools_mcp.__main__:main"
|
|
37
|
+
|
|
38
|
+
[tool.hatch.build.targets.wheel]
|
|
39
|
+
packages = ["agent_tools_mcp"]
|