learn-mcp
Click on "Install 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., "@learn-mcpCreate a user named John with email john@example.com"
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.
learn-mcp
A learning MCP (Model Context Protocol) project built with the official TypeScript SDK. It contains both:
a server (
src/index.ts) that exposes tools, resources, prompts, and sampling to AI clients like Cursor, anda CLI client (
src/client.ts) that connects to the server and lets you interact with those capabilities from the terminal, including LLM-powered queries via the Vercel AI SDK.
Data is stored in a local JSON file (src/data/users.json) — no external database required.
Features
Tools
Tool | Description |
| Create a user with |
| Uses MCP sampling to ask the client's AI to generate a fake user, then saves it |
Resources
Resource | URI | Description |
|
| All users (static resource) |
|
| Single user by ID (resource template) |
Prompts
Prompt | Args | Description |
|
| Returns a message template asking the AI to generate a fake user for a given name |
Related MCP server: simple_mcp
Prerequisites
Node.js 18+
npm
Getting started
# Install dependencies
npm install
# Build TypeScript (optional — Cursor config uses tsx directly)
npm run buildScripts
Command | Description |
| Compile TypeScript to |
| Recompile on file changes |
| Run compiled server ( |
| Run server via tsx (development) |
| Run with tsx watch mode |
| Open MCP Inspector in the browser |
| Run the CLI client ( |
Cursor setup
This project includes .cursor/mcp.json:
{
"mcpServers": {
"learn-mcp": {
"type": "stdio",
"command": "npx",
"args": ["tsx", "src/index.ts"],
"cwd": "${workspaceFolder}"
}
}
}After opening the project in Cursor:
Go to Settings → MCP and confirm
learn-mcpis connectedUse Agent mode to invoke tools and read resources
Reload the window if the server doesn't appear (
Ctrl+Shift+P→ "Developer: Reload Window")
Example prompts in Cursor
Create a user named Alice with email alice@example.com, address 42 Oak St, phone 555-1234
Show me all users
Read users://5/profile
Use the generate-fake-name prompt with name "Jared Leto"CLI client
src/client.ts is a standalone MCP client that spawns the server over stdio and gives you an interactive terminal menu. It's a hands-on way to exercise every capability without Cursor or the Inspector.
# Requires GOOGLE_API_KEY in .env for the Query and sampling features
npm run client:devThe menu offers:
Option | What it does |
Query | Runs your natural-language prompt through Gemini ( |
Tools | Pick a tool and fill in its arguments interactively, then see the result |
Resources | Read a static resource or a resource template (prompts you for |
Prompts | Pick a prompt, supply its arguments, and optionally run the generated message through the LLM |
The client also advertises the sampling capability, so server-initiated sampling/createMessage requests (used by create-random-user) are fulfilled locally — with a confirmation prompt before any LLM call runs.
Requires a
GOOGLE_API_KEYin.env. The Query and sampling features call the Google Generative AI API via the Vercel AI SDK.
MCP Inspector
Test tools, resources, and prompts without Cursor:
npm run inspectOpen the URL printed in the terminal (usually http://localhost:6274).
Stdio rule: Never run the server through
npm run devin MCP config — npm prints to stdout and breaks the JSON-RPC transport. Always usetsx src/index.tsornode build/index.jsdirectly.
Project structure
├── .cursor/
│ └── mcp.json # Cursor MCP configuration
├── src/
│ ├── index.ts # Server entry point
│ ├── client.ts # Interactive CLI client
│ └── data/
│ └── users.json # User "database"
├── build/ # Compiled output (gitignored)
├── package.json
├── tsconfig.json
└── README.mdTransport
Uses stdio — the client spawns the server process and communicates over stdin/stdout. This is the standard setup for local MCP servers in Cursor and Claude Desktop.
Sampling note
create-random-user calls sampling/createMessage, which asks the client (not the server) to run an LLM and return generated text. This requires the client to support the sampling capability.
Works when the client implements
sampling/createMessageand the user approves the requestCursor may not fully support sampling yet — if
create-random-userfails withMethod not found, usecreate-userinstead
Development notes
Use
registerTool(),registerResource(), andregisterPrompt()— the older.tool(),.resource(), and.prompt()methods are deprecatedResource templates need a
listcallback for Cursor to discover individual URIsUse
console.error()for debug logs — neverconsole.log()on stdio transport (stdout is reserved for JSON-RPC)McpServerconstructor takes two arguments: server info (name,version) and options (capabilities, etc.)
License
ISC
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/eik-1/local-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server