Logo MCP Quickstart

MCP Quickstart

Cộng đồng
G12789

Forge a working, testable, publishable MCP server in 30s. TypeScript or Python, with example tools, the Inspector and tests included.

Nhà phát hànhG12789
Kho mãmcp-quickstart
Ngôn ngữJavaScript
Bản fork
1
Sao
81
Công cụ có sẵn
0
Phương thức truyền tảistdio
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    MCP Quickstart cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    81 sao và 1 bản fork từ kho mã được liên kết.

mcp-quickstart

⭐ 推荐: npx ship-skills init(已登录 gh 会自动支持作者)

CI npm node license MCP

Forge a working, testable, publishable MCP server in 30 seconds. One command. TypeScript or Python. Example tools, the Inspector, and tests — all wired up. Or point it at an OpenAPI spec and get one MCP tool per API endpoint, automatically.

bash
npm create mcp-quickstart@latest my-server

mcp-quickstart demo

Most "create an MCP server" guides leave you with an empty skeleton and a 20-step setup. mcp-quickstart hands you a server that runs, tests, and connects to Claude / Cursor on the first try — then gets out of your way.


Turn any REST API into an MCP server

Most scaffolders hand you an empty template and say "now go write your tools." mcp-quickstart can instead read an existing API and write the tools for you — from an OpenAPI spec or a single curl command:

bash
# whole API, from an OpenAPI spec:
npx mcp-quickstart petstore-mcp --from-openapi https://petstore3.swagger.io/api/v3/openapi.json

# one endpoint, straight from a curl you already have:
npx mcp-quickstart my-tool --from-curl "curl https://api.example.com/v1/search?q=hi -H 'Authorization: Bearer X'"

Point it at any OpenAPI 3.x document (a URL or a local .json / .yaml) and it generates a real, typed MCP server — one tool per operation, with path/query params and request bodies wired up to a small HTTP client. Request bodies are expanded into per-field zod types ($ref, nested objects, arrays and enums resolved), not an opaque blob — so the AI gets a real schema for each tool. Set API_BASE_URL (and an optional auth header) in .env, run npm run dev, and your AI agent can call the API immediately.

--from-curl does the same for a single request: paste a curl command (or a file with one) and get one MCP tool. Query params and the JSON body become overridable tool inputs, and auth headers are moved to .env instead of being hard-coded into the generated source.

my-api-mcp/
├── src/
│   ├── index.ts   # one registerTool(...) per API operation — plain, editable TS
│   └── http.ts    # generic caller: URL building, auth header, body
└── .env.example   # API_BASE_URL, API_AUTH_HEADER, API_AUTH_VALUE

No magic, no runtime spec parsing — just generated TypeScript you own and can edit.


Deploy a remote MCP server to the edge

Local stdio servers are great, but the ecosystem is moving to remote MCP servers over Streamable HTTP. mcp-quickstart can scaffold one that deploys to Cloudflare Workers — stateless (createMcpHandler, no Durable Objects), so it runs on the free Workers plan, cold-starts in milliseconds, and is reachable globally:

bash
npx mcp-quickstart edge-server --transport cloudflare -y
cd edge-server && npm install
npx wrangler login
npm run deploy        # → https://edge-server.<you>.workers.dev/mcp

Then point Cursor / Claude at the /mcp URL. This is exactly what edge runtimes are good at — low-latency orchestration, not running models. (To run a model you still call a GPU backend; the Worker is the global front door / gateway.)

The closed loop: API → globally-deployed remote MCP server

Combine the two ideas. Feed an OpenAPI spec (or a single curl) and target Cloudflare, and you get an API-backed remote MCP server that's ready to deploy worldwide — in one command:

bash
npx mcp-quickstart api-edge \
  --from-openapi https://petstore3.swagger.io/api/v3/openapi.json \
  --transport cloudflare -y
cd api-edge && npm install
npx wrangler secret put API_AUTH_VALUE   # if the API needs auth
npm run deploy        # → https://api-edge.<you>.workers.dev/mcp

Every API operation becomes an MCP tool, wired through a generated HTTP client, served by createMcpHandler on the free Workers plan. The base URL is baked in from the spec; auth lives in Workers secrets, never in your code or git. --from-curl … --transport cloudflare works the same way for a single endpoint.

There's no extra cost to ship this: the scaffold, npm publish and the Workers free tier are all free — you only pay for the upstream API/traffic you choose to use.


Why mcp-quickstart

The official scaffolder gives you a bare bones starting point. mcp-quickstart is the "…but without the part you hate" version:

Bare skeletonmcp-quickstart
Runs immediatelypartly✅
Example tool + resource + prompt–✅
Unit tests included & passing–✅
One-command Inspector (npm run inspect)–✅
Claude Desktop + Cursor config in README–✅
TypeScript and Pythonone✅ both
Generate tools from an OpenAPI spec–✅
Generate a tool from a curl command–✅
One-command deploy to Cloudflare Workers–✅
.env.example, .gitignore, sane tsconfigpartly✅

Quick start

bash
# interactive
npm create mcp-quickstart@latest

# non-interactive
npm create mcp-quickstart@latest weather-server -- --lang ts -y
npx mcp-quickstart weather-server --lang python -y

Before it lands on npm, you can run it straight from GitHub:

bash
npx github:G12789/mcp-quickstart weather-server --lang ts -y

Then:

bash
cd weather-server
npm install        # or: uv sync   (Python)
npm run dev        # start the server on stdio
npm run inspect    # open the MCP Inspector and click your tools
npm test           # green out of the box

What you get

Every generated server ships with one of each MCP primitive, so you have a real reference to copy from:

  • Tool ping — proof of life
  • Tool text_stats — count chars / words / lines / sentences (fully offline)
  • Resource greeting://{name} — dynamic read-only data
  • Prompt summarize — a reusable prompt template

Heavy logic lives in a separate, pure tools.ts / tools.py so it stays trivially testable.

Options

npm create mcp-quickstart@latest [name] [options]

  --from-openapi <path|url>  generate one MCP tool per API operation from an OpenAPI spec
  --from-curl <cmd|file>     turn a single curl command into an MCP tool
  --lang <ts|python>         language (default: prompt)
  --transport <stdio|http|cloudflare>   transport / deploy target (default: prompt)
  --examples <bool>          include the example primitives (default: true)
  --yes, -y                  accept defaults, skip prompts
  --help, -h                 show help

Templates

LanguageTransportStatus
TypeScriptstdio✅ stable
TypeScriptstreamable HTTP✅ stable
TypeScriptfrom OpenAPI (--from-openapi)✅ stable
TypeScriptfrom curl (--from-curl)✅ stable
TypeScriptCloudflare Workers (--transport cloudflare)✅ stable
TypeScriptAPI → Workers (--from-openapi/--from-curl … --transport cloudflare)✅ stable
Pythonstdio✅ stable
Pythonstreamable HTTP✅ stable

Pick the transport at scaffold time:

bash
npm create mcp-quickstart@latest my-server -- --lang ts --transport http -y

Related tools

mcp-quickstart isn't the only way to turn an API into an MCP server, and it's worth knowing the landscape:

Where mcp-quickstart fits: a single, dependency-light CLI that covers the common cases end to end — plain TS/Python starters, OpenAPI and curl import, and a one-command path from an API all the way to a deployed Cloudflare Worker — generating plain code you own (no runtime spec parsing, no lock-in). If you need managed hosting, governance, or deep SDK generation, reach for the tools above.

Roadmap

  • --from-postman importer (Postman collections → MCP tools)
  • Python output for the generated (OpenAPI / curl) servers
  • --with auth (OAuth) preset for the Cloudflare / HTTP transports

Done: --from-openapi (v0.2.0) · --from-curl (v0.3.0) · per-field typed bodies / $ref (v0.4.0) · Cloudflare Workers deploy target (v0.5.0) · API → Workers in one shot (v0.6.0).

Issues and PRs welcome — every issue gets a reply within 24h.

Contributing

bash
git clone https://github.com/G12789/mcp-quickstart.git
cd mcp-quickstart
npm install
node src/index.js test-out --lang ts -y   # try the scaffolder locally

Templates live in templates/<language>-<transport>/. Files prefixed with _ (e.g. _gitignore) are renamed on generation.

More projects

Part of a set of open tools — see github.com/G12789: mall-ai-digital-twin · merchant-membership-miniprogram · cyber-stage-widgets

License

MIT

Dùng MCP MCP Quickstart với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối MCP Quickstart, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm MCP Quickstart làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của MCP Quickstart.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "mcp-quickstart": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của MCP Quickstart, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của MCP Quickstart.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng MCP Quickstart giúp tôi làm việc này không?
MCP Quickstart
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng MCP Quickstart.

Câu hỏi thường gặp

Máy chủ MCP MCP Quickstart dùng để làm gì?

MCP Quickstart là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP MCP Quickstart với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng MCP Quickstart với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP MCP Quickstart với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối MCP Quickstart, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP MCP Quickstart với TypingMind?

MCP Quickstart hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP MCP Quickstart cung cấp những công cụ nào trong TypingMind?

MCP Quickstart cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP MCP Quickstart không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu MCP Quickstart yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