Skip to content

Commit 7307766

Browse files
authored
convert typescript-mcp template into a monorepo (#2991)
<!-- CURSOR_SUMMARY --> > [!NOTE] > Reorganizes the TypeScript MCP template into a pnpm monorepo with a MooseStack service exposing MCP tools and a Next.js web app with an AI chat UI wired to those tools. > > - **Monorepo setup** > - Add `pnpm-workspace.yaml` and root `package.json` with `dev`, `dev:moose`, `dev:web` scripts. > - Rename apps to `packages/moosestack-service` and `packages/web-app`. > - **MooseStack service (`packages/moosestack-service`)** > - Implement Express-based MCP server (`app/apis/mcp.ts`) mounted at `/tools` with tools: `query_clickhouse` (readonly queries, row limits) and `get_data_catalog` (tables/views with schemas; summary/detailed output). > - Add minimal ingest model `DataEvent` and pipeline (`app/ingest/models.ts`); export APIs/models via `app/index.ts`. > - Include `moose.config.toml`, `tsconfig.json`, and package metadata. > - **Web app (`packages/web-app`)** > - Next.js app with chat UI (AI SDK v5 + Anthropic) that connects to MCP over HTTP (`/tools`), shows tool invocations, timings, reasoning, and formatted outputs. > - Add API routes (`src/app/api/chat/*`), env helpers, UI components, Tailwind setup, and config files. > - **Docs & config** > - Update `README.md` and `template.config.toml` for monorepo workflow and commands. > - Add `.gitignore` files and development env defaults. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 6edfddd. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 4c9ec39 commit 7307766

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+54
-39
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.moose
2+
node_modules
3+
dist
4+
coverage
5+
.ts-node
6+

templates/typescript-mcp/README.md

Lines changed: 21 additions & 19 deletions
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "typescript-mcp",
3+
"version": "1.0.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "pnpm --parallel --stream -r dev",
7+
"dev:moose": "pnpm --filter moosestack-service dev",
8+
"dev:web": "pnpm --filter web-app dev"
9+
},
10+
"pnpm": {
11+
"onlyBuiltDependencies": [
12+
"@confluentinc/kafka-javascript"
13+
]
14+
}
15+
}

templates/typescript-mcp/moosestack-service/.gitignore renamed to templates/typescript-mcp/packages/moosestack-service/.gitignore

File renamed without changes.

templates/typescript-mcp/moosestack-service/.vscode/settings.json renamed to templates/typescript-mcp/packages/moosestack-service/.vscode/settings.json

File renamed without changes.

templates/typescript-mcp/moosestack-service/app/apis/mcp.ts renamed to templates/typescript-mcp/packages/moosestack-service/app/apis/mcp.ts

File renamed without changes.

templates/typescript-mcp/moosestack-service/app/index.ts renamed to templates/typescript-mcp/packages/moosestack-service/app/index.ts

File renamed without changes.

templates/typescript-mcp/moosestack-service/app/ingest/models.ts renamed to templates/typescript-mcp/packages/moosestack-service/app/ingest/models.ts

File renamed without changes.

templates/typescript-mcp/moosestack-service/moose.config.toml renamed to templates/typescript-mcp/packages/moosestack-service/moose.config.toml

File renamed without changes.

templates/typescript-mcp/moosestack-service/package.json renamed to templates/typescript-mcp/packages/moosestack-service/package.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "ts",
2+
"name": "moosestack-service",
33
"version": "0.0",
44
"scripts": {
55
"moose": "moose-cli",
@@ -10,7 +10,6 @@
1010
"@514labs/moose-lib": "latest",
1111
"@modelcontextprotocol/sdk": "^1.20.2",
1212
"express": "^5.1.0",
13-
"ts": "link:",
1413
"ts-patch": "^3.3.0",
1514
"tsconfig-paths": "^4.2.0",
1615
"typia": "^9.6.1",
@@ -20,10 +19,5 @@
2019
"@514labs/moose-cli": "latest",
2120
"@types/express": "^5.0.3",
2221
"@types/node": "^20.12.12"
23-
},
24-
"pnpm": {
25-
"onlyBuiltDependencies": [
26-
"@confluentinc/kafka-javascript"
27-
]
2822
}
2923
}

0 commit comments

Comments
 (0)