MCPcopy
hub / github.com/cloudflare/mcp-server-cloudflare / init

Method init

apps/logpush/src/logpush.app.ts:50–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48 }
49
50 async init() {
51 // TODO: Probably we'll want to track account tokens usage through an account identifier at some point
52 const props = getProps(this)
53 const userId = props.type === 'user_token' ? props.user.id : undefined
54 const accountManager = new AccountManager(props)
55
56 this.server = new CloudflareMCPServer({
57 userId,
58 wae: this.env.MCP_METRICS,
59 serverInfo: {
60 name: this.env.MCP_SERVER_NAME,
61 version: this.env.MCP_SERVER_VERSION,
62 },
63 accountManager,
64 options: { instructions: accountManager.instructionsSuffix() },
65 })
66
67 // Register Cloudflare Log Push tools
68 registerLogsTools(this)
69 }
70}
71
72const LogPushScopes = {

Callers

nothing calls this directly

Calls 3

instructionsSuffixMethod · 0.95
getPropsFunction · 0.90
registerLogsToolsFunction · 0.90

Tested by

no test coverage detected