SmeltSecSmeltSec
    Features
    |Security
    |How It Works
    |Pricing
    |Docs
    |Blog
    |About
    npm
    1. Home
    2. /
    3. How it works
    流程

    60秒从源代码到生产环境

    八个步骤。每步接收一个输入、执行一个动作、输出一个结果。将 SmeltSec 指向一个仓库或 OpenAPI 规范;获得签名、评分、可部署的 MCP 服务器。

    1
    源代码接入
    2
    代码库分析
    3
    工具定义生成
    4
    服务器代码生成
    5
    Gate 1:安全扫描
    6
    Gate 2:行为分析
    7
    质量评分
    8
    签名证明 + 部署
    1
    步骤 1

    源代码接入

    输入:GitHub 仓库、OpenAPI 规范或自然语言

    将 SmeltSec 指向三种源之一。公开或私有 GitHub URL 会触发仓库克隆。OpenAPI 3.0/3.1 文档直接解析。自然语言描述会拉取相关 SDK 文档。输出:规范化的源代码包,可直接进入 AST 阶段。

    API 等效
    POST /v1/generate { source: 'github', repo: 'owner/repo' }
    源码分析
    ◆ 正在分析仓库... 342 files, 89 functions discovered
    ◆ Tree-sitter 解析中... Python AST extracted for 89 functions
    ◆ API 接口映射中... 14 public endpoints, 75 internal filtered
    ✓ 路由检测: Flask routes (GET: 8, POST: 4, PUT: 2)
    ✓ 认证分析: 12/14 endpoints require @auth_required
    ✓ 准备进入 Gate 1 14 tool candidates identified
    2
    步骤 2

    代码库分析

    输入:源代码包 → Tree-sitter AST

    Tree-sitter 解析代码包,为每个文件生成带类型的 AST。SmeltSec 遍历树,提取公开函数签名和路由处理器,过滤掉标记为 internal 或 deprecated 的项。输出:可调用单元候选列表及其类型注解。

    API 等效
    GET /v1/servers/{id}/security/gate1
    Gate 1 — 生成前扫描
    ◆ Semgrep SAST: 342 files scanned — 0 critical, 1 warning (unsafe pattern usage)
    ◆ Gitleaks: Code + git history — 0 secrets found
    ◆ OSV-Scanner: 23 deps — 1 medium CVE (requests 2.28)
    ◆ API 接口: 14 endpoints mapped, auth requirements logged
    ✓ Gate 1 决策: PASSED — 0 blockers, 2 warnings
    3
    步骤 3

    工具定义生成

    输入:AST 候选项 → 带类型的 MCP 工具模式

    一次 LLM 处理将每个候选项转换为 MCP 工具定义:名称、描述,以及严格的 JSON Schema(参数和返回类型)。Docstring 成为描述;类型注解变成 schema。输出:可直接接入服务器的带类型工具清单。

    API 等效
    POST /v1/generate { source: 'github', repo: 'owner/repo' }
    生成管道
    ◆ 精选工具中... 14 tools selected from 89 functions
    ◆ 生成描述中... AST + docstring analysis
    ◆ 构建 Schema 中... Zod schemas from type annotations
    ◆ 生成服务器中... FastMCP + Python 3.11
    ✓ 代码模式: Retry, circuit breaker, sanitization embedded
    ✓ 服务器已生成 14 tools, ready for Gate 2
    4
    步骤 4

    服务器代码生成

    输入:工具清单 → FastMCP / TypeScript SDK 服务器

    每个工具定义变成真实的处理器。SmeltSec 输出 FastMCP(Python 3.11)或 TypeScript SDK 代码,接入重试、断路器、参数净化以及所选传输。输出:可运行的 MCP 服务器仓库,依赖已锁定版本。

    API 等效
    GET /v1/servers/{id}/security/gate2
    Gate 2 — 生成后扫描
    ◆ MCP-Scan: 14 tools scanned — 0 poisoning, 0 hidden instructions
    ◆ 行为分析: 14/14 tools — intent matches action
    ◆ Semgrep Self-Check: 0 new vulnerabilities introduced
    ◆ 权限验证: No escalation detected (all tools ≤ source scope)
    ✓ Gate 2 决策: PASSED — Security Grade: A (91/100)
    5
    步骤 5

    Gate 1:安全扫描

    输入:生成的服务器 → SAST、密钥、CVE、投毒检查

    全部本地执行,全部免费。Semgrep 运行 SAST 规则,Gitleaks 扫描代码和 git 历史中的密钥,OSV-Scanner 根据 OSV 数据库检查锁定的依赖,MCP-Scan 检测工具描述投毒。出现 Critical 级别发现将停止流水线。输出:签名的 Gate 1 报告。

    API 等效
    POST /v1/score { manifest: '...' }
    评分管道
    ◆ 质量评分: 87/100 (B) — 6 dimensions
    ◆ 安全评分: 91/100 (A) — 5 categories
    ◆ 描述: 92/100 | Schema: 88 | Naming: 95
    ◆ 重叠度: 78/100 — search_docs and find_docs similar
    ✓ 自动修复: 3 suggestions available (+12 points)
    ✓ 报告已生成 Quality + Security report cards
    6
    步骤 6

    Gate 2:行为分析

    输入:Gate 1 报告 + 工具清单 → LLM 行为检查

    LLM 将每个工具的描述与其代码实际行为进行比较。不一致会作为行为漂移出现:声称只读却会写入的工具、隐藏副作用的描述、从未声明的权限。此步骤为付费(每台服务器约 $0.02)。输出:每个工具标记 Pass / Warn / Fail 的行为报告。

    API 等效
    GET /v1/servers/{id}/config?client=claude_desktop
    部署与配置
    ✓ Claude Desktop: synced — ~/.config/claude/config.json
    ✓ Cursor: synced — ~/.cursor/mcp.json
    ✓ VS Code: synced — .vscode/mcp.json
    ✓ ChatGPT: synced — plugin manifest
    ✓ Windsurf: synced — ~/.windsurf/mcp.json
    ◆ 守护进程: running — auto-sync on changes
    7
    步骤 7

    质量评分

    输入:服务器 + 报告 → 6 个维度的评分

    六个维度,每台服务器一个字母评级:描述清晰度、schema 完整度、命名一致性、与现有工具的重叠、错误暴露面、可观测性钩子。每个维度都有数值评分和修复建议。输出:带可执行项的评分报告卡(A–F)。

    API 等效
    POST /v1/servers/{id}/monitor { repoUrl, branch: 'main' }
    变更检测
    ◆ 检测到 Push: main @ abc1234
    ◆ 差异对比: api/users.py (3 functions changed)
    ! 高影响: get_user — parameter signature changed
    ~ 中影响: update_user — return type changed
    · 低影响: list_users — docstring updated
    → 建议更新: Surgical patch (preserves 12 edits)
    8
    步骤 8

    签名证明 + 部署

    输入:已通过的服务器 → 签名证明 + 客户端配置

    SmeltSec 将服务器、两个 Gate 报告、质量评分和 SBOM 打包成由 cosign 签名的单个证明。Claude Desktop、Cursor、VS Code、ChatGPT 和 Windsurf 的客户端配置由同步守护进程一次性写入。输出:已签名、可部署的 MCP 服务器,每个工具都已接入每个客户端。

    API 等效
    GET /v1/servers/{id}/analytics?range=7d
    分析与导出
    ◆ 总调用次数(7天): 12,847
    ◆ 错误率: 1.2% (below 5% threshold)
    ◆ 延迟 p95: 142ms
    ◆ REST API: 51 endpoints, 12 groups
    ◆ Webhook: 16 events — HMAC-SHA256 signed
    ◆ OTEL 推送: Grafana / Datadog / custom OTLP endpoint
    Capabilities

    See all capabilities

    Nine modules — generation, security, quality scoring, monitoring, config sync, analytics, API, code patterns, governance — with what each one actually does.

    Deep dives

    Related reading

    We're Building MCP Servers Wrong

    Most MCP servers today are hand-rolled wrappers around REST APIs. Here is why that is a dead end — and what a repeatable pipeline looks like.

    Read post

    From REST API to MCP Server in 10 Minutes

    A walkthrough of the SmeltSec pipeline: point it at a REST endpoint, watch the eight steps run, end with a signed and deployable server.

    Read post

    The Hidden Cost of Not Monitoring Your MCP Servers

    What happens after step eight: upstream drift, silent breakage, and the cost of catching it in production instead of in CI.

    Read post
    FAQ

    Process Questions

    What to expect when running SmeltSec end to end.

    The full eight-step pipeline — source intake, codebase analysis, tool generation, server code generation, Gate 1, Gate 2, quality scoring, and attestation — finishes in under 60 seconds for a medium REST API. Large specs take a few minutes.
    A Critical finding blocks the step. The report gives you exact file paths, scanner IDs, and suggested fixes. Fix the issue and re-run, or waive individual findings with justification on Team and Enterprise plans.
    Yes. Every generation produces a preview you can inspect locally — source code, tool manifests, security reports, and quality score — before you publish it. Nothing deploys automatically.
    Yes. SmeltSec integrates with GitHub, GitLab, and Bitbucket and can pull specs and push generated servers into private repos. Enterprise plans support self-hosted Git and SAML SSO for teams.

    准备开始了吗?

    在60秒内生成您的第一个MCP服务器。所有计划均包含安全扫描。

    Product

    FeaturesSecurityPricingHow It WorksDocumentation

    Resources

    Quick StartAPI ReferenceCLI ReferenceLeaderboardBlogChangelogGitHubnpm (@smeltsec/cli)npm (@smeltsec/core)

    Company

    PrivacyTerms

    SmeltSec
    © 2026 SmeltSec. Open source CLI · Proprietary SaaS.
    PrivacyTerms