Skip to content

Commit 448e633

Browse files
committed
Dev tooling tweaks
1 parent c7e3e23 commit 448e633

File tree

11 files changed

+186
-30
lines changed

11 files changed

+186
-30
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ dist
55
.aider*
66

77
**/.claude/settings.local.json
8+
/public

AGENT.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
# use-mcp Project Guidelines
22

33
## Build, Lint, and Test Commands
4-
- `pnpm dev`: Run development build with watch mode
4+
- `pnpm dev`: Run development build with watch mode and start all examples/servers
5+
- Chat UI: http://localhost:5002
6+
- Inspector: http://localhost:5001
7+
- Hono MCP Server: http://localhost:5101
8+
- CF Agents MCP Server: http://localhost:5102
59
- `pnpm build`: Build the project
610
- `pnpm check`: Run prettier checks and TypeScript type checking
711

812
### Integration Tests (in /test directory)
9-
- `cd test && pnpm test`: Run integration tests with visible browser
13+
- `cd test && pnpm test`: Run integration tests headlessly (default)
14+
- `cd test && pnpm test:headed`: Run integration tests with visible browser
1015
- `cd test && pnpm test:headless`: Run integration tests headlessly
1116
- `cd test && pnpm test:watch`: Run integration tests in watch mode
1217
- `cd test && pnpm test:ui`: Run integration tests with interactive UI

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
A lightweight React hook for connecting to [Model Context Protocol (MCP)](https://github.com/modelcontextprotocol) servers. Simplifies authentication and tool calling for AI systems implementing the MCP standard.
1010

11-
Try it out: [MCP Inspector](https://inspector.use-mcp.dev) | [Cloudflare Workers AI Playground](https://playground.ai.cloudflare.com/)
11+
Try it out: [Chat Demo](https://chat.use-mcp.dev) | [MCP Inspector](https://inspector.use-mcp.dev) | [Cloudflare Workers AI Playground](https://playground.ai.cloudflare.com/)
1212

1313
## Installation
1414

@@ -20,6 +20,31 @@ pnpm add use-mcp
2020
yarn add use-mcp
2121
```
2222

23+
## Development
24+
25+
To run the development environment with all examples and servers:
26+
27+
```bash
28+
pnpm dev
29+
```
30+
31+
This starts:
32+
- **Inspector**: http://localhost:5001 - MCP server debugging tool
33+
- **Chat UI**: http://localhost:5002 - Example chat interface
34+
- **Hono MCP Server**: http://localhost:5101 - Example MCP server
35+
- **CF Agents MCP Server**: http://localhost:5102 - Cloudflare Workers AI MCP server
36+
37+
### Testing
38+
39+
Integration tests are located in the `test/` directory and run headlessly by default:
40+
41+
```bash
42+
cd test && pnpm test # Run tests headlessly (default)
43+
cd test && pnpm test:headed # Run tests with visible browser
44+
cd test && pnpm test:watch # Run tests in watch mode
45+
cd test && pnpm test:ui # Run tests with interactive UI
46+
```
47+
2348
## Features
2449

2550
- 🔄 Automatic connection management with reconnection and retries

examples/servers/cf-agents/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"deploy": "wrangler deploy",
7-
"dev": "wrangler dev",
7+
"dev": "wrangler dev --port 5102",
88
"format": "biome format --write",
99
"lint:fix": "biome lint --fix",
1010
"start": "wrangler dev",
@@ -22,6 +22,6 @@
2222
"agents": "^0.0.100",
2323
"hono": "^4.8.3",
2424
"typescript": "^5.8.3",
25-
"wrangler": "^4.22.0"
25+
"wrangler": "^4.23.0"
2626
}
2727
}

examples/servers/cf-agents/pnpm-lock.yaml

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vengabus",
33
"scripts": {
4-
"dev": "wrangler dev",
4+
"dev": "wrangler dev --port 5101",
55
"deploy": "wrangler deploy --minify",
66
"cf-typegen": "wrangler types --env-interface CloudflareBindings"
77
},
@@ -11,7 +11,7 @@
1111
"devDependencies": {
1212
"@hono/mcp": "^0.1.0",
1313
"@modelcontextprotocol/sdk": "^1.13.3",
14-
"wrangler": "^4.21.0",
14+
"wrangler": "^4.23.0",
1515
"zod": "^3.25.67"
1616
}
1717
}

examples/servers/hono-mcp/pnpm-lock.yaml

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
}
2222
},
2323
"scripts": {
24-
"dev": "tsup --watch",
24+
"install:all": "concurrently 'pnpm install' 'cd examples/chat-ui && pnpm install' 'cd examples/inspector && pnpm install' 'cd examples/servers/hono-mcp && pnpm install' 'cd examples/servers/cf-agents && pnpm install'",
25+
"dev": "concurrently 'pnpm:build:watch' 'cd examples/chat-ui && pnpm dev' 'cd examples/inspector && pnpm dev' 'sleep 1 && cd examples/servers/hono-mcp && pnpm dev' 'sleep 2 && cd examples/servers/cf-agents && pnpm dev'",
26+
"deploy:all": "concurrently 'pnpm build:site && pnpm deploy:site' 'cd examples/chat-ui && pnpm run deploy' 'cd examples/inspector && pnpm run deploy'",
27+
"build:watch": "tsup --watch",
2528
"build": "tsup",
2629
"check": "prettier --check . && tsc",
2730
"prettier:fix": "prettier --write .",
@@ -37,6 +40,7 @@
3740
"devDependencies": {
3841
"@axodotdev/oranda": "^0.6.5",
3942
"@types/react": "^19.0.12",
43+
"concurrently": "^9.2.0",
4044
"husky": "^9.1.7",
4145
"prettier": "^3.5.3",
4246
"react": "^19.0.0",

0 commit comments

Comments
 (0)