users
This server provides read-only, idempotent tools to look up user information from the Portfolio API.
get_user_by_email: Returns a user's
id,name, andemailfor a given email address.get_user_by_name: Returns a user's
id,name, andemailfor a given name (minimum 1 character).
The returned id can be used with downstream tools (e.g., get_accounts_by_user_id) to chain lookups across accounts and transactions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@users find user with id 42"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
typescript-mcp-server
MCP servers for the Portfolio API, served over HTTP by one Express app.
Endpoint | Server | Tools |
|
|
|
|
|
|
|
|
|
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 |
| Run from source with |
| Compile to |
| Run the compiled build |
| 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 |
|
|
|
|
|
|
|
| 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.tsLogging
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 toolsget_user_by_emailGet user by emailARead-onlyIdempotent
Get user information by email. Returns the user's id, name, and email address.
Inputs: email (required). Returns: id, name, email
get_user_by_nameGet user by nameARead-onlyIdempotent
Get user information by name. Returns the user's id, name, and email address.
Inputs: name (required). Returns: id, name, email
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
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.
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.
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.
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
Related MCP Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
MCP server for StyleKit styles, tokens, recipes, lint and repair over stdio or HTTP.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server for interacting with the Supabase platform
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA simple MCP server that exposes a createUser tool to add users to a local JSON file via stdio transport.501 npm1MIT
- AlicenseNot gradedqualityFmaintenanceMinimal stdio MCP server that exposes HREVN compliance and audit tools as structured MCP tools, enabling baseline checks, profile validation, and bundle generation via a managed runtime.39 PyPIMIT
- FlicenseCqualityDmaintenanceSchema-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-
- FlicenseNot gradedqualityDmaintenanceA 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.-