CONTRIBUTING.md
Thank you for considering contributing to Godot MCP! This document outlines the process for contributing to the project.
By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.
CONTRIBUTING.md
Thank you for considering contributing to Godot MCP! This document outlines the process for contributing to the project.
By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.
git checkout -b feature/amazing-feature)git push origin feature/amazing-feature)npm installnpm run buildnpm run watchFor debugging the MCP server:
DEBUG environment variable to trueWhen adding new tools to the MCP server:
setupToolHandlers methodThe following tools have been recently added:
Example:
When making changes, ensure they work across different platforms:
path.join, etc.) instead of hardcoded path separatorsIf you have any questions about contributing, feel free to open an issue for discussion.
Thank you for your contributions!
git checkout -b feature/amazing-feature)git push origin feature/amazing-feature)npm installnpm run buildnpm run watchFor debugging the MCP server:
DEBUG environment variable to trueWhen adding new tools to the MCP server:
setupToolHandlers methodThe following tools have been recently added:
Example:
When making changes, ensure they work across different platforms:
path.join, etc.) instead of hardcoded path separatorsIf you have any questions about contributing, feel free to open an issue for discussion.
Thank you for your contributions!
godot-mcp/
├── src/ # Source code
│ └── index.ts # Main server implementation
├── build/ # Compiled JavaScript (generated)
├── tests/ # Test files (future)
├── examples/ # Example Godot projects (future)
├── LICENSE # MIT License
├── README.md # Documentation
├── CONTRIBUTING.md # Contribution guidelines
├── package.json # Project configuration
└── tsconfig.json # TypeScript configuration
npm run inspector
// In setupToolHandlers
{
name: 'your_new_tool',
description: 'Description of what your tool does',
inputSchema: {
type: 'object',
properties: {
param1: {
type: 'string',
description: 'Description of parameter 1',
},
},
required: ['param1'],
},
}
// Add handler method
private async handleYourNewTool(args: any) {
// Validate input
if (!args.param1) {
return this.createErrorResponse(
'Parameter 1 is required',
['Provide a valid value for parameter 1']
);
}
try {
// Implement tool functionality
// ...
return {
content: [
{
type: 'text',
text: 'Result of your tool',
},
],
};
} catch (error: any) {
return this.createErrorResponse(
`Failed to execute tool: ${error?.message || 'Unknown error'}`,
[
'Possible solution 1',
'Possible solution 2'
]
);
}
}
godot-mcp/
├── src/ # Source code
│ └── index.ts # Main server implementation
├── build/ # Compiled JavaScript (generated)
├── tests/ # Test files (future)
├── examples/ # Example Godot projects (future)
├── LICENSE # MIT License
├── README.md # Documentation
├── CONTRIBUTING.md # Contribution guidelines
├── package.json # Project configuration
└── tsconfig.json # TypeScript configuration
npm run inspector
// In setupToolHandlers
{
name: 'your_new_tool',
description: 'Description of what your tool does',
inputSchema: {
type: 'object',
properties: {
param1: {
type: 'string',
description: 'Description of parameter 1',
},
},
required: ['param1'],
},
}
// Add handler method
private async handleYourNewTool(args: any) {
// Validate input
if (!args.param1) {
return this.createErrorResponse(
'Parameter 1 is required',
['Provide a valid value for parameter 1']
);
}
try {
// Implement tool functionality
// ...
return {
content: [
{
type: 'text',
text: 'Result of your tool',
},
],
};
} catch (error: any) {
return this.createErrorResponse(
`Failed to execute tool: ${error?.message || 'Unknown error'}`,
[
'Possible solution 1',
'Possible solution 2'
]
);
}
}