Skip to main content
Glama
jhanglim

Mattermost MCP Server

by jhanglim

search_users

Find Mattermost users by name, username, or nickname to identify team members and manage user interactions within the platform.

Instructions

사용자를 이름, username, 닉네임으로 검색합니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_termYes검색할 이름, username 또는 닉네임

Implementation Reference

  • MCP tool handler for 'search_users': extracts search_term argument, calls MattermostClient.searchUsers, formats users list with id, username, name, nickname, and returns as JSON.
    case "search_users": { const searchTerm = args.search_term as string; const users = await client.searchUsers(searchTerm); return { content: [ { type: "text", text: JSON.stringify({ total_count: users.length, users: users.map(u => ({ id: u.id, username: u.username, name: `${u.first_name} ${u.last_name}`.trim() || u.nickname, nickname: u.nickname, })), }, null, 2), }, ], }; }
  • Core implementation of searchUsers in MattermostClient class: makes POST request to /users/search API endpoint with term and allow_inactive=false.
    async searchUsers(term: string): Promise<MattermostUser[]> { return await this.request("/users/search", { method: "POST", body: JSON.stringify({ term, allow_inactive: false, }), }) as MattermostUser[]; }
  • src/index.ts:243-256 (registration)
    Tool registration in ListToolsRequestSchema handler, including name, description, and inputSchema for search_term.
    { name: "search_users", description: "사용자를 이름, username, 닉네임으로 검색합니다.", inputSchema: { type: "object", properties: { search_term: { type: "string", description: "검색할 이름, username 또는 닉네임", }, }, required: ["search_term"], }, },
  • TypeScript interface defining the MattermostUser type used in searchUsers response.
    interface MattermostUser { id: string; username: string; first_name: string; last_name: string; nickname: string; email?: string; }

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/jhanglim/mattermost-mcp-server'

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