Skip to main content
Glama

project_create

Create a new Railway project to start applications, set up development environments, and 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
NameRequiredDescriptionDefault
nameYesName for the new project
teamIdNoOptional team ID to create the project under

Implementation Reference

  • The execution handler for the 'project_create' tool, which delegates to projectService.createProject with name and optional teamId.
    async ({ name, teamId }) => { return projectService.createProject(name, teamId); }
  • Input schema definition using Zod for validating 'name' (required string) and 'teamId' (optional string).
    { name: z.string().describe("Name for the new project"), teamId: z.string().optional().describe("Optional team ID to create the project under") },
  • Registration of the projectTools array (containing project_create) with the MCP server via server.tool() in a loop over all tools.
    ...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 that calls the repository, handles errors, and formats the success/error 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)}`); } }
  • Core helper implementing the GraphQL mutation for creating a project via Railway API, parsing and normalizing the response.
    async createProject(name: string, teamId?: string): Promise<Project> { const data = await this.client.request<{ projectCreate: Project }>(` mutation projectCreate($name: String!, $teamId: String) { projectCreate( input: { name: $name, teamId: $teamId }) { id name description environments { edges { node { id name } } pageInfo { hasNextPage hasPreviousPage } } services { edges { node { id name } } pageInfo { hasNextPage hasPreviousPage } } } } `, { name, teamId }); return { ...data.projectCreate, environments: data.projectCreate.environments || { edges: [], pageInfo: { hasNextPage: false, hasPreviousPage: false } }, services: data.projectCreate.services || { edges: [], pageInfo: { hasNextPage: false, hasPreviousPage: false } } }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/epitaphe360/railway-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server