Coze bots are powerful, but they live in the cloud. They can't read your local files, run terminal commands, or interact directly with your machine. Coze-Power solves this with a lightweight HTTP server that exposes local tools through a standard OpenAPI interface that Coze plugins can consume.
cd coze-power
python3 server.py
# Server starts on http://localhost:8899
# Using ngrok (recommended for beginners)
ngrok http 8899
# → https://xxxx.ngrok.io (copy this URL)
# Or using Cloudflare Tunnel
cloudflared tunnel --url http://localhost:8899
assets/openapi-spec.jsonhttps://xxxx.ngrok.io)X-API-Key, value from your config.jsonIn your Coze bot, try:
> "Search the web for latest AI news"
> "List files on my desktop"
> "Show me the current system status"
| Tool | Method | Endpoint | Description |
|---|---|---|---|
| ------ | -------- | ---------- | ------------- |
| Web Search | POST | /tools/web-search | Search the web and return results |
| Read File | POST | /tools/read-file | Read content from local files |
| Write File | POST | /tools/write-file | Write content to local files |
| List Directory | POST | /tools/list-dir | List files in a directory |
| Run Command | POST | /tools/run-command | Execute shell commands |
| System Info | POST | /tools/system-info | Get OS, CPU, memory info |
| Read Clipboard | POST | /tools/clipboard-read | Read clipboard contents |
| Write Clipboard | POST | /tools/clipboard-write | Write to clipboard |
| Send Notification | POST | /tools/notify | Send desktop notification |
| Health Check | GET | /health | Check server status |
Create config.json in the skill directory:
{
"api_key": "your-secret-api-key",
"host": "0.0.0.0",
"port": 8899,
"allowed_commands": ["ls", "pwd", "cat", "echo", "python3", "node"],
"allowed_paths": ["/home", "/tmp"],
"max_file_size_kb": 1024
}
⚠️ You are exposing your local machine to the internet. Follow these rules:
allowed_commands and allowed_paths to restrict accessSee references/coze-plugin-setup.md for step-by-step Coze configuration.
See references/examples.md for real Coze bot prompts and expected behaviors.
See references/api-reference.md for complete endpoint documentation.
共 1 个版本