
Example App
- 2 repo stars
- Updated July 22, 2026
- mctx-ai/example-app
Example App is an MCP server that provides a hosted reference implementation of a complete mctx-ai framework application over remote SSE.
About
Example App is mctx-ai’s end-to-end reference application exposed as a hosted MCP remote so developers can see how a real product wraps framework primitives, SSE transport, and agent-callable surfaces. Use it in the Build phase when you already validated an agent or SaaS idea and need a concrete map of folders, server boundaries, and integration points instead of starting from an empty repo. The listing is explicitly framed as study-or-fork material, which suits indies who learn by tracing working code in Claude Code or Cursor. It is not a production template with your domain logic, billing, or compliance baked in—swap those in after you understand the skeleton. Treat Example MCP Server as the smaller server-only counterpart when you only need protocol wiring without a full app shell.
- Complete reference app on the mctx-ai framework—intended to study or fork
- Remote MCP exposure v1.3.4 over SSE at example-app.mctx.ai
- Covers @mcp-related patterns called out in the publisher description
- Open GitHub repo example-app for local diff and customization
Example App by the numbers
- Data as of Jul 23, 2026 (Skillselion catalog sync)
claude mcp add --transport sse example-app https://example-app.mctx.ai/v1.3.4Add your badge
Show developers this MCP server is listed on Skillselion. Paste this into your README.
| repo stars | ★ 2 |
|---|---|
| Transport | SSE |
| Auth | None |
| Last updated | July 22, 2026 |
| Repository | mctx-ai/example-app ↗ |
What it does
Fork or study mctx-ai’s reference app to see how a full MCP-backed application is structured before you ship your own agent-facing product.
Who is it for?
Best when you're shipping your first MCP-native SaaS or internal agent tool and want a full-app reference before customizing domain logic.
Skip if: Skip if you only need a minimal stdio MCP script with no web app or hosted remote topology.
What you get
After registering the remote or cloning the repo, you have a working pattern to fork for your own MCP-backed app and faster agent-tool integration.
- Inspectable full-app architecture on GitHub
- Hosted remote endpoint for live tool discovery (v1.3.4)
- Forkable baseline for your MCP SaaS or agent surface
By the numbers
- Server version 1.3.4
- Repository: github.com/mctx-ai/example-app
- Transport: remote SSE
README.md

