Skip to main content
Glama

Postman MCP Generator

by ramborau
open-postman.js751 B
import fs from 'fs'; import path from 'path'; import dotenv from 'dotenv'; const baseUrl = 'https://go.postman.co/redirect/workspace?recentlyVisited=true&dest=mcpRequest'; function constructUrl() { const mcpServerPath = path.resolve(process.cwd(), 'mcpServer.js'); const command = `node ${mcpServerPath}`; const envPath = path.join(process.cwd(), '.env'); const envVars = fs.existsSync(envPath) ? dotenv.parse(fs.readFileSync(envPath)) : {}; const params = new URLSearchParams({ command }); Object.keys(envVars).forEach(key => { params.append('env', key); }); return `${baseUrl}&${params.toString()}`; } import('open').then(open => { const url = constructUrl(); open.default(url); });

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/ramborau/botpe-mcp-2'

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