Provides 8 MCP tools for Confluence Cloud: - confluence_list_spaces, confluence_create_space - confluence_search, confluence_get_page - confluence_create_page, confluence_update_page - confluence_get_comments, confluence_add_comment Uses Confluence REST API v2 with basic auth. Registered in Claude Code and mcp-proxy. Refs: CF-935 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
655 B
JavaScript
28 lines
655 B
JavaScript
// src/adapter/bun/conninfo.ts
|
|
import { getBunServer } from "./server.js";
|
|
var getConnInfo = (c) => {
|
|
const server = getBunServer(c);
|
|
if (!server) {
|
|
throw new TypeError("env has to include the 2nd argument of fetch.");
|
|
}
|
|
if (typeof server.requestIP !== "function") {
|
|
throw new TypeError("server.requestIP is not a function.");
|
|
}
|
|
const info = server.requestIP(c.req.raw);
|
|
if (!info) {
|
|
return {
|
|
remote: {}
|
|
};
|
|
}
|
|
return {
|
|
remote: {
|
|
address: info.address,
|
|
addressType: info.family === "IPv6" || info.family === "IPv4" ? info.family : void 0,
|
|
port: info.port
|
|
}
|
|
};
|
|
};
|
|
export {
|
|
getConnInfo
|
|
};
|