Skip to content

Commit 81fd7c1

Browse files
bingggclaude
andcommitted
📝 优化 MCP 服务器配置与文档
- 为 createCloudBaseMcpServer 函数添加详细的 JSDoc 文档和使用示例 - 在 tsconfig.json 中添加 allowSyntheticDefaultImports 配置 - 大幅优化 webpack 配置,扩展外部依赖白名单以支持更多第三方包的打包 - 改进依赖管理策略,平衡打包体积与运行时稳定性 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent bd603ca commit 81fd7c1

2 files changed

Lines changed: 654 additions & 25 deletions

File tree

mcp/src/server.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,21 @@ export interface ExtendedMcpServer extends McpServer {
7272
* Create and configure a CloudBase MCP Server instance
7373
* @param options Server configuration options
7474
* @returns Configured McpServer instance
75+
*
76+
* @example
77+
* import { createCloudBaseMcpServer } from "@cloudbase/mcp-server";
78+
* import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
79+
*
80+
* const server = createCloudBaseMcpServer({ cloudBaseOptions: {
81+
* envId, // 环境ID
82+
* secretId, // 腾讯云密钥ID
83+
* secretKey, // 腾讯云密钥
84+
* region, // 地域,默认是 ap-shanghai
85+
* token // 临时密钥,有有效期限制,生成密钥时可控制
86+
* } });
87+
*
88+
* const transport = new StdioServerTransport();
89+
* await server.connect(transport);
7590
*/
7691
export function createCloudBaseMcpServer(options?: {
7792
name?: string;

0 commit comments

Comments
 (0)