craftedtrust-mcp-config 1.0.0

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.
package/README.md ADDED
@@ -0,0 +1,69 @@
1
+ # @craftedtrust/mcp-config
2
+
3
+ Add CraftedTrust trust verification to your AI agent. One line of config and your agent checks every MCP server before connecting.
4
+
5
+ ## Quick Start
6
+
7
+ Add to your agent's MCP config (Claude Desktop, Cursor, Windsurf, or any MCP client):
8
+
9
+ ```json
10
+ {
11
+ "mcpServers": {
12
+ "craftedtrust": {
13
+ "url": "https://mcp.craftedtrust.com/api/v1/mcp",
14
+ "description": "Check trust scores before connecting to MCP servers"
15
+ }
16
+ }
17
+ }
18
+ ```
19
+
20
+ ## Programmatic Usage
21
+
22
+ ```javascript
23
+ import { mcpConfig, isSafe, CRAFTEDTRUST_URL } from '@craftedtrust/mcp-config';
24
+
25
+ // Get the MCP config object
26
+ console.log(mcpConfig);
27
+
28
+ // Check if a grade is safe (default minimum: C)
29
+ isSafe('B'); // true
30
+ isSafe('F'); // false
31
+ isSafe('D', 'D'); // true (custom threshold)
32
+ ```
33
+
34
+ ## Available Tools
35
+
36
+ | Tool | Price | Description |
37
+ |---|---|---|
38
+ | `check_trust` | $0.005 | Look up trust score by URL or npm name |
39
+ | `scan_server` | $0.25 | Trigger a live security scan |
40
+ | `search_registry` | Free | Search 4,200+ indexed MCP servers |
41
+ | `get_stats` | Free | Ecosystem statistics |
42
+ | `pay_for_certification` | Free | Initiate USDC certification payment |
43
+ | `verify_payment` | Free | Verify on-chain USDC payment |
44
+
45
+ Prices are via x402 (USDC on Base). Free with API key.
46
+
47
+ ## Trust-Gated Connection Pattern
48
+
49
+ ```python
50
+ result = call_tool("craftedtrust", "check_trust", {"server_url": "https://mcp.example.com"})
51
+
52
+ if result["grade"] in ("D", "F"):
53
+ return f"Refused: scored {result['grade']} ({result['score']}/100)"
54
+
55
+ connect_to_server("https://mcp.example.com")
56
+ ```
57
+
58
+ Full examples: [trust-gated-agent-example](https://github.com/cybercraftsolutionsllc/trust-gated-agent-example)
59
+
60
+ ## Links
61
+
62
+ - [API Docs](https://mcp.craftedtrust.com/api-docs.html)
63
+ - [Interactive API Reference](https://mcp.craftedtrust.com/api-docs-interactive.html)
64
+ - [OpenAPI Spec](https://mcp.craftedtrust.com/api/v1/openapi.yaml)
65
+ - [Security Standards](https://mcp.craftedtrust.com/standards.html)
66
+
67
+ ## License
68
+
69
+ MIT - Cyber Craft Solutions LLC
package/config.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "craftedtrust": {
4
+ "url": "https://mcp.craftedtrust.com/api/v1/mcp",
5
+ "description": "Check trust scores before connecting to MCP servers"
6
+ }
7
+ }
8
+ }
package/index.js ADDED
@@ -0,0 +1,42 @@
1
+ /**
2
+ * CraftedTrust MCP server configuration.
3
+ *
4
+ * Add to your agent's MCP config to enable trust-gated connections.
5
+ *
6
+ * Usage:
7
+ * import { mcpConfig, CRAFTEDTRUST_URL, TOOLS } from '@craftedtrust/mcp-config';
8
+ */
9
+
10
+ export const CRAFTEDTRUST_URL = 'https://mcp.craftedtrust.com/api/v1/mcp';
11
+
12
+ export const mcpConfig = {
13
+ mcpServers: {
14
+ craftedtrust: {
15
+ url: CRAFTEDTRUST_URL,
16
+ description: 'Check trust scores before connecting to MCP servers',
17
+ },
18
+ },
19
+ };
20
+
21
+ export const TOOLS = {
22
+ check_trust: { price: '$0.005', free_with_key: true, description: 'Look up trust score by URL or npm name' },
23
+ scan_server: { price: '$0.25', free_with_key: true, description: 'Trigger a live security scan' },
24
+ search_registry: { price: 'free', description: 'Search 4,200+ indexed MCP servers' },
25
+ get_stats: { price: 'free', description: 'Ecosystem statistics' },
26
+ pay_for_certification: { price: 'free', description: 'Initiate USDC certification payment' },
27
+ verify_payment: { price: 'free', description: 'Verify on-chain USDC payment' },
28
+ };
29
+
30
+ export const GRADE_ORDER = { A: 5, B: 4, C: 3, D: 2, F: 1 };
31
+
32
+ /**
33
+ * Check if a grade meets a minimum threshold.
34
+ * @param {string} grade - Server grade (A-F)
35
+ * @param {string} minGrade - Minimum acceptable grade (default: C)
36
+ * @returns {boolean}
37
+ */
38
+ export function isSafe(grade, minGrade = 'C') {
39
+ return (GRADE_ORDER[grade] ?? 0) >= (GRADE_ORDER[minGrade] ?? 0);
40
+ }
41
+
42
+ export default mcpConfig;
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "craftedtrust-mcp-config",
3
+ "version": "1.0.0",
4
+ "description": "Add CraftedTrust trust verification to your MCP agent config. Check trust scores before connecting to any MCP server.",
5
+ "main": "index.js",
6
+ "type": "module",
7
+ "keywords": [
8
+ "mcp",
9
+ "mcp-server",
10
+ "ai-security",
11
+ "trust-scoring",
12
+ "ai-agents",
13
+ "craftedtrust",
14
+ "cosai",
15
+ "owasp",
16
+ "x402",
17
+ "usdc"
18
+ ],
19
+ "author": "Cyber Craft Solutions LLC <cyber.craft@craftedcybersolutions.com>",
20
+ "license": "MIT",
21
+ "homepage": "https://mcp.craftedtrust.com/api-docs.html",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "https://github.com/cybercraftsolutionsllc/trust-gated-agent-example"
25
+ },
26
+ "files": [
27
+ "index.js",
28
+ "config.json",
29
+ "README.md"
30
+ ]
31
+ }