project_create
Create a new Railway project to start applications, set up development environments, or establish project spaces for deployment.
Instructions
[API] Create a new Railway project
⚡️ Best for: ✓ Starting new applications ✓ Setting up development environments ✓ Creating project spaces
⚠️ Not for: × Duplicating existing projects
→ Next steps: service_create_from_repo, service_create_from_image, database_deploy
→ Related: project_delete, project_update
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name for the new project | |
| teamId | No | Optional team ID to create the project under |
Implementation Reference
- src/tools/project.tool.ts:52-80 (handler)The core handler for the 'project_create' MCP tool. This createTool invocation defines the tool's metadata, Zod input schema (name and optional teamId), and the executor function that invokes projectService.createProject to perform the actual project creation."project_create", formatToolDescription({ type: 'API', description: "Create a new Railway project", bestFor: [ "Starting new applications", "Setting up development environments", "Creating project spaces" ], notFor: [ "Duplicating existing projects", ], relations: { nextSteps: [ "service_create_from_repo", "service_create_from_image", "database_deploy" ], related: ["project_delete", "project_update"] } }), { name: z.string().describe("Name for the new project"), teamId: z.string().optional().describe("Optional team ID to create the project under") }, async ({ name, teamId }) => { return projectService.createProject(name, teamId); } ),
- src/tools/project.tool.ts:73-76 (schema)Zod schema defining the input parameters for the project_create tool: required 'name' string and optional 'teamId' string.{ name: z.string().describe("Name for the new project"), teamId: z.string().optional().describe("Optional team ID to create the project under") },
- src/tools/index.ts:16-37 (registration)Registers the projectTools array (containing project_create) along with other tools to the MCP server via server.tool() calls.export function registerAllTools(server: McpServer) { // Collect all tools const allTools = [ ...databaseTools, ...deploymentTools, ...domainTools, ...projectTools, ...serviceTools, ...tcpProxyTools, ...variableTools, ...configTools, ...volumeTools, ...templateTools, ] as Tool[]; // Register each tool with the server allTools.forEach((tool) => { server.tool( ...tool ); }); }
- Helper method in ProjectService called by the tool handler. Performs the API call to create the project via this.client.projects.createProject and formats the response.async createProject(name: string, teamId?: string): Promise<CallToolResult> { try { const project = await this.client.projects.createProject(name, teamId); return createSuccessResponse({ text: `Created new project "${project.name}" (ID: ${project.id})`, data: project }); } catch (error) { return createErrorResponse(`Error creating project: ${formatError(error)}`); } }