-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathrun_mcp_server.py
More file actions
executable file
·32 lines (25 loc) · 999 Bytes
/
run_mcp_server.py
File metadata and controls
executable file
·32 lines (25 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python3
"""
Development runner for Onshape MCP Server.
This script runs the MCP server in a way that can be debugged in VSCode
and connected to from Claude Code without restarting Claude Code every time.
"""
import os
import sys
import asyncio
from pathlib import Path
# Add project root to Python path
project_root = Path(__file__).parent
sys.path.insert(0, str(project_root))
# Set up environment variables (replace with your actual keys or use environment variables)
os.environ.setdefault("ONSHAPE_ACCESS_KEY", "your_access_key_here")
os.environ.setdefault("ONSHAPE_SECRET_KEY", "your_secret_key_here")
# Import and run the server
from onshape_mcp.server import main
if __name__ == "__main__":
print("🚀 Starting Onshape MCP Server in development mode...")
print(f"📂 Working directory: {project_root}")
print(f"🔑 Using API credentials from environment")
print("🐛 Debug mode: Ready for VSCode debugger")
print("=" * 60)
asyncio.run(main())