Skip to main content
Glama
amoljagtap17

users

by amoljagtap17

typescript-mcp-server

MCP servers for the Portfolio API, served over HTTP by one Express app.

Endpoint

Server

Tools

/users/mcp

users-mcp

get_user_by_email, get_user_by_name

/accounts/mcp

accounts-mcp

get_accounts_by_user_id

/transactions/mcp

transactions-mcp

get_transactions_by_account_id

The tools chain: an email resolves to a user id, which resolves to accounts, whose ids resolve to transactions.

Default port: 4000. VS Code is wired to both in .vscode/mcp.json.

Scripts

Command

Purpose

npm run dev

Run from source with tsx

npm run build

Compile to dist/

npm start

Run the compiled build

npm run typecheck

Type-check without emitting

Related MCP server: HREVN MCP Server

Configuration

Copy .env.example to .env. All variables are declared and validated in src/config.ts; startup fails with a readable message if any are invalid.

Variable

Default

Purpose

NODE_ENV

development

development enables pretty logs

LOG_LEVEL

info

debug/info/warn/error/silent

PORTFOLIO_API_BASE

http://localhost:3000

Base URL of the Portfolio API

Layout

src/
  index.ts               Mounts every MCP server on the Express app
  config.ts              Env vars, loaded and validated once
  logger.ts              pino logger (pretty in development)
  api.ts                 Shared axios client for the Portfolio API
  tool-result.ts         Builds the CallToolResult shape
  servers/
    users/
      index.ts           createUsersServer(): registers the tools
      users.api.ts       API calls that return data
      users.schema.ts    zod schemas for input and output
    accounts/
      index.ts           createAccountsServer()
      accounts.api.ts
      accounts.schema.ts
    transactions/
      index.ts           createTransactionsServer()
      transactions.api.ts
      transactions.schema.ts

Logging

Use the logger from src/logger.ts, which writes to stderr. Avoid console.log: it writes to stdout, which is the JSON-RPC wire if this project is ever switched back to the stdio transport.

Errors

Tool handlers do not need try/catch. The MCP SDK catches anything thrown and returns it as a tool result flagged isError, so an API call can simply throw when there is no match.

Schemas

outputSchema is enforced: the SDK validates structuredContent against it and fails the call on a mismatch — but it discards the parsed value, so any normalising has to happen in the .api.ts file before the data is returned.

json-server returns each primary key as a string ("id": "1") while leaving foreign keys numeric ("userId": 1). The schemas use z.coerce.number() on ids to smooth that over; they still advertise a plain integer. Check a new endpoint with curl rather than trusting db.json — json-server rewrites the ids it loads from there.

Adding a tool

Add the API call to <server>.api.ts, its schemas to <server>.schema.ts, and a server.registerTool(...) block in that server's index.ts.

Adding another MCP server

Create src/servers/<name>/ with the same three files, exporting a create<Name>Server(): McpServer, then add one line to the MCP_SERVERS array in src/index.ts.

Available Tools

2 tools
get_user_by_emailGet user by emailA
Read-onlyIdempotent

Get user information by email. Returns the user's id, name, and email address.

ParametersJSON Schema
NameRequiredDescriptionDefault
emailYesThe email address of the user to retrieve.

Output Schema

ParametersJSON Schema
NameRequiredDescription
idYesThe unique identifier of the user.
nameYesThe name of the user.
emailYesThe email address of the user.

TDQS

A3.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, covering the safety profile. The description adds that the result includes id, name, and email, which is useful behavioral information. It does not mention not-found behavior or case sensitivity, but the annotations lower the burden.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences, front-loaded with the action verb. Every word earns its place, with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple single-parameter read tool with rich annotations and an output schema, the description covers the essential purpose and return shape. It lacks usage guidance, but that is captured under dimension 2. Slightly minimal but sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% description coverage with a clear description for the 'email' parameter, so the description does not need to add much. The description does not go beyond the schema's format/pattern details. Baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Get user information by email', specifying the verb, resource, and lookup method, and lists the returned fields. However, it does not explicitly distinguish this tool from the sibling 'get_user_by_name', so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus the sibling 'get_user_by_name'. The description does not mention alternatives or exclusions, leaving the agent without context for choosing between the two lookup methods.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_user_by_nameGet user by nameA
Read-onlyIdempotent

Get user information by name. Returns the user's id, name, and email address.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the user to retrieve.

Output Schema

ParametersJSON Schema
NameRequiredDescription
idYesThe unique identifier of the user.
nameYesThe name of the user.
emailYesThe email address of the user.

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, openWorld, and idempotent behavior. The description adds that it returns id, name, and email, but since an output schema exists, this is redundant. No additional behavioral context like not-found behavior is provided.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the main purpose. No wasted words; every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read tool with good annotations and an output schema, the description is adequate. It could be more complete by mentioning when to use this over get_user_by_email or handling edge cases, but the core is clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% coverage with a description for the 'name' parameter. The tool description repeats the parameter's role without adding syntax or formatting details, so it adds minimal value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Get' and resource 'user information' with a clear lookup key 'by name', which distinguishes it from the sibling tool get_user_by_email. The return fields are stated, making the purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when you have a name to look up, but it doesn't explicitly contrast with get_user_by_email or state when not to use this tool. No alternatives are mentioned, so usage guidance is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.0.0
    • First observedget_user_by_email
    • First observedget_user_by_name

TDQS

A3.7/5.0
Disambiguation5/5

The two tools are clearly distinguished by their lookup parameter: email vs. name. Descriptions explicitly state each input, so an agent can confidently select the appropriate tool without ambiguity.

Naming Consistency5/5

Both tools follow the same verb_noun_by_attribute pattern (get_user_by_...). This is consistent and predictable, making it easy to infer behavior from the name.

Tool Count3/5

With only 2 tools, the server feels thin, but the scope may be intentionally limited to user lookup. It is not as extreme as having a single trivial tool, so it sits at the borderline.

Completeness2/5

The server only provides read operations for users. There are no create, update, delete, or list endpoints, which are essential for a 'users' domain. This is a significant functional gap that will hinder agents needing full user lifecycle management.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A simple MCP server that exposes a createUser tool to add users to a local JSON file via stdio transport.
    152
    1
    MIT
  • F
    license
    C
    quality
    B
    maintenance
    Schema-driven MCP server that exposes all Paperclip API operations as typed MCP tools over stdio or Streamable HTTP, supporting both authenticated and local_mode deployments.
    100
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    A minimal demo MCP server exposing user management tools (list, get, create, update, delete users) over both stdio and HTTP/SSE transports, wrapping an Express REST API to illustrate local vs remote MCP connectivity.
    -

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/amoljagtap17/2026-typescript-mcp-server'

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