Skip to main content
Glama
sp-acc

my-mcp-server

by sp-acc

my-mcp-server

A playground and experimentation project for building an MCP (Model Context Protocol) server using TypeScript. It demonstrates how to expose tools and resources to AI agents and language models via the stdio transport.

The server manages a simple user database (backed by a local JSON file) and exposes endpoints that an AI agent can call to read or create user records.


Features

  • Tool — my-create-tool: Creates a new user by accepting name, address, email, and phone fields and persisting the record to src/users.json.

  • Resource — users://all: Returns the full list of users from the mock database as JSON.

  • Resource — users://{userId}/profile: Returns the profile of a single user identified by userId.


Related MCP server: FastMCP Example Server

Prerequisites


Installation

npm install

Running the Server

Development mode (using tsx, no build step)

npm run server:dev

Build & run compiled output

npm run server:build   # compiles TypeScript → JavaScript
node dist/server.js    # run the compiled server

Watch mode (auto-recompile on changes)

npm run server:build:watch

Inspect with MCP Inspector UI

The MCP Inspector lets you interactively call tools and browse resources in a browser UI:

npm run server:inspect

Note: server:inspect sets DANGEROUSLY_OMIT_AUTH=true — use this only for local development.


Loading the MCP Server in Agent Environments

Agent CLI (e.g. Claude Code CLI)

Existence of .mcp.json should be picked up by the agent and prompted to load the server. Otherwise it's a simple MCP server config that needs to be added to the configuration with other servers.


Project Structure

my-mcp-server/
├── src/
│   ├── server.ts      # MCP server entry point (tools & resources)
│   └── users.json     # Mock user database (read/written at runtime)
├── package.json
└── tsconfig.json

Tech Stack

Package

Role

@modelcontextprotocol/sdk

MCP server SDK (tools, resources, stdio transport)

zod

Input schema validation for tools

tsx

Run TypeScript directly without a build step

typescript

TypeScript compiler

@modelcontextprotocol/inspector

Browser-based MCP debug UI


License

ISC

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

  • MCP server for AI dialogue using various LLM models via AceDataCloud

View all MCP Connectors

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/sp-acc/my-mcp-server'

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