CONTRIBUTING.md
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!
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!
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'
]
);
}
}