Create a Project
create-lynq scaffolds a new lynq MCP server project with a single command.
Usage
sh
pnpm create lynq my-serversh
npm create lynq my-serversh
yarn create lynq my-serversh
bunx create-lynq my-serverThe CLI will prompt you to choose a template.
Templates
minimal
Stdio transport with a single tool. The simplest possible lynq server.
my-server/
├── src/
│ └── index.ts
├── package.json
├── tsconfig.json
└── .mcp.jsonts
// src/index.ts
import { createMCPServer } from "@lynq/lynq";
import { z } from "zod";
const server = createMCPServer({ name: "my-server", version: "1.0.0" });
server.tool(
"hello",
{
description: "Say hello",
input: z.object({ name: z.string() }),
},
async (args, ctx) => ctx.text(`Hello, ${args.name}!`),
);
await server.stdio();Start it:
sh
cd my-server
pnpm install
pnpm devThe .mcp.json is included — add it to Claude Code and the tool is immediately available.
hono
HTTP transport with Hono, guard() middleware, and a login flow.
my-server/
├── src/
│ └── index.ts
├── package.json
├── tsconfig.json
└── .env.exampleIncludes a public login tool and a guarded search tool that appears only after authentication.
sh
cd my-server
pnpm install
pnpm dev
# MCP server running on http://localhost:3000/mcpfull
Everything: Hono + GitHub OAuth + Stripe Checkout + Store + logger + rateLimit + tests.
my-server/
├── src/
│ └── index.ts
├── tests/
│ └── server.test.ts
├── package.json
├── tsconfig.json
└── .env.exampleCopy .env.example to .env and fill in your credentials:
sh
cp .env.example .envThe test file demonstrates createTestClient for verifying tool visibility and responses.
Flags
Skip the interactive prompt with --template:
sh
pnpm create lynq my-server --template=minimalsh
npm create lynq my-server -- --template=minimalsh
yarn create lynq my-server --template=minimalsh
bunx create-lynq my-server --template=minimalNext Steps
- Quick Start — understand the basics
- Middleware — the middleware model
- Hono Adapter — deploy over HTTP
- Testing — test your MCP server