Star
READY TO SHIP v1.0.0 • 6 Native Agent Dialects

Model Context Protocol (MCP) Server Kit (stdio + SSE)

Production-ready Model Context Protocol (MCP) server reference kit supporting stdio transport for local desktop AI agents (Claude Desktop, Cursor, Antigravity) and Server-Sent Events (SSE) HTTP transport for remote microservices. Features strict JSON-RPC 2.0 validation, tool sandboxing, and security boundaries.

{'name': 'TypeScript', 'version': '^5.6', 'registry': 'npm'} {'name': 'Model Context Protocol SDK', 'version': '^1.0.0', 'registry': 'npm'}
$ git clone https://github.com/Umar-444/Techtalks-stack-kits.git
01 / STARTER & ARCHITECTURE
docker compose up -d
File / Subsystem Architecture Role Status
01 docker-compose.yml
Rootless isolated application & database runtime PRE-WIRED
02 starter/app/
Model layer, authorization policies, admin resources RBAC ENFORCED
03 starter/tests/
Pest / PHPUnit architectural and feature test suite AUTOMATED
04 .env.example
Zero plaintext secrets, strict dummy placeholders GITLEAKS READY
02 / NATIVE RULES (6 DIALECTS)
Source: kits/mcp-tools-kit/CLAUDE.md • Token footprint: ~350 tokens
# Model Context Protocol (MCP) Server Kit (stdio + SSE) — Claude Code Guidelines (CLAUDE.md)
# Auto-generated from rules/source/*.md by tools/transpiler.py. Do NOT edit directly.

## Quick Reference & Non-Negotiable Standards
### MCP Architecture and Protocol Standards
> Core specifications for Model Context Protocol servers.

# MCP Architecture and Protocol Standards

## 1. Protocol Conformance
- Always use the official `@modelcontextprotocol/sdk` to implement server logic.
- Declare explicit capabilities during initialization: `tools`, `resources`, `prompts`.
- Adhere strictly to the JSON-RPC 2.0 specification for requests, responses, and error payloads.

## 2. Directory Layout
- **Transports**: `src/transports/` (`stdio.ts`, `sse.ts`).
- **Tools**: `src/tools/` (individual tool definitions with Zod schemas).
- **Resources**: `src/resources/` (dynamic URI-based data providers).
- **Prompts**: `src/prompts/` (reusable prompt templates).

## 3. Never-List
- Never use `eval()` or `new Function()` in tool implementations.
03 / SKILLS & WORKFLOWS
01first-feature
SANDBOXED
02install-and-verify
SANDBOXED
03mcp-security-sandboxing
SANDBOXED
04mcp-tool-authoring
SANDBOXED
05mcp-tools-kit-core
SANDBOXED
06mcp-transport-configuration
SANDBOXED
04 / DESIGN TOKENS & COMPONENTS
Design Token Specification Standard Enforcement
color.brand #e85d26 (Orange status accent) Status lights, active tabs, focus rings, primary CTA
color.surface.dark #0A0A0B (Base) • #131316 (Raised) • #26262C (Hairline) Dark-first showcase theme, hairline borders, no shadows
font.family.ui Instrument Sans (14px base, tight scale) Small and dense dashboard typography, zero AI slop
focus.ring 2px #e85d26 outline, 2px offset Universal high-visibility focus ring, WCAG 2.2 AA compliant
05 / SECURITY SCANS & CI GATES
01 Gitleaks Secret Scanning
Scans commits, branches, and PRs for API keys & tokens ✓ ACTIVE
02 Semgrep AST Security Rules
Detects SQLi, CSRF omission, insecure deserialization ✓ ACTIVE
03 OWASP Automated Test Suite
Functional tests validating session fixation & XSS filtering ✓ ACTIVE
04 Static Type Checking
PHPStan Level 8 / Strict TypeScript compilation ✓ ACTIVE
06 / STEP-BY-STEP PROCEDURE
01

Clone and Inspect

Clone repository, navigate to kits/mcp-tools-kit, and start container services via docker compose.

02

Anchor AI Agent

Feed the Agent Bootstrap Prompt into Claude Code, Cursor, Codex, or Copilot. Agent consumes native rules and skills.

03

Verify Security Gates

Run automated CI evaluation. Security scanners assert zero vulnerabilities before merging features to production.

SECTION 3 • INSTALLATION GUIDE

7-Part Installation & Setup Standard

✓ VERIFIED INSTALL

1. Prerequisites Table

Tool Minimum Version Check Command Where to Get
Docker Engine24.0+docker --versiondocker.com
Docker Composev2.20+docker compose versionBundled with Docker
Git2.40+git --versiongit-scm.com

2. Quickstart Execution

git clone https://github.com/Umar-444/Techtalks-stack-kits.git
cd Techtalks-stack-kits/kits/mcp-tools-kit/starter
cp .env.example .env
docker compose up --build -d

3. Multi-Agent Rule Placement

Claude Code
CLAUDE.md
Cursor
.cursor/rules/*.mdc
Codex
CODEX.md / AGENTS.md
Copilot
copilot-instructions.md
Cline
.clinerules
Antigravity
.agents/rules/*.md

4. Post-Install Verification Probes

curl -s http://localhost:8000/healthz ✓ HTTP 200 OK
docker compose ps ✓ ALL SERVICES UP
SECTION 4 • FREQUENTLY ASKED QUESTIONS

Kit FAQ & Operational Details

14 QUESTIONS
What is the Model Context Protocol (MCP) and how does this kit implement it? ↓

MCP is an open standard created by Anthropic that standardizes how AI applications connect to external tools and data sources. This kit implements official @modelcontextprotocol/sdk with full support for stdio and SSE transports.

When should I use stdio transport versus SSE HTTP transport? ↓

Use stdio transport when integrating directly with desktop AI clients like Claude Desktop, Cursor IDE, or local CLI agents. Use SSE (Server-Sent Events) over HTTP when deploying the MCP server as a microservice in Docker, Kubernetes, or multi-agent swarms.

How does this kit prevent path traversal attacks in file-related tools? ↓

The read_secure_file tool resolves target file paths against an explicit ALLOWED_SANDBOX_DIR root using path.resolve(). If the normalized target path does not start with the sandbox root, execution is terminated immediately.

How are tool input parameters validated? ↓

All tools declare input schemas using Zod. The MCP server automatically transforms Zod definitions into JSON Schema for AI model discovery, and validates all runtime tool invocations before execution.

Can I connect this MCP server to Claude Desktop? ↓

Yes. Add an entry to claude_desktop_config.json pointing to node and the compiled dist/transports/stdio.js file. Claude Desktop will automatically launch the process and expose registered tools in the chat UI.

What tools are included in the starter scaffold? ↓

The starter includes three canonical tools: system_info (returns OS and Node telemetry), read_secure_file (reads allowed files within the sandbox), and calculator (safe arithmetic evaluator).

How does rootless containerization work in this MCP kit? ↓

The Dockerfile defines an appuser with non-root UID 10001:10001. All Node processes and HTTP listeners execute under this unprivileged user, preventing privilege escalation vulnerabilities.

Does the server support dynamic MCP Resources? ↓

Yes. The server registers dynamic resource templates using the resource() API, allowing AI agents to read configuration files and logs via standard URI patterns like internal://config/{key}.

What is the token consumption benchmark tier for this kit? ↓

The kit is benchmarked at Tier A+ (14,800 median build tokens) due to its minimal dependencies, zero-SPA architecture, and concise declarative tool definitions.

How are JSON-RPC 2.0 errors formatted and returned? ↓

Errors conform to standard JSON-RPC 2.0 error specifications with codes such as -32600 (Invalid Request), -32601 (Method not found), -32602 (Invalid params), and -32603 (Internal error).

How do I test MCP tools locally without Claude Desktop? ↓

You can run the official MCP Inspector using npx @modelcontextprotocol/inspector node dist/transports/stdio.js, or run the included Vitest test suite via npm test.

How is authentication handled in SSE mode? ↓

The SSE transport includes middleware that validates an incoming Authorization: Bearer header matching MCP_API_KEY from environment variables before opening the event stream.

Can tools report execution progress back to the agent? ↓

Yes. Long-running tools can use extra.sendNotification() to transmit progress events containing total and completed steps back to the client.

What automated security scans run in CI for this kit? ↓

GitHub Actions executes Gitleaks for credential detection, Semgrep with OWASP Top 10 rules, TypeScript typechecking, and manifest schema validation.

eval-transcript • mcp-tools-kit
GATES PASSED
$ aautomated test suite --kit mcp-tools-kit
✓ 01-manifest-integrity ............. PASS
✓ 02-agent-dialects .................. PASS (6/6 compiled)
✓ 03-skills-sandbox .................. PASS (Sandboxed tools)
✓ 04-owasp-scanners .................. PASS (0 vulnerabilities)
✓ 05-runtime-smoke ................... PASS (HTTP 200 OK)
Ready for immediate agent execution with zero configuration.
AGENT BOOTSTRAP PROMPT

Paste this exact prompt into Claude Code, Cursor, Copilot, or Antigravity to anchor the agent in the kit's rules and invariants:

You are building with the Model Context Protocol (MCP) Server Kit (stdio + SSE) kit. Adhere strictly to rules in CLAUDE.md / .cursor/rules, design tokens in DESIGN.md, and steps/agent-build-steps.md.