Skip to main content
Glama

Tiptap Collaboration MCP Server

by trainual
index.ts1.42 kB
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import server, { setApiToken, setBaseUrl } from './server.js'; async function main() { const args = process.argv.slice(2); let apiToken: string | undefined; let baseUrl: string | undefined; // Look for API_TOKEN argument const tokenIndex = args.findIndex((arg) => arg === 'API_TOKEN'); if (tokenIndex !== -1 && tokenIndex + 1 < args.length) { apiToken = args[tokenIndex + 1]; } // Look for BASE_URL argument const baseUrlIndex = args.findIndex((arg) => arg === 'BASE_URL'); if (baseUrlIndex !== -1 && baseUrlIndex + 1 < args.length) { baseUrl = args[baseUrlIndex + 1]; } // Set the API token in the server if provided if (apiToken) { setApiToken(apiToken); } else { console.error('Warning: No API_TOKEN provided. Some operations may fail.'); } // Set the base URL in the server - required if (baseUrl) { setBaseUrl(baseUrl); } else { console.error( 'Error: BASE_URL is required. Please provide BASE_URL argument.' ); console.error( 'Usage: node build/index.js API_TOKEN <token> BASE_URL <url>' ); process.exit(1); } const transport = new StdioServerTransport(); console.warn('Starting server...'); await server.connect(transport); } main().catch((error) => { console.error('Fatal error in main():', error); process.exit(1); });

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/trainual/tiptap-collaboration-mcp'

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