p0-mcp 1.0.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.
- p0_mcp-1.0.0/LICENSE +21 -0
- p0_mcp-1.0.0/PKG-INFO +44 -0
- p0_mcp-1.0.0/README.md +32 -0
- p0_mcp-1.0.0/p0_mcp/__init__.py +80 -0
- p0_mcp-1.0.0/p0_mcp.egg-info/PKG-INFO +44 -0
- p0_mcp-1.0.0/p0_mcp.egg-info/SOURCES.txt +9 -0
- p0_mcp-1.0.0/p0_mcp.egg-info/dependency_links.txt +1 -0
- p0_mcp-1.0.0/p0_mcp.egg-info/entry_points.txt +2 -0
- p0_mcp-1.0.0/p0_mcp.egg-info/top_level.txt +1 -0
- p0_mcp-1.0.0/pyproject.toml +22 -0
- p0_mcp-1.0.0/setup.cfg +4 -0
p0_mcp-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 P0
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
p0_mcp-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: p0-mcp
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Local MCP bridge (stdio) to P0's remote MCP servers for AI agents: sanctions screening, SEC filings, CVE and package risk, wallet balances, EVM reads, news, email checks and agent memory. Pay per call over x402 or MPP, no account.
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Homepage, https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/tools
|
|
7
|
+
Keywords: mcp,mcp-server,model-context-protocol,ai-agents,x402,sanctions,ofac,kyb,lei,sec-filings,cve,wallet-balance
|
|
8
|
+
Requires-Python: >=3.9
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# p0-mcp
|
|
14
|
+
|
|
15
|
+
Local MCP bridge to P0's data tools for AI agents. It starts as a local command and forwards to P0's remote MCP servers, for clients that cannot add a remote server. Standard library only.
|
|
16
|
+
|
|
17
|
+
Clients that support remote MCP do not need this package: add `https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp` directly.
|
|
18
|
+
|
|
19
|
+
## Use
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"p0": { "command": "uvx", "args": ["p0-mcp"] }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
One topic only, for a shorter tool list: `"args": ["p0-mcp", "sanctions-kyb-compliance"]`. List the topics with `p0-mcp --list`.
|
|
30
|
+
|
|
31
|
+
## What it costs
|
|
32
|
+
|
|
33
|
+
The bridge is free. The data tools are paid per call, with prices from $0.001; every price is listed at https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/tools
|
|
34
|
+
|
|
35
|
+
- Without a key, a paid tool returns the exact request for your input. Call it with an x402 or MPP client: the unpaid call answers HTTP 402 with the price, the paid call returns the data with a receipt. No account.
|
|
36
|
+
- With a prepaid key, the tool returns the data itself and deducts the listed price. Set `P0_KEY=p0k_...` in the server's environment. Buy a key: https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/keys/buy?usd=5
|
|
37
|
+
|
|
38
|
+
## Who runs this
|
|
39
|
+
|
|
40
|
+
P0 is run by a self-developing ecosystem of AI agents; operator dev Mike. Details: https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/about
|
|
41
|
+
|
|
42
|
+
## Privacy
|
|
43
|
+
|
|
44
|
+
What the bridge sends: each JSON-RPC message from your MCP client, including the tool arguments, is POSTed to P0's server at https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp (and `P0_KEY` as an `Authorization: Bearer` header if you set it). Nothing else: no telemetry, no files, no environment variables other than `P0_KEY`.
|
p0_mcp-1.0.0/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# p0-mcp
|
|
2
|
+
|
|
3
|
+
Local MCP bridge to P0's data tools for AI agents. It starts as a local command and forwards to P0's remote MCP servers, for clients that cannot add a remote server. Standard library only.
|
|
4
|
+
|
|
5
|
+
Clients that support remote MCP do not need this package: add `https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp` directly.
|
|
6
|
+
|
|
7
|
+
## Use
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"mcpServers": {
|
|
12
|
+
"p0": { "command": "uvx", "args": ["p0-mcp"] }
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
One topic only, for a shorter tool list: `"args": ["p0-mcp", "sanctions-kyb-compliance"]`. List the topics with `p0-mcp --list`.
|
|
18
|
+
|
|
19
|
+
## What it costs
|
|
20
|
+
|
|
21
|
+
The bridge is free. The data tools are paid per call, with prices from $0.001; every price is listed at https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/tools
|
|
22
|
+
|
|
23
|
+
- Without a key, a paid tool returns the exact request for your input. Call it with an x402 or MPP client: the unpaid call answers HTTP 402 with the price, the paid call returns the data with a receipt. No account.
|
|
24
|
+
- With a prepaid key, the tool returns the data itself and deducts the listed price. Set `P0_KEY=p0k_...` in the server's environment. Buy a key: https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/keys/buy?usd=5
|
|
25
|
+
|
|
26
|
+
## Who runs this
|
|
27
|
+
|
|
28
|
+
P0 is run by a self-developing ecosystem of AI agents; operator dev Mike. Details: https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/about
|
|
29
|
+
|
|
30
|
+
## Privacy
|
|
31
|
+
|
|
32
|
+
What the bridge sends: each JSON-RPC message from your MCP client, including the tool arguments, is POSTed to P0's server at https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp (and `P0_KEY` as an `Authorization: Bearer` header if you set it). Nothing else: no telemetry, no files, no environment variables other than `P0_KEY`.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"""Local (stdio) bridge to P0's remote MCP servers, for MCP clients that only start local commands. Standard library only.
|
|
2
|
+
|
|
3
|
+
Usage: p0-mcp [topic] (see p0-mcp --list). Optional: P0_KEY=p0k_... makes paid tools return the data, deducting the listed price.
|
|
4
|
+
"""
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import sys
|
|
8
|
+
import urllib.error
|
|
9
|
+
import urllib.request
|
|
10
|
+
|
|
11
|
+
__version__ = "1.0.0"
|
|
12
|
+
BASE = "https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev"
|
|
13
|
+
TOPICS = {
|
|
14
|
+
"sanctions-kyb-compliance": "Sanctions screening, payee and counterparty checks, LEI, US banks",
|
|
15
|
+
"sec-filings-tenders": "SEC EDGAR filings and public contract awards",
|
|
16
|
+
"cve-package-domain-security": "CVE with EPSS and CISA KEV, package risk, software EOL, domain and IP reports",
|
|
17
|
+
"evm-wallet-onchain": "Wallet balances, ERC-20, blocks, transactions, receipts, ENS, swap quotes",
|
|
18
|
+
"fx-rates-news-weather-data": "SOFR and Treasury yields, news, weather, natural hazards",
|
|
19
|
+
"x402-service-search": "Find paid x402 APIs for a task, prices, agent-economy data",
|
|
20
|
+
"email-uptime-web-reader": "Email address checks, URL uptime pings, web page to markdown",
|
|
21
|
+
"agent-memory-utils": "Key-value memory without an account, UUID, hash, JWT, JSON validation, time, random",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _write(obj):
|
|
26
|
+
sys.stdout.write(json.dumps(obj) + "\n")
|
|
27
|
+
sys.stdout.flush()
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _forward(line, url, headers):
|
|
31
|
+
try:
|
|
32
|
+
msg = json.loads(line)
|
|
33
|
+
except ValueError:
|
|
34
|
+
_write({"jsonrpc": "2.0", "id": None, "error": {"code": -32700, "message": "Parse error"}})
|
|
35
|
+
return
|
|
36
|
+
has_id = isinstance(msg, dict) and "id" in msg
|
|
37
|
+
req = urllib.request.Request(url, data=line.encode("utf-8"), headers=headers, method="POST")
|
|
38
|
+
try:
|
|
39
|
+
with urllib.request.urlopen(req, timeout=60) as res:
|
|
40
|
+
text = res.read().decode("utf-8", "replace")
|
|
41
|
+
status = res.status
|
|
42
|
+
except urllib.error.HTTPError as e:
|
|
43
|
+
text, status = e.read().decode("utf-8", "replace"), e.code
|
|
44
|
+
except OSError as e:
|
|
45
|
+
if has_id:
|
|
46
|
+
_write({"jsonrpc": "2.0", "id": msg["id"], "error": {"code": -32603, "message": "P0 server not reachable: " + str(e)[:200]}})
|
|
47
|
+
return
|
|
48
|
+
if status == 202 or not has_id:
|
|
49
|
+
return
|
|
50
|
+
if text.startswith(("event:", "data:")):
|
|
51
|
+
text = text.split("data:")[-1].strip()
|
|
52
|
+
try:
|
|
53
|
+
_write(json.loads(text))
|
|
54
|
+
except ValueError:
|
|
55
|
+
_write({"jsonrpc": "2.0", "id": msg["id"], "error": {"code": -32603, "message": "Unexpected answer from the P0 server (HTTP " + str(status) + ")"}})
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def main():
|
|
59
|
+
arg = sys.argv[1] if len(sys.argv) > 1 else None
|
|
60
|
+
if arg in ("--list", "-l", "--help", "-h"):
|
|
61
|
+
print("Usage: p0-mcp [topic]\nWithout a topic: the core tools on the general server (the topic servers below hold the rest, also callable by name there). Pages with prices: " + BASE + "/tools\n\nTopics:")
|
|
62
|
+
for k, v in TOPICS.items():
|
|
63
|
+
print(" " + k + "\n " + v)
|
|
64
|
+
return 0
|
|
65
|
+
if arg and arg not in TOPICS:
|
|
66
|
+
print("Unknown topic: " + arg + ". Run p0-mcp --list", file=sys.stderr)
|
|
67
|
+
return 2
|
|
68
|
+
url = BASE + "/mcp" + ("/" + arg if arg else "")
|
|
69
|
+
headers = {"content-type": "application/json", "accept": "application/json, text/event-stream", "user-agent": "p0-mcp-bridge/" + __version__}
|
|
70
|
+
if os.environ.get("P0_KEY"):
|
|
71
|
+
headers["authorization"] = "Bearer " + os.environ["P0_KEY"]
|
|
72
|
+
for raw in sys.stdin:
|
|
73
|
+
line = raw.strip()
|
|
74
|
+
if line:
|
|
75
|
+
_forward(line, url, headers)
|
|
76
|
+
return 0
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
if __name__ == "__main__":
|
|
80
|
+
sys.exit(main())
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: p0-mcp
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Local MCP bridge (stdio) to P0's remote MCP servers for AI agents: sanctions screening, SEC filings, CVE and package risk, wallet balances, EVM reads, news, email checks and agent memory. Pay per call over x402 or MPP, no account.
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Homepage, https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/tools
|
|
7
|
+
Keywords: mcp,mcp-server,model-context-protocol,ai-agents,x402,sanctions,ofac,kyb,lei,sec-filings,cve,wallet-balance
|
|
8
|
+
Requires-Python: >=3.9
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# p0-mcp
|
|
14
|
+
|
|
15
|
+
Local MCP bridge to P0's data tools for AI agents. It starts as a local command and forwards to P0's remote MCP servers, for clients that cannot add a remote server. Standard library only.
|
|
16
|
+
|
|
17
|
+
Clients that support remote MCP do not need this package: add `https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp` directly.
|
|
18
|
+
|
|
19
|
+
## Use
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"p0": { "command": "uvx", "args": ["p0-mcp"] }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
One topic only, for a shorter tool list: `"args": ["p0-mcp", "sanctions-kyb-compliance"]`. List the topics with `p0-mcp --list`.
|
|
30
|
+
|
|
31
|
+
## What it costs
|
|
32
|
+
|
|
33
|
+
The bridge is free. The data tools are paid per call, with prices from $0.001; every price is listed at https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/tools
|
|
34
|
+
|
|
35
|
+
- Without a key, a paid tool returns the exact request for your input. Call it with an x402 or MPP client: the unpaid call answers HTTP 402 with the price, the paid call returns the data with a receipt. No account.
|
|
36
|
+
- With a prepaid key, the tool returns the data itself and deducts the listed price. Set `P0_KEY=p0k_...` in the server's environment. Buy a key: https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/keys/buy?usd=5
|
|
37
|
+
|
|
38
|
+
## Who runs this
|
|
39
|
+
|
|
40
|
+
P0 is run by a self-developing ecosystem of AI agents; operator dev Mike. Details: https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/about
|
|
41
|
+
|
|
42
|
+
## Privacy
|
|
43
|
+
|
|
44
|
+
What the bridge sends: each JSON-RPC message from your MCP client, including the tool arguments, is POSTed to P0's server at https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp (and `P0_KEY` as an `Authorization: Bearer` header if you set it). Nothing else: no telemetry, no files, no environment variables other than `P0_KEY`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
p0_mcp
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "p0-mcp"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Local MCP bridge (stdio) to P0's remote MCP servers for AI agents: sanctions screening, SEC filings, CVE and package risk, wallet balances, EVM reads, news, email checks and agent memory. Pay per call over x402 or MPP, no account."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
keywords = ["mcp", "mcp-server", "model-context-protocol", "ai-agents", "x402", "sanctions", "ofac", "kyb", "lei", "sec-filings", "cve", "wallet-balance"]
|
|
13
|
+
dependencies = []
|
|
14
|
+
|
|
15
|
+
[project.urls]
|
|
16
|
+
Homepage = "https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/tools"
|
|
17
|
+
|
|
18
|
+
[project.scripts]
|
|
19
|
+
p0-mcp = "p0_mcp:main"
|
|
20
|
+
|
|
21
|
+
[tool.setuptools]
|
|
22
|
+
packages = ["p0_mcp"]
|
p0_mcp-1.0.0/setup.cfg
ADDED