Skip to main content
Glama

Model Context Protocol Server

by hyen43
index.js1.59 kB
#!/usr/bin/env node import { Command } from "commander"; import { createProject } from "./project/create.js"; import { addTool } from "./project/add-tool.js"; import { addPrompt } from "./project/add-prompt.js"; import { addResource } from "./project/add-resource.js"; import { buildFramework } from "./framework/build.js"; const program = new Command(); program .name("mcp") .description("CLI for managing MCP server projects") .version("0.2.2"); program .command("build") .description("Build the MCP project") .action(buildFramework); program .command("create") .description("Create a new MCP server project") .argument("[name]", "project name") .option("--http", "use HTTP transport instead of default stdio") .option("--cors", "enable CORS with wildcard (*) access") .option("--port <number>", "specify HTTP port (only valid with --http)", (val) => parseInt(val, 10)) .option("--no-install", "skip npm install and build steps") .option("--no-example", "skip creating example tool") .action(createProject); program .command("add") .description("Add a new component to your MCP server") .addCommand(new Command("tool") .description("Add a new tool") .argument("[name]", "tool name") .action(addTool)) .addCommand(new Command("prompt") .description("Add a new prompt") .argument("[name]", "prompt name") .action(addPrompt)) .addCommand(new Command("resource") .description("Add a new resource") .argument("[name]", "resource name") .action(addResource)); program.parse();

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/hyen43/mcpServer'

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