# calculator-tool **Repository Path**: mcp-office/calculator-tool ## Basic Information - **Project Name**: calculator-tool - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-06-12 - **Last Updated**: 2025-06-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MCP ## 添加MCP服务器信息 https://mp.weixin.qq.com/s/IB8_4MJjeHREe5wXw57C2w ```json { "mcpServers": { "calculator": { "command": "npx", "args": ["mcp-remote", "http://localhost:8080/sse"] } } } ``` ## 1. 获取配置 ```json { "jsonrpc": "2.0", "method": "mcp.getConfig", "params": {"group": "mygroup", "resource": "myresource", "version": "v1.0.0"}, "id": "1" } ``` ```shell curl -X POST http://localhost:8080/rpc \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"mcp.getConfig","params":{"group":"mygroup","resource":"myresource","version":"v1.0.0"},"id":"1"}' ``` ## 2. 更新配置 ```json { "jsonrpc": "2.0", "method": "mcp.updateConfig", "params": {"group": "mygroup", "resource": "myresource", "content": "{\"key\": \"value\"}"}, "id": "2" } ``` ```shell curl -X POST http://localhost:8080/rpc \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"mcp.updateConfig","params":{"group":"mygroup","resource":"myresource","content":"{\"key\": \"value\"}"},"id":"2"}' ``` ## 3. 列出所有组 ```json { "jsonrpc": "2.0", "method": "mcp.listGroups", "params": {}, "id": "3" } ``` ```shell curl -X POST http://localhost:8080/rpc \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"mcp.listGroups","params":{},"id":"3"}' ``` ## 4. 列出组内资源 ```json { "jsonrpc": "2.0", "method": "mcp.listResources", "params": {"group": "mygroup"}, "id": "4" } ``` ```shell curl -X POST http://localhost:8080/rpc \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"mcp.listResources","params":{"group":"mygroup"},"id":"4"}' ```