Skip to content

Commit f8a2eab

Browse files
committed
updated readme
1 parent 3427823 commit f8a2eab

1 file changed

Lines changed: 147 additions & 51 deletions

File tree

README.md

Lines changed: 147 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,31 @@
77

88
Provides LLMs with physics superpowers: ballistic calculations, collision prediction, rigid-body simulations, and trajectory recording for 3D visualization.
99

10+
## 🚀 Quick Start (30 seconds)
11+
12+
```bash
13+
# Try it instantly with uvx (no installation needed)
14+
uvx chuk-mcp-physics
15+
16+
# Or with the public Rapier service for simulations
17+
RAPIER_SERVICE_URL=https://rapier.chukai.io uvx chuk-mcp-physics
18+
```
19+
20+
**For Claude Desktop:** Add to your config file:
21+
```json
22+
{
23+
"mcpServers": {
24+
"physics": {
25+
"command": "uvx",
26+
"args": ["chuk-mcp-physics"],
27+
"env": {
28+
"RAPIER_SERVICE_URL": "https://rapier.chukai.io"
29+
}
30+
}
31+
}
32+
}
33+
```
34+
1035
---
1136

1237
## 🎯 Use Cases
@@ -385,12 +410,48 @@ chuk-mcp-physics
385410

386411
Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
387412

413+
#### Option 1: Using uvx (Recommended - No Installation Required)
414+
415+
```json
416+
{
417+
"mcpServers": {
418+
"physics": {
419+
"command": "uvx",
420+
"args": ["chuk-mcp-physics"],
421+
"env": {
422+
"PHYSICS_PROVIDER": "rapier",
423+
"RAPIER_SERVICE_URL": "https://rapier.chukai.io"
424+
}
425+
}
426+
}
427+
}
428+
```
429+
430+
#### Option 2: Using Installed Package
431+
388432
```json
389433
{
390434
"mcpServers": {
391435
"physics": {
392436
"command": "python",
393437
"args": ["-m", "chuk_mcp_physics.server"],
438+
"env": {
439+
"PHYSICS_PROVIDER": "rapier",
440+
"RAPIER_SERVICE_URL": "https://rapier.chukai.io"
441+
}
442+
}
443+
}
444+
}
445+
```
446+
447+
#### Option 3: Analytic Only (No External Service)
448+
449+
```json
450+
{
451+
"mcpServers": {
452+
"physics": {
453+
"command": "uvx",
454+
"args": ["chuk-mcp-physics"],
394455
"env": {
395456
"PHYSICS_PROVIDER": "analytic"
396457
}
@@ -504,21 +565,40 @@ python examples/05_rapier_simulation.py
504565
PHYSICS_PROVIDER=analytic # or "rapier"
505566

506567
# Rapier service (only if using Rapier provider)
507-
RAPIER_SERVICE_URL=http://localhost:9000
568+
# Option 1: Public service (recommended for getting started)
569+
RAPIER_SERVICE_URL=https://rapier.chukai.io
570+
571+
# Option 2: Local development
572+
# RAPIER_SERVICE_URL=http://localhost:9000
573+
574+
# Optional configuration
508575
RAPIER_TIMEOUT=30.0
576+
RAPIER_MAX_RETRIES=3
577+
RAPIER_RETRY_DELAY=1.0
509578
```
510579

511580
### YAML Configuration
512581

513-
Create `physics.yaml`:
582+
Create `physics.yaml` in your working directory or `~/.config/chuk-mcp-physics/`:
514583

515584
```yaml
516-
default_provider: analytic
585+
default_provider: rapier
586+
587+
providers:
588+
# Override provider per tool type
589+
simulations: rapier
590+
projectile_motion: analytic
517591

518592
rapier:
519-
service_url: http://localhost:9000
593+
# Public service (recommended)
594+
service_url: https://rapier.chukai.io
595+
596+
# Or local development
597+
# service_url: http://localhost:9000
598+
520599
timeout: 30.0
521600
max_retries: 3
601+
retry_delay: 1.0
522602
```
523603
524604
---
@@ -567,19 +647,29 @@ make docker-run
567647

568648
## ☁️ Production Deployment
569649

570-
### Live Deployments
650+
### Live Public Services
571651

572652
**Current Production Services:**
573-
- **MCP Physics Server**: https://chuk-mcp-physics.fly.dev/
574-
- **Rapier Service**: https://chuk-rapier-physics.fly.dev/
653+
- **Rapier Physics Engine**: https://rapier.chukai.io
654+
- Public API for physics simulations
655+
- No authentication required for basic usage
656+
- Rate limits may apply
575657

576-
Both services are deployed on Fly.io and configured to work together.
658+
**Quick Test:**
659+
```bash
660+
# Test the public Rapier service
661+
curl https://rapier.chukai.io/health
577662

578-
### Recommended: Separate Deployment
663+
# Use with chuk-mcp-physics
664+
export RAPIER_SERVICE_URL=https://rapier.chukai.io
665+
uvx chuk-mcp-physics
666+
```
667+
668+
### Deploy Your Own Rapier Service
579669

580-
For production, deploy the Rapier service and MCP server separately:
670+
If you need your own private Rapier service instance:
581671

582-
#### 1. Deploy Rapier Service First
672+
#### 1. Deploy Rapier Service to Fly.io
583673

584674
```bash
585675
cd rapier-service
@@ -588,73 +678,79 @@ cd rapier-service
588678
fly auth login
589679

590680
# Create and deploy
591-
fly apps create chuk-rapier-physics
681+
fly apps create your-rapier-physics
592682
fly deploy
593683

684+
# Add custom domain (optional)
685+
fly certs add rapier.yourdomain.com -a your-rapier-physics
686+
594687
# Verify
595-
curl https://chuk-rapier-physics.fly.dev/health
688+
curl https://your-rapier-physics.fly.dev/health
596689
```
597690

598-
#### 2. Deploy MCP Server
691+
#### 2. Configure chuk-mcp-physics to Use Your Service
599692

600693
```bash
601-
cd .. # Back to project root
602-
603-
# Create app
604-
fly apps create chuk-mcp-physics
605-
606-
# Update fly.toml to use Rapier service
607-
# Set PHYSICS_PROVIDER=rapier
608-
# Set RAPIER_SERVICE_URL=https://chuk-rapier-physics.fly.dev
609-
610-
# Deploy
611-
fly deploy
694+
# Option 1: Environment variable
695+
export RAPIER_SERVICE_URL=https://rapier.yourdomain.com
696+
uvx chuk-mcp-physics
612697

613-
# Check status
614-
fly status
698+
# Option 2: YAML config (physics.yaml)
699+
# rapier:
700+
# service_url: https://rapier.yourdomain.com
615701
```
616702

617-
**Why separate deployment?**
618-
- ✅ Independent scaling (CPU-intensive Rapier vs lightweight MCP)
619-
- ✅ Faster deployments (update Python or Rust separately)
620-
- ✅ Cost optimization (scale each service independently)
621-
- ✅ Better isolation (Rust physics + Python MCP)
703+
**Why deploy your own?**
704+
- 🔒 Private instance for production workloads
705+
- 📈 Custom scaling and resource allocation
706+
- 🌍 Deploy closer to your users (different regions)
707+
- 💾 Persistent simulations and custom configurations
622708

623709
See **[DEPLOYMENT.md](DEPLOYMENT.md)** for complete deployment guide, scaling strategies, and CI/CD setup.
624710

625-
### Alternative: Quick Single Deployment
626-
627-
For development/testing:
628-
629-
```bash
630-
# Deploy everything together (not recommended for production)
631-
make fly-deploy
632-
fly status
633-
fly logs
634-
```
635-
636711
---
637712

638713
## 🦀 Rapier Service Setup
639714

640-
For full rigid-body simulations, you need the Rapier service running.
715+
For full rigid-body simulations, you have several options:
641716

642-
See **[RAPIER_SERVICE.md](RAPIER_SERVICE.md)** for:
643-
- Complete API specification
644-
- Rust implementation guide
645-
- Docker deployment
646-
- Testing examples
717+
### Option 1: Use Public Service (Easiest)
718+
719+
```bash
720+
# No setup required - just configure the URL
721+
export RAPIER_SERVICE_URL=https://rapier.chukai.io
722+
uvx chuk-mcp-physics
723+
```
724+
725+
### Option 2: Run Locally with Docker
647726

648-
Quick start:
649727
```bash
650728
# Using Docker
651729
docker run -p 9000:9000 chuk-rapier-service
652730

653-
# Or build from source (see RAPIER_SERVICE.md)
731+
# Configure to use local service
732+
export RAPIER_SERVICE_URL=http://localhost:9000
733+
uvx chuk-mcp-physics
734+
```
735+
736+
### Option 3: Build from Source
737+
738+
```bash
739+
# Build and run the Rust service
654740
cd rapier-service
655741
cargo run --release
742+
743+
# In another terminal
744+
export RAPIER_SERVICE_URL=http://localhost:9000
745+
uvx chuk-mcp-physics
656746
```
657747

748+
See **[RAPIER_SERVICE.md](RAPIER_SERVICE.md)** for:
749+
- Complete API specification
750+
- Rust implementation guide
751+
- Docker deployment details
752+
- Testing examples
753+
658754
---
659755

660756
## 📊 Comparison: Analytic vs Rapier

0 commit comments

Comments
 (0)