Example MCP Server
mctx — The best way to Build an MCP Server
The comprehensive reference implementation for @mctx-ai/mcp. Every framework capability in one well-commented file — clone it, study it, fork it as a template for your own MCP server.
What This Example Demonstrates
src/index.ts covers every pattern the framework supports:
Tool Patterns
- Sync string return —
greet: receives args, returns a formatted string; demonstrates environment variable configuration viaGREETING - Object return —
calculate: returns a structured result object (auto-serialized to JSON); demonstrates input validation and error throwing - Progress notifications —
analyze: emits progress viares.progress(current, total); demonstrates streaming updates during long-running operations - LLM sampling —
smart-answer: delegates to the client's LLM viares.ask; demonstrates graceful fallback when sampling is unavailable - User identity via context —
whoami: readsmctx.userId, the stable mctx user ID injected server-side by the platform; demonstrates graceful degradation outside mctx
Resource Patterns
- Static URI —
docs://readme: exact URI, no parameters, returns plain text - Dynamic URI template —
user://{userId}: extractsuserIdfrom the URI path, returns a JSON profile
Prompt Patterns
- Single-message —
code-review: returns a plain string that becomes one user message - Multi-message conversation —
debug: usesconversation()to build structured user/assistant dialogue
Infrastructure
- Tool annotation hints — every tool sets
readOnlyHint,destructiveHint,openWorldHint, andidempotentHintwith inline rationale explaining each choice - Structured logging —
log.info,log.debug,log.warning,log.error, andlog.noticethroughout - Environment variable configuration — reads
process.env.GREETINGlazily inside the handler (not at module scope) - Comprehensive test coverage —
src/index.test.tstests every tool, resource, and prompt via JSON-RPC 2.0 requests
Usage in Conversation
Once connected to an MCP client, try phrases like these:
Greetings and identity
- "Greet Alice" — calls
greetwithname: "Alice" - "Who am I?" — calls
whoamito return your stable mctx user ID - "Greet the whole team" — calls
greetin a loop for each name
Math and analysis
- "What is 6 times 7?" — calls
calculatewithoperation: "multiply" - "Divide 10 by 0" — triggers the division-by-zero error path
- "Analyze quantum computing" — calls
analyzeand streams three progress phases
Q&A and LLM sampling
- "What is the capital of France?" — calls
smart-answer, which delegates to the client's LLM viaask - "Ask anything" — routes arbitrary questions through
smart-answer
Resources
- "Read the server docs" — reads
docs://readme - "Look up user 42" — reads
user://42
Prompts
- "Review my code" — invokes the
code-reviewprompt with a code snippet - "Help me debug this stack trace" — invokes the
debugprompt with an error and optional context
Example Responses
greet(name: "Alice")
→ "Hello, Alice!"
whoami()
→ "Your mctx user ID is: user_abc123. This ID is stable across all your devices and sessions."
calculate(operation: "multiply", a: 6, b: 7)
→ { "operation": "multiply", "a": 6, "b": 7, "result": 42 }
analyze(topic: "quantum computing")
→ [progress: 1/3] → [progress: 2/3] → [progress: 3/3]
→ "Analysis of "quantum computing" complete. Found 42 insights across 7 categories."
smart-answer(question: "What is the capital of France?")
→ "Question: What is the capital of France?\n\nAnswer: Paris."
Read URI: docs://readme
→ "Welcome to the example MCP server built with @mctx-ai/mcp..."
Read URI: user://42
→ { "id": "42", "name": "User 42", "joined": "2024-01-01", "role": "developer" }
code-review(code: "const x = eval(input)", language: "javascript")
→ "Please review this javascript for bugs, security issues, and improvements:..."
debug(error: "TypeError: Cannot read properties of undefined")
→ [user] "I'm seeing this error: TypeError: Cannot read..."
→ [assistant] "I will analyze the error and provide step-by-step debugging guidance."
Getting Started
Using as a Template
This repo is a GitHub template. Click Use this template on GitHub, then:
1. Clone your new repo
git clone https://github.com/your-username/your-repo.git
cd your-repo
2. Run the setup script
./setup.sh
setup.sh prompts for a project name and description, asks whether to keep the example code or start from a minimal skeleton, updates package.json, rewrites README.md with a clean starting point, installs dependencies, creates an initial git commit, and deletes itself.
3. Start developing
npm run dev
If you kept the examples, src/index.ts is unchanged — study the patterns and modify from there. If you started empty, you get a minimal skeleton with a single hello tool to build from.
Development Commands
Build
npm run build
Bundles src/index.ts to dist/index.js using esbuild (minified ESM output).
Dev server
npm run dev
# Test environment variables during dev:
GREETING="Howdy" npm run dev
Runs parallel watch mode: esbuild rebuilds on source changes, mctx-dev hot-reloads the server on rebuild.
Testing
npm test # Run all tests
npm test -- --watch # Watch mode
npm test src/index.test.ts # Specific file
npm test -- -t "greet" # Pattern match
Linting and formatting
npm run lint
npm run format
npm run format:check
Environment Variables
GREETING — Customizes the greeting in the greet tool (default: "Hello"). Set GREETING="Howdy" to get "Howdy, Alice!".
Project Structure
src/index.ts → Server implementation — all capabilities in one file
├─ Tools → greet, whoami, calculate, analyze, smart-answer
├─ Resources → docs://readme (static), user://{userId} (dynamic)
├─ Prompts → code-review (single-message), debug (multi-message)
└─ Export → fetch handler for JSON-RPC 2.0 over HTTP
src/index.test.ts → Tests for every tool, resource, and prompt
dist/index.js → Bundled output (generated by esbuild, not committed on main)
Deployment Model
mctx does not run build commands. It serves dist/index.js from the release branch — no npm run build at deploy time.
dist/ is gitignored on main. The release pipeline (.github/workflows/release.yml) builds dist/index.js from source and commits it to release automatically. Source-only on main; built output on release.
Deployment trigger: mctx watches for version changes in package.json on the release branch. A version bump triggers a new deployment. A push with no version bump does not trigger deployment.
Conventional commits determine the version bump:
| Commit prefix | Bump |
|---|---|
feat!: or fix!: |
Major |
feat: |
Minor |
| Everything else | Patch |
This repo uses squash merging — PR title becomes the commit subject, so PR titles must follow conventional commit format.
Do not edit the release branch directly. Do not commit dist/index.js on main.
Making Your MCP Server Discoverable
Three package.json fields and README.md determine how developers find your MCP server.
description— Appears in the MCP Community Registry (truncates at ~100–150 chars) and on your mctx.ai page. Front-load the most important information.homepage— Clickable link on your public mctx.ai page. Point it at your GitHub repo or docs site.README.md— Becomes the documentation on your mctx.ai page and is indexed by Context7 for AI assistant discovery. Lead with what the MCP server does; the first ~4,000 characters are what AI assistants use to understand and recommend it.
Learn More
@mctx-ai/mcp— Framework documentation and API reference- docs.mctx.ai — Platform guides for deploying and managing your MCP servers
- mctx.ai — Host your MCP server for free
- MCP Specification — The protocol spec this MCP server implements
Recommended MCP Servers
How it compares
Full-stack reference app MCP, not a single-purpose integration like Bible study or a bare example server only.
FAQ
Who is io.github.mctx-ai/example-app for?
Developers learning the mctx-ai app framework and MCP remotes who want a complete example to read, run, or fork—not just protocol stubs.
When should I use io.github.mctx-ai/example-app?
Use it during Build when you are structuring your agent product, wiring SSE remotes, and aligning your repo with proven @mcp patterns.
How do I add io.github.mctx-ai/example-app to my agent?
Add the remote MCP server URL for example-app.mctx.ai (v1.3.4) in your agent config, or clone github.com/mctx-ai/example-app and run or deploy per the repo README alongside local MCP settings.