Skip to main content
Glama

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
NameRequiredDescriptionDefault
nameYesName for the new project
teamIdNoOptional team ID to create the project under

Implementation Reference

  • 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);
      }
    ),
  • 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")
    },
  • 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)}`);
      }
    }

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