Skip to main content
Glama
thichcode

Matomo MCP Server

by thichcode

matomo_add_user

Add a new user to Matomo Analytics by specifying login name, email, password, and optional alias. Facilitates user management through the Matomo MCP Server.

Instructions

Thêm một user mới vào Matomo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasNoBí danh của user (tùy chọn)
emailYesEmail của user
passwordYesMật khẩu của user
userLoginYesTên đăng nhập của user

Implementation Reference

  • Input schema and tool definition for 'matomo_add_user' in the list of tools returned by ListToolsRequestSchema.
    { name: 'matomo_add_user', description: 'Thêm một user mới vào Matomo', inputSchema: { type: 'object', properties: { userLogin: { type: 'string', description: 'Tên đăng nhập của user', }, email: { type: 'string', description: 'Email của user', }, password: { type: 'string', description: 'Mật khẩu của user', }, alias: { type: 'string', description: 'Bí danh của user (tùy chọn)', }, }, required: ['userLogin', 'email', 'password'], }, },
  • src/index.ts:268-269 (registration)
    Dispatch case in CallToolRequestSchema handler that routes to the tool's handler function.
    case 'matomo_add_user': return await this.handleAddUser(args as { userLogin: string; email: string; password: string; alias?: string });
  • MCP tool handler function that validates connection and delegates to MatomoApiService.addUser.
    private async handleAddUser(args: { userLogin: string; email: string; password: string; alias?: string }) { if (!this.matomoService) { throw new Error('Chưa kết nối đến Matomo. Vui lòng sử dụng matomo_connect trước.'); } await this.matomoService.addUser(args.userLogin, args.email, args.password, args.alias); return { content: [ { type: 'text', text: `Đã thêm user thành công: ${args.userLogin}`, }, ], };
  • Core implementation that makes the API request to Matomo's UsersManager.addUser endpoint.
    async addUser(userLogin: string, email: string, password: string, alias?: string): Promise<void> { const params: any = { userLogin, email, password }; if (alias) params.alias = alias; await this.makeRequest('UsersManager.addUser', params); }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thichcode/matomo_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server