()
| 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 | |
| 72 | const LogPushScopes = { |
nothing calls this directly
no test coverage detected