lock-smith-mcp 0.1.1__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.
@@ -0,0 +1,6 @@
1
+ .git
2
+ .github
3
+ .pytest_cache
4
+ __pycache__
5
+ dist
6
+ *.egg-info
@@ -0,0 +1,25 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ publish:
8
+ runs-on: ubuntu-latest
9
+ environment: lock-smith
10
+ permissions:
11
+ id-token: write
12
+ contents: read
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.12"
18
+ - name: Build lock-smith-mcp
19
+ run: |
20
+ python -m pip install --upgrade build
21
+ python -m build
22
+ - name: Publish lock-smith-mcp
23
+ uses: pypa/gh-action-pypi-publish@release/v1
24
+ with:
25
+ packages-dir: dist
@@ -0,0 +1,8 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .pytest_cache/
4
+ .venv/
5
+ dist/
6
+ *.egg-info/
7
+ .env
8
+ *.key
@@ -0,0 +1,9 @@
1
+ FROM python:3.12-slim
2
+
3
+ WORKDIR /app
4
+
5
+ COPY pyproject.toml README.md ./
6
+ COPY src ./src
7
+ RUN pip install --no-cache-dir .
8
+
9
+ CMD ["lock-smith-mcp"]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jobfile Studio
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.
@@ -0,0 +1,123 @@
1
+ Metadata-Version: 2.5
2
+ Name: lock-smith-mcp
3
+ Version: 0.1.1
4
+ Summary: MCP server for LockSmith — pay-per-call x402 endpoint security audits over x402 ($0.50 USDC on Base)
5
+ Author: Jobfile Studio
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Keywords: agents,audit,base,mcp,security,usdc,x402
9
+ Requires-Python: >=3.10
10
+ Requires-Dist: eth-account>=0.11
11
+ Requires-Dist: httpx>=0.27
12
+ Requires-Dist: mcp<2,>=1.2
13
+ Provides-Extra: dev
14
+ Requires-Dist: pytest>=8; extra == 'dev'
15
+ Description-Content-Type: text/markdown
16
+
17
+ <!-- mcp-name: io.github.QuincyGB/lock-smith-mcp -->
18
+
19
+ # lock-smith-mcp
20
+
21
+ > **Standalone home:** [QuincyGB/lock-smith-mcp](https://github.com/QuincyGB/lock-smith-mcp)
22
+ > — sibling of the fleet's token-verdict-mcp, route-verdict-mcp and
23
+ > list-smith-mcp wrappers.
24
+
25
+ MCP server for **[LockSmith](https://lock-smith-production.up.railway.app)**
26
+ — an automated security audit for x402 endpoints, sold pay-per-call over
27
+ [x402](https://www.x402.org): **$0.50 USDC on Base**, no account, no API
28
+ key. Give it the URL of a paid x402 route and it reports whether that
29
+ endpoint would pass an informed buyer's security screen — paywall
30
+ presence, challenge sanity, garbage/forged payment rejection, exposure
31
+ surface (.env/.git/debug paths), error hygiene, body caps, discovery
32
+ consistency — as a SECURE / FINDINGS / EXPOSED verdict with per-check
33
+ evidence.
34
+
35
+ **Scope, stated plainly:** these are automated security checks run with
36
+ unpaid probes only — not a penetration test, and a SECURE verdict is not
37
+ a guarantee. It is a fast, cheap, repeatable screen.
38
+
39
+ This package gives any MCP host (Claude Desktop, Cursor, …) a native
40
+ `lock_audit` tool that handles the full x402 v2 payment flow itself —
41
+ 402 challenge → EIP-3009 `TransferWithAuthorization` signature (USDC on
42
+ Base, EIP-712) → paid retry — using **your** agent wallet.
43
+
44
+ ## Tools
45
+
46
+ | Tool | What it does | Price |
47
+ | --- | --- | --- |
48
+ | `lock_audit` | POST `/v1/audit` — 8-check non-destructive security audit of one x402 endpoint URL; returns the verdict, summary counts and per-check detail | $0.50 USDC (Base) |
49
+
50
+ ## Install
51
+
52
+ ```bash
53
+ pip install lock-smith-mcp
54
+ # or run without installing:
55
+ uvx lock-smith-mcp
56
+ ```
57
+
58
+ ## Configuration
59
+
60
+ All configuration is environment variables — set them on the MCP server
61
+ process in your host's config. Your key never leaves your machine; the
62
+ service only ever sees a signed payment authorization.
63
+
64
+ | Variable | Required | Meaning |
65
+ | --- | --- | --- |
66
+ | `AGENT_PRIVATE_KEY` | for paid calls | EVM private key (`0x…`) of **your** wallet holding USDC on Base. Used locally to sign the x402 payment. |
67
+ | `AGENT_KEY_FILE` | alternative | Path to a file containing that key instead. |
68
+ | `LOCK_SMITH_URL` | no | Service base URL override (default: production). |
69
+ | `LOCK_SMITH_MAX_AMOUNT_UNITS` | no | Spend guard per call, USDC micro-units (default `500000` = $0.50, the known price). The client refuses to sign any challenge priced above this. |
70
+
71
+ **Without a signer the tool never pays.** It returns the parsed 402
72
+ challenge as a structured error — `{"error": "payment_required",
73
+ "accepts": […], …}` — so the calling agent can see the exact price,
74
+ asset, network and `payTo` and decide what to do. With a signer, charges
75
+ above the spend guard are likewise refused before signing.
76
+
77
+ ## MCP host config
78
+
79
+ ```json
80
+ {
81
+ "mcpServers": {
82
+ "lock-smith": {
83
+ "command": "uvx",
84
+ "args": ["lock-smith-mcp"],
85
+ "env": {
86
+ "AGENT_PRIVATE_KEY": "0xYOUR_AGENT_WALLET_KEY"
87
+ }
88
+ }
89
+ }
90
+ }
91
+ ```
92
+
93
+ ## The endpoint being wrapped
94
+
95
+ ```
96
+ POST https://lock-smith-production.up.railway.app/v1/audit
97
+ {"endpoint_url": "https://token-verdict-production.up.railway.app/v1/verdict"}
98
+ → 200 {"ok": true, "service": "lock-smith", "audit_version": "1.0.0",
99
+ "target": {...}, "verdict": "SECURE",
100
+ "summary": {"passed": 8, "findings": 0, ...},
101
+ "checks": [{"id": "paywall_present", "status": "pass", ...}, ...],
102
+ "scope_note": "Automated security checks, not a penetration test. ..."}
103
+ ```
104
+
105
+ The schemas in `src/lock_smith_mcp/schemas.py` are copied verbatim from
106
+ the service's own discovery document (`/.well-known/x402`) — the
107
+ published contract, not a paraphrase.
108
+
109
+ ## Development
110
+
111
+ ```bash
112
+ pip install -e ".[dev]"
113
+ pytest
114
+ ```
115
+
116
+ Tests mock the HTTP layer and use a throwaway signer generated at test
117
+ time — no network, no real money, no key material in the repo. The 402
118
+ fixture in `tests/fixtures/` is real: captured from an unpaid probe of
119
+ production on 2026-10-27.
120
+
121
+ ## License
122
+
123
+ MIT
@@ -0,0 +1,107 @@
1
+ <!-- mcp-name: io.github.QuincyGB/lock-smith-mcp -->
2
+
3
+ # lock-smith-mcp
4
+
5
+ > **Standalone home:** [QuincyGB/lock-smith-mcp](https://github.com/QuincyGB/lock-smith-mcp)
6
+ > — sibling of the fleet's token-verdict-mcp, route-verdict-mcp and
7
+ > list-smith-mcp wrappers.
8
+
9
+ MCP server for **[LockSmith](https://lock-smith-production.up.railway.app)**
10
+ — an automated security audit for x402 endpoints, sold pay-per-call over
11
+ [x402](https://www.x402.org): **$0.50 USDC on Base**, no account, no API
12
+ key. Give it the URL of a paid x402 route and it reports whether that
13
+ endpoint would pass an informed buyer's security screen — paywall
14
+ presence, challenge sanity, garbage/forged payment rejection, exposure
15
+ surface (.env/.git/debug paths), error hygiene, body caps, discovery
16
+ consistency — as a SECURE / FINDINGS / EXPOSED verdict with per-check
17
+ evidence.
18
+
19
+ **Scope, stated plainly:** these are automated security checks run with
20
+ unpaid probes only — not a penetration test, and a SECURE verdict is not
21
+ a guarantee. It is a fast, cheap, repeatable screen.
22
+
23
+ This package gives any MCP host (Claude Desktop, Cursor, …) a native
24
+ `lock_audit` tool that handles the full x402 v2 payment flow itself —
25
+ 402 challenge → EIP-3009 `TransferWithAuthorization` signature (USDC on
26
+ Base, EIP-712) → paid retry — using **your** agent wallet.
27
+
28
+ ## Tools
29
+
30
+ | Tool | What it does | Price |
31
+ | --- | --- | --- |
32
+ | `lock_audit` | POST `/v1/audit` — 8-check non-destructive security audit of one x402 endpoint URL; returns the verdict, summary counts and per-check detail | $0.50 USDC (Base) |
33
+
34
+ ## Install
35
+
36
+ ```bash
37
+ pip install lock-smith-mcp
38
+ # or run without installing:
39
+ uvx lock-smith-mcp
40
+ ```
41
+
42
+ ## Configuration
43
+
44
+ All configuration is environment variables — set them on the MCP server
45
+ process in your host's config. Your key never leaves your machine; the
46
+ service only ever sees a signed payment authorization.
47
+
48
+ | Variable | Required | Meaning |
49
+ | --- | --- | --- |
50
+ | `AGENT_PRIVATE_KEY` | for paid calls | EVM private key (`0x…`) of **your** wallet holding USDC on Base. Used locally to sign the x402 payment. |
51
+ | `AGENT_KEY_FILE` | alternative | Path to a file containing that key instead. |
52
+ | `LOCK_SMITH_URL` | no | Service base URL override (default: production). |
53
+ | `LOCK_SMITH_MAX_AMOUNT_UNITS` | no | Spend guard per call, USDC micro-units (default `500000` = $0.50, the known price). The client refuses to sign any challenge priced above this. |
54
+
55
+ **Without a signer the tool never pays.** It returns the parsed 402
56
+ challenge as a structured error — `{"error": "payment_required",
57
+ "accepts": […], …}` — so the calling agent can see the exact price,
58
+ asset, network and `payTo` and decide what to do. With a signer, charges
59
+ above the spend guard are likewise refused before signing.
60
+
61
+ ## MCP host config
62
+
63
+ ```json
64
+ {
65
+ "mcpServers": {
66
+ "lock-smith": {
67
+ "command": "uvx",
68
+ "args": ["lock-smith-mcp"],
69
+ "env": {
70
+ "AGENT_PRIVATE_KEY": "0xYOUR_AGENT_WALLET_KEY"
71
+ }
72
+ }
73
+ }
74
+ }
75
+ ```
76
+
77
+ ## The endpoint being wrapped
78
+
79
+ ```
80
+ POST https://lock-smith-production.up.railway.app/v1/audit
81
+ {"endpoint_url": "https://token-verdict-production.up.railway.app/v1/verdict"}
82
+ → 200 {"ok": true, "service": "lock-smith", "audit_version": "1.0.0",
83
+ "target": {...}, "verdict": "SECURE",
84
+ "summary": {"passed": 8, "findings": 0, ...},
85
+ "checks": [{"id": "paywall_present", "status": "pass", ...}, ...],
86
+ "scope_note": "Automated security checks, not a penetration test. ..."}
87
+ ```
88
+
89
+ The schemas in `src/lock_smith_mcp/schemas.py` are copied verbatim from
90
+ the service's own discovery document (`/.well-known/x402`) — the
91
+ published contract, not a paraphrase.
92
+
93
+ ## Development
94
+
95
+ ```bash
96
+ pip install -e ".[dev]"
97
+ pytest
98
+ ```
99
+
100
+ Tests mock the HTTP layer and use a throwaway signer generated at test
101
+ time — no network, no real money, no key material in the repo. The 402
102
+ fixture in `tests/fixtures/` is real: captured from an unpaid probe of
103
+ production on 2026-10-27.
104
+
105
+ ## License
106
+
107
+ MIT
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://glama.ai/mcp/schemas/server.json",
3
+ "maintainers": [
4
+ "QuincyGB"
5
+ ]
6
+ }
@@ -0,0 +1,33 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "lock-smith-mcp"
7
+ version = "0.1.1"
8
+ description = "MCP server for LockSmith — pay-per-call x402 endpoint security audits over x402 ($0.50 USDC on Base)"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "MIT"
12
+ authors = [{ name = "Jobfile Studio" }]
13
+ keywords = ["mcp", "x402", "base", "usdc", "security", "audit", "agents"]
14
+ dependencies = [
15
+ # mcp 2.x renamed FastMCP -> MCPServer; this package targets the v1
16
+ # SDK API that current MCP hosts and docs are built against.
17
+ "mcp>=1.2,<2",
18
+ "httpx>=0.27",
19
+ "eth-account>=0.11",
20
+ ]
21
+
22
+ [project.optional-dependencies]
23
+ dev = ["pytest>=8"]
24
+
25
+ [project.scripts]
26
+ lock-smith-mcp = "lock_smith_mcp.server:main"
27
+
28
+ [tool.hatch.build.targets.wheel]
29
+ packages = ["src/lock_smith_mcp"]
30
+
31
+ [tool.pytest.ini_options]
32
+ pythonpath = ["src"]
33
+ testpaths = ["tests"]
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "description": "MCP server for LockSmith \u2014 x402 endpoint security audits ($0.50 USDC on Base)",
4
+ "name": "io.github.QuincyGB/lock-smith-mcp",
5
+ "packages": [
6
+ {
7
+ "environmentVariables": [
8
+ {
9
+ "description": "EVM private key (0x...) of a wallet holding USDC on Base. Used locally to sign the x402 EIP-3009 authorization. For paid calls.",
10
+ "format": "string",
11
+ "isRequired": false,
12
+ "isSecret": true,
13
+ "name": "AGENT_PRIVATE_KEY"
14
+ },
15
+ {
16
+ "description": "Path to a file containing that key (alternative to AGENT_PRIVATE_KEY).",
17
+ "format": "filepath",
18
+ "isRequired": false,
19
+ "isSecret": false,
20
+ "name": "AGENT_KEY_FILE"
21
+ },
22
+ {
23
+ "description": "Service base URL override (default: production).",
24
+ "format": "string",
25
+ "isRequired": false,
26
+ "isSecret": false,
27
+ "name": "LOCK_SMITH_URL"
28
+ },
29
+ {
30
+ "default": "500000",
31
+ "description": "Spend guard per call in USDC micro-units (default 500000 = $0.50, the known price). The client refuses to sign anything priced above it.",
32
+ "format": "number",
33
+ "isRequired": false,
34
+ "isSecret": false,
35
+ "name": "LOCK_SMITH_MAX_AMOUNT_UNITS"
36
+ }
37
+ ],
38
+ "identifier": "lock-smith-mcp",
39
+ "registryType": "pypi",
40
+ "transport": {
41
+ "type": "stdio"
42
+ },
43
+ "version": "0.1.1"
44
+ }
45
+ ],
46
+ "repository": {
47
+ "source": "github",
48
+ "url": "https://github.com/QuincyGB/lock-smith-mcp"
49
+ },
50
+ "title": "LockSmith",
51
+ "version": "0.1.1"
52
+ }
@@ -0,0 +1,7 @@
1
+ """LockSmith MCP server + x402 client.
2
+
3
+ Wraps https://lock-smith-production.up.railway.app (POST /v1/audit,
4
+ $0.50 USDC on Base, x402 v2) so MCP hosts can call it as a native tool.
5
+ """
6
+
7
+ __version__ = "0.1.0"
@@ -0,0 +1,4 @@
1
+ from .server import main
2
+
3
+ if __name__ == "__main__":
4
+ main()