← Files Velox TriFit API DocsARCHIVED FILE

mcp-server.mjs

538 Bytes · Nov 10, 2026 · 07:03 UTC

↓ Download file

import {createServer} from 'node:http';
import {createDocumentationHandler} from './src/docs-mcp.mjs';

// Local development only. Production uses the guarded Studio deployment.
const handle=await createDocumentationHandler({allowedOrigins:['http://127.0.0.1:4319']});
const server=createServer((req,res)=>{
  if(new URL(req.url,'http://localhost').pathname!=='/mcp'){res.writeHead(404);res.end();return;}
  void handle(req,res);
});
server.listen(4319,'127.0.0.1',()=>console.log('Read-only Velox docs MCP: http://127.0.0.1:4319/mcp'));

SHA-256: fcfc9b64fd81f31f8eb0ff3979c42f5b58b333cab25195cff2c857ebc96d506a