@sekrd/mcp-server 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sekrd
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.
package/README.md CHANGED
@@ -1,3 +1,132 @@
1
- # Temporary Holding Version
1
+ # @sekrd/mcp-server
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ MCP server for [Sekrd](https://sekrd.com) — deep security audit for AI-built apps. Run security scans directly from Cursor, Claude Code, and other AI IDEs.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npx -y @sekrd/mcp-server
9
+ ```
10
+
11
+ The server reads one environment variable, `SEKRD_API_KEY`. It is optional: leave it unset for the free monthly allowance, or set it for paid plans (unlimited scans). The process starts either way.
12
+
13
+ ```bash
14
+ SEKRD_API_KEY=your_key npx -y @sekrd/mcp-server
15
+ ```
16
+
17
+ ## Setup
18
+
19
+ ### Cursor
20
+
21
+ Add to `.cursor/mcp.json`:
22
+
23
+ ```json
24
+ {
25
+ "mcpServers": {
26
+ "sekrd": {
27
+ "command": "npx",
28
+ "args": ["-y", "@sekrd/mcp-server"],
29
+ "env": {
30
+ "SEKRD_API_KEY": "your_key_here"
31
+ }
32
+ }
33
+ }
34
+ }
35
+ ```
36
+
37
+ Omit the `env` block to use the free monthly allowance.
38
+
39
+ ### Claude Code
40
+
41
+ ```bash
42
+ claude mcp add sekrd -e SEKRD_API_KEY=your_key -- npx -y @sekrd/mcp-server
43
+ ```
44
+
45
+ Without a key:
46
+
47
+ ```bash
48
+ claude mcp add sekrd -- npx -y @sekrd/mcp-server
49
+ ```
50
+
51
+ ### Claude Desktop
52
+
53
+ Add to `claude_desktop_config.json`:
54
+
55
+ ```json
56
+ {
57
+ "mcpServers": {
58
+ "sekrd": {
59
+ "command": "npx",
60
+ "args": ["-y", "@sekrd/mcp-server"],
61
+ "env": {
62
+ "SEKRD_API_KEY": "your_key_here"
63
+ }
64
+ }
65
+ }
66
+ }
67
+ ```
68
+
69
+ ## Install from source
70
+
71
+ Use this when you want to run a local checkout instead of the published package.
72
+
73
+ ```bash
74
+ git clone https://github.com/sekrdcom/sekrd-mcp-ts.git
75
+ cd sekrd-mcp-ts
76
+ npm install
77
+ npm run build
78
+ ```
79
+
80
+ `npm run build` compiles `src/index.ts` to `dist/index.js`. Point your MCP client at that file with Node, and pass `SEKRD_API_KEY` the same way as above. Replace `/absolute/path/to/sekrd-mcp-ts` with the directory you cloned.
81
+
82
+ ```bash
83
+ claude mcp add sekrd -e SEKRD_API_KEY=your_key -- node /absolute/path/to/sekrd-mcp-ts/dist/index.js
84
+ ```
85
+
86
+ ```json
87
+ {
88
+ "mcpServers": {
89
+ "sekrd": {
90
+ "command": "node",
91
+ "args": ["/absolute/path/to/sekrd-mcp-ts/dist/index.js"],
92
+ "env": {
93
+ "SEKRD_API_KEY": "your_key_here"
94
+ }
95
+ }
96
+ }
97
+ }
98
+ ```
99
+
100
+ ## API Key
101
+
102
+ - **Without key**: 10 free scans per month (IP rate limit)
103
+ - **With key**: Unlimited scans on Pre-Launch Audit ($39 one-time) or Continuous Pro ($24-$29/mo) plans
104
+
105
+ Get your key at [sekrd.com/dashboard/settings](https://sekrd.com/dashboard/settings).
106
+
107
+ ## Tools
108
+
109
+ | Tool | Description |
110
+ |------|-------------|
111
+ | `scan_url(url)` | Full security scan. Returns score, verdict (SHIP/BLOCK), findings + fix prompts. |
112
+ | `get_scan(scan_id)` | Get results of a previous scan. |
113
+ | `list_findings(scan_id)` | Get only findings with fix prompts for your IDE. |
114
+
115
+ ## Example
116
+
117
+ ```
118
+ You: Scan https://my-app.vercel.app for security issues
119
+
120
+ Sekrd: Score 34/100 — BLOCK
121
+ 3 critical, 5 high, 2 medium findings
122
+
123
+ 1. [CRITICAL] Stripe live secret key exposed in client bundle
124
+ Fix: Move 'sk_live_...' to .env file and use NEXT_PUBLIC_ prefix only for public keys
125
+
126
+ 2. [CRITICAL] Supabase RLS policy USING(true) on users table
127
+ Fix: Replace with USING(auth.uid() = user_id)
128
+ ```
129
+
130
+ ## License
131
+
132
+ MIT
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,120 @@
1
+ #!/usr/bin/env node
2
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
5
+ const API_BASE = "https://api.sekrd.com/api/v1";
6
+ const POLL_INTERVAL = 3000;
7
+ const MAX_POLLS = 40;
8
+ function headers() {
9
+ const h = { "Content-Type": "application/json" };
10
+ const key = process.env.SEKRD_API_KEY;
11
+ if (key)
12
+ h["Authorization"] = `Bearer ${key}`;
13
+ return h;
14
+ }
15
+ async function scanUrl(url) {
16
+ const res = await fetch(`${API_BASE}/scan/url`, {
17
+ method: "POST",
18
+ headers: headers(),
19
+ body: JSON.stringify({ url }),
20
+ });
21
+ if (!res.ok) {
22
+ const err = await res.json().catch(() => ({ error: `HTTP ${res.status}` }));
23
+ return { error: err.error || `HTTP ${res.status}` };
24
+ }
25
+ const data = await res.json();
26
+ const scanId = data.scan_id;
27
+ for (let i = 0; i < MAX_POLLS; i++) {
28
+ const poll = await fetch(`${API_BASE}/scans/${scanId}`, { headers: headers() });
29
+ if (!poll.ok)
30
+ return { error: `Poll failed: HTTP ${poll.status}` };
31
+ const scan = await poll.json();
32
+ if (["complete", "failed", "error"].includes(scan.status))
33
+ return scan;
34
+ await new Promise((r) => setTimeout(r, POLL_INTERVAL));
35
+ }
36
+ return { error: "Scan timed out", scan_id: scanId };
37
+ }
38
+ async function getScan(scanId) {
39
+ const res = await fetch(`${API_BASE}/scans/${scanId}`, { headers: headers() });
40
+ if (!res.ok)
41
+ return { error: `HTTP ${res.status}` };
42
+ return res.json();
43
+ }
44
+ async function listFindings(scanId) {
45
+ const res = await fetch(`${API_BASE}/scans/${scanId}`, { headers: headers() });
46
+ if (!res.ok)
47
+ return { error: `HTTP ${res.status}` };
48
+ const scan = await res.json();
49
+ const findings = (scan.findings || []).filter((f) => f.fix_prompts && Object.keys(f.fix_prompts).length > 0);
50
+ return findings;
51
+ }
52
+ const server = new Server({ name: "sekrd", version: "0.1.0" }, { capabilities: { tools: {} } });
53
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
54
+ tools: [
55
+ {
56
+ name: "scan_url",
57
+ description: "Run a full security scan on a URL. Returns score, verdict (SHIP/BLOCK), findings, and fix prompts. Takes 10-30 seconds.",
58
+ inputSchema: {
59
+ type: "object",
60
+ properties: {
61
+ url: { type: "string", description: "URL to scan (e.g. https://myapp.vercel.app)" },
62
+ },
63
+ required: ["url"],
64
+ },
65
+ },
66
+ {
67
+ name: "get_scan",
68
+ description: "Get results of a previous scan by its ID.",
69
+ inputSchema: {
70
+ type: "object",
71
+ properties: {
72
+ scan_id: { type: "string", description: "Scan ID returned by scan_url" },
73
+ },
74
+ required: ["scan_id"],
75
+ },
76
+ },
77
+ {
78
+ name: "list_findings",
79
+ description: "List findings with copy-paste fix prompts for Cursor, Lovable, and Claude Code.",
80
+ inputSchema: {
81
+ type: "object",
82
+ properties: {
83
+ scan_id: { type: "string", description: "Scan ID" },
84
+ },
85
+ required: ["scan_id"],
86
+ },
87
+ },
88
+ ],
89
+ }));
90
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
91
+ const { name, arguments: args } = request.params;
92
+ try {
93
+ let result;
94
+ switch (name) {
95
+ case "scan_url":
96
+ result = await scanUrl(args.url);
97
+ break;
98
+ case "get_scan":
99
+ result = await getScan(args.scan_id);
100
+ break;
101
+ case "list_findings":
102
+ result = await listFindings(args.scan_id);
103
+ break;
104
+ default:
105
+ return { content: [{ type: "text", text: `Unknown tool: ${name}` }], isError: true };
106
+ }
107
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
108
+ }
109
+ catch (err) {
110
+ return {
111
+ content: [{ type: "text", text: `Error: ${err instanceof Error ? err.message : String(err)}` }],
112
+ isError: true,
113
+ };
114
+ }
115
+ });
116
+ async function main() {
117
+ const transport = new StdioServerTransport();
118
+ await server.connect(transport);
119
+ }
120
+ main().catch(console.error);
package/package.json CHANGED
@@ -1,6 +1,50 @@
1
1
  {
2
2
  "name": "@sekrd/mcp-server",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "MCP server for Sekrd — security scanning from AI IDEs",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "sekrd-mcp": "./dist/index.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "README.md",
13
+ "LICENSE"
14
+ ],
15
+ "engines": {
16
+ "node": ">=18"
17
+ },
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "scripts": {
22
+ "build": "tsc && node --input-type=module -e \"import { chmodSync } from 'node:fs'; chmodSync('dist/index.js', 0o755)\"",
23
+ "prepublishOnly": "npm run build"
24
+ },
25
+ "dependencies": {
26
+ "@modelcontextprotocol/sdk": "^1.0.0"
27
+ },
28
+ "devDependencies": {
29
+ "typescript": "^5.5.0",
30
+ "@types/node": "^22.0.0"
31
+ },
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+https://github.com/sekrdcom/sekrd-mcp-ts.git"
35
+ },
36
+ "homepage": "https://sekrd.com",
37
+ "bugs": {
38
+ "url": "https://github.com/sekrdcom/sekrd-mcp-ts/issues"
39
+ },
40
+ "keywords": [
41
+ "mcp",
42
+ "security",
43
+ "scanner",
44
+ "sekrd",
45
+ "supabase",
46
+ "firebase",
47
+ "cursor",
48
+ "claude"
49
+ ]
50
+ }