Content
# Cocos MCP Log Bridge
A powerful log bridging tool for synchronizing log information between the Cocos Creator editor and Cursor AI, helping developers analyze and solve problems more effectively.
[](https://github.com/czh2774/cocosMCP/stargazers)
[](https://github.com/czh2774/cocosMCP/blob/main/LICENSE)


## 🌟 Features
- **Real-time Log Synchronization**: Get the latest logs directly from the Cocos Creator editor
- **Intelligent Filtering**: Supports filtering by type (normal logs, warnings, errors)
- **Keyword Search**: Precisely locate specific issues
- **One-click Clear**: Clear logs at any time to reduce interference
- **Scene Information**: Get basic information and a list of nodes for the current scene
- **Scene Operations**: Supports basic operations such as opening scenes
- **TCP Communication Bridge**: Stable and reliable communication mechanism
- **Cursor AI Integration**: Fully compatible with the Cursor MCP protocol
## 🚀 Quick Start
### Prerequisites
- Cocos Creator 3.8.0 or higher
- Python 3.7 or higher
- uv package manager (recommended) or pip
### Installation Steps
1. **Clone the Repository**
```bash
git clone https://github.com/czh2774/cocosMCP.git
```
2. **Copy to Cocos Creator Project**
Copy the cloned `cocosMCP` directory to the `extensions` directory of your Cocos Creator project.
3. **Install Python Dependencies**
```bash
cd your-project/extensions/cocosMCP/Python
uv pip install -r requirements.txt
```
4. **Enable the Extension in Cocos Creator**
Launch Cocos Creator, go to `Extensions -> Extension Manager`, and make sure the `cocosMCP` extension is enabled.
5. **Configure Cursor AI**
Configure the MCP Server in the Cursor AI settings, pointing to the Python server script.
### Basic Usage
```python
# Query logs
logs = await mcp.query_logs({
"show_logs": True,
"show_warnings": True,
"show_errors": True
})
# Clear logs
await mcp.clear_logs()
# Check connection status
status = await mcp.connection_status()
# Get scene information
scene_info = await mcp.get_scene_info()
# List all nodes in the scene
nodes = await mcp.list_scene_nodes()
# Open the scene with the specified UUID
await mcp.open_scene("scene-uuid-here")
```
## 📚 Detailed Documentation
This project includes three detailed documents:
- [User Guide](USAGE.md): Installation, configuration, and usage instructions
- [Developer Guide](DEVELOPMENT.md): Code structure, extension features, and maintenance instructions
- [Troubleshooting](TROUBLESHOOTING.md): Common issues and solutions
## 🔧 Technical Architecture
Cocos MCP consists of three main parts:
1. **Cocos Creator Extension**: Editor extension written in TypeScript
2. **TCP Communication Bridge**: Connects the editor and the Python server
3. **Python MCP Server**: Handles requests from Cursor AI

## 🤝 Contribution Guide
Contributions, bug reports, and feature requests are welcome! Please see the [Developer Guide](DEVELOPMENT.md) for details.
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## 🙏 Acknowledgments
- The Cocos Creator team for providing an excellent game engine
- The Cursor AI team for developing an intelligent programming assistant
- All contributors and users for their support and feedback
---
If you have any questions or suggestions, please submit [Issues](https://github.com/czh2774/cocosMCP/issues).
Connection Info
You Might Also Like
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
Sequential Thinking
A structured MCP server for dynamic problem-solving and reflective thinking.
git
A Model Context Protocol server for Git automation and interaction.