Skip to main content
Glama
thichcode

Matomo MCP Server

by thichcode

matomo_add_user

Add a new user to Matomo Analytics by providing login credentials and email, enabling user management through the Matomo MCP Server.

Instructions

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

Input Schema

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

Implementation Reference

  • Input schema and description for the matomo_add_user tool, registered in ListTools response
    { 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)
    Tool registration in the CallToolRequestHandler switch statement, dispatching to handleAddUser
    case 'matomo_add_user': return await this.handleAddUser(args as { userLogin: string; email: string; password: string; alias?: string });
  • Main handler function for matomo_add_user tool, validates connection and delegates to MatomoApiService
    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 in MatomoApiService: makes API request to 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); }

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