typescript-mcp-server-demo
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
typescript-mcp-server-demo
Node.js / TypeScript MCP-style tool server skeleton for startups wiring agent tools. Exposes list_tools + call_tool (JSON-RPC 2.0) over stdio or HTTP JSON. No API keys required — tools are local stubs suitable for demos and integration tests.
Why this shape
Concern | Approach in this repo |
Discovery | list_tools / tools/list returns name, description, JSON Schema |
Invocation | call_tool / tools/call with name + arguments |
Transport | MCP_TRANSPORT=stdio (default) or http |
Startup fit | HTTP for Postman / gateways; stdio for local agent hosts |
Safety | Fake CRM only; no secrets committed |
Protocol-light on purpose: integrate a tool plane without locking to one MCP SDK version. Swap handlers for real CRM / billing / support APIs when you harden.
Related MCP server: wazza-mcp-test-server
Tools
Name | Purpose |
echo | Connectivity check — returns message |
get_time | Current server time (UTC ISO-8601) |
fake_crm_lookup | In-memory customer lookup by customerId or email |
Demo CRM ids: cust_1001, cust_1002, cust_1003.
Architecture
Client (agent / IDE)
|
|- stdio: one JSON-RPC object per line on stdin -> stdout
|- HTTP: /health /tools /rpc /tools/call
|
v
handleRequest() -> ToolRegistry -> echo | get_time | fake_crm_lookupRequirements
Node.js 18+
package manager compatible with the lockfile-free package.json in this repo
Setup
Install dependencies, optionally copy the env example file, then build TypeScript to dist/. Scripts are defined in package.json: build, start, start:http, start:stdio, dev, dev:http, test.
Run
Set MCP_TRANSPORT to http (port via MCP_PORT, default 3100) or stdio (default).
HTTP routes:
GET /health — liveness
GET /tools — list_tools shortcut
POST /rpc — full JSON-RPC body
POST /tools/call — body with name and arguments
Example tools/call body:
{"name":"echo","arguments":{"message":"hello"}}
Example JSON-RPC call_tool:
{"jsonrpc":"2.0","id":1,"method":"call_tool","params":{"name":"fake_crm_lookup","arguments":{"customerId":"cust_1001"}}}
Test
Run the package.json test script. Uses Node built-in test runner (node:test) via tsx.
Config
Variable | Default | Notes |
MCP_TRANSPORT | stdio | stdio or http |
MCP_HOST | 127.0.0.1 | HTTP bind host |
MCP_PORT | 3100 | HTTP port |
MCP_SERVER_NAME | typescript-mcp-server-demo | Log / health label |
See .env.example.
Project layout
src/
index.ts
server.ts
types.ts
tools/ (echo, get-time, fake-crm-lookup, index)
transports/ (stdio, http)
tests/
tools.test.ts
server.test.tsIntegrating into a startup agent stack
Discover tools at boot (GET /tools or list_tools) and cache schemas for the LLM tool-calling layer.
Call tools from your agent loop with structured arguments; surface content[].text to the model and data to your app layer.
Replace fake_crm_lookup with a real CRM client behind the same RegisteredTool interface — keep names/schemas stable for prompts.
Lock down HTTP with authn/authz and network policy before production; prefer stdio or private mesh for privileged tools.
Graduate to a full MCP SDK transport when you need resources/prompts/sampling; this skeleton stays focused on the tool plane.
License
MIT — see LICENSE.
Author: tanvir-ux
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Toolstile is a managed MCP gateway that connects remote MCP servers behind one endpoint, with per-agent permissions, shared accounts and activity logs. Connect at https://mcp.toolstile.com/mcp over Streamable HTTP with OAuth; sign in at https://toolstile.com, select a workspace and connect your upstream servers. Available tools, resources and prompts depend on that workspace and the agent's granted access.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceExposes all CLI commands as MCP tools over stdio or HTTP transport.11 npmApache 2.0
- FlicenseNot gradedqualityDmaintenanceA simple HTTP server to validate MCP infrastructure for the Wazza MCP client, exposing endpoints for tool discovery and calling.-
- AlicenseNot gradedqualityAmaintenanceMinimal MCP server allowing Python functions to be served as MCP tools over stdio or HTTP, with a built-in client for connecting to MCP servers.135 PyPI2Apache 2.0
- FlicenseAqualityCmaintenanceEnables exposing custom tools such as dice rolling and integer addition as MCP servers over stdio and HTTP transports.2-