Skip to main content
Glama

Notion ReadOnly MCP Server

by Taewoong1378
start-server.ts898 B
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js' import path from 'node:path' import { fileURLToPath } from 'url' import { initProxy, ValidationError } from '../src/init-server' export async function startServer(args: string[] = process.argv.slice(2)) { const filename = fileURLToPath(import.meta.url) const directory = path.dirname(filename) const specPath = path.resolve(directory, '../scripts/notion-openapi.json') const baseUrl = process.env.BASE_URL ?? undefined const proxy = await initProxy(specPath, baseUrl) await proxy.connect(new StdioServerTransport()) return proxy.getServer() } startServer().catch(error => { if (error instanceof ValidationError) { console.error('Invalid OpenAPI 3.1 specification:') error.errors.forEach(err => console.error(err)) } else { console.error('Error:', 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/Taewoong1378/notion-readonly-mcp-server'

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