Skip to main content
Glama
User Management MCP Server

User Management MCP Server

Model Context Protocol (MCP) Learning Notes

Video Reference

Related MCP server: MCP PostgreSQL Server

What is MCP?

Model Context Protocol (MCP) is a protocol that defines how a client (such as an LLM) can communicate and use tools and resources defined at the server level. It implements a client-server architecture with the following components:

  • Tools

  • Resources

  • Prompts

  • Samplings

Documentation & Resources

Implementation Details

Server Setup

The src/server.ts file contains the code for creating an MCP server and defining tools, resources, and prompts.

Testing the Implementation

  1. Build the server:

    npm run server:build
  2. Add to VS Code using the "Add MCP server" command

  3. Access server functionality in the Copilot chat UI

  4. Use "#" followed by tool name to access implemented tools

Viewing the implemented tools

Client Implementation

Note: to use the query and prompts from the client you will need a gemini ai api key, you can add this in the .env file

The src/client.ts file provides a CLI client for interacting with the MCP server. It connects to the server, lists available tools, resources, and prompts, and allows you to:

  • Query the LLM directly

  • Run tools (with parameter input)

  • Access resources (with dynamic URI parameters)

  • Use prompts (with argument input)

How it works

  1. Connects to the MCP server using a transport layer.

  2. Fetches available tools, resources, prompts, and resource templates.

  3. Presents a menu for the user to select an action: Query, Tools, Resources, or Prompts.

  4. Handles each action:

    • Query: Sends a prompt to the LLM and optionally invokes tools.

    • Tools: Lets you select and run a tool, entering parameters as needed.

    • Resources: Lets you select a resource or template, entering URI parameters if required, and displays the result.

    • Prompts: Lets you select a prompt, enter arguments, and view the generated output.

  5. For prompts, you can choose to run the generated text through the LLM for further results.

Example Usage

When you run the client, you'll see a menu:

What would you like to do
❯ Query
  Tools
  Resources
  Prompts

Selecting an option will guide you through the available features interactively.

Resources

  • users: Retrieves all users from the JSON file

  • user-details: Retrieves user details by ID

Tools

  • create-user: Creates a new user with the following parameters:

    • username

    • email

    • address

    • age

    • phone number

  • create-random-user: Generates and creates a random user

Prompts

  • generate-fake-user: Prompt with fixed fields for generating fake user data

Sampling

  • create-random-user: This uses sampling i.e. calling requests on the LLM or clientto generate something.

Available Tools

2 tools
create-random-userA

Create a random user with fake data

Inputs: no named parameters.

create-userC

Create a new user in the system

Inputs: name (required), email (required), address (required), age (required), +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 2 tools

    Disambiguation1/5

    The two tools have highly overlapping purposes: both create users. 'create-random-user' and 'create-user' differ only in the data source (fake vs. system), which is a subtle distinction that agents will likely confuse. This is a classic case of ambiguous tool boundaries.

    Naming Consistency5/5

    Both tools follow a consistent verb_noun pattern with hyphen-separated names. 'create-random-user' and 'create-user' are perfectly aligned in naming style, making them predictable and readable.

    Tool Count2/5

    With only 2 tools, the server feels severely under-scoped for a 'User Management' domain. A user management system typically requires at least CRUD operations (create, read, update, delete) and possibly list/search tools. This minimal set is inadequate for the implied purpose.

    Completeness1/5

    The tool surface is extremely incomplete for user management. There are no tools to retrieve, update, delete, or list users, creating significant gaps that will cause agent failures. Agents cannot perform basic user management workflows beyond creation.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables performing PostgreSQL database operations (create, read, update, delete) on User and Post entities through MCP tools.
      432 npm
      MIT
    • A
      license
      C
      quality
      D
      maintenance
      A testing server that demonstrates Model Context Protocol features, providing access to user data, todos, and system information through resources, tools for user management and calculations, and prompt templates for various analyses.
      4
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that enables LLMs to interact with user and task data through JSON-RPC, offering tools like user management, task creation, and search functionality.
      8
      6 npm
      ISC