DIY MCP

by mwpryer

Not rated
GitHub

About

A from-scratch implementation of the Model Context Protocol (MCP) for building servers and clients, using a Chinese tea collection as an example.

Details

Author
mwpryer
Categories
Developer Tools, Knowledge Base

Setup

Install DIY MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/mwpryer/diy-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

A simple from-scratch implementation of the Model Context Protocol (MCP) for building MCP servers and clients usingstdio. This example uses a simple Chinese tea collection with descriptions, origins, etc.

For production applications, check out the officialMCP SDKs.

mcp/ ├── server/ # MCP server for Chinese tea information │ └── src/ │ ├── index.ts │ ├── stdio.ts │ └── teas.json └── client/ # MCP client CLI with Claude as LLM └── src/ ├── index.ts └── llm.ts

The core of this implementation is a lightweight MCP server. It offers the following resources and tools:

- Resources:

- tea://teas: List of all available teas
- tea://teas/{slug}: Details of a specific tea

- getTeasByType: Get all teas of a specific type
- getTeasByRegion: Get all teas from a specific province or region

You can test the MCP server withMCP Inspector, an interactive tool for testing and debugging MCP servers.

You can interact with the MCP server through an MCP client like Claude Desktop, alternatively, you can use the included DIY MCP client. By adding your Anthropic API key, you can have Claude intelligently determine which tools to use based on your prompt.

The client provides three interaction modes:

- Ask LLM: Let Claude interact with the MCP server
- Get a resource: Directly access MCP server resources
- Use a tool: Directly call MCP server tools

To use Claude, first copy the example environment file and add your Anthropic API key with available credits to theANTHROPIC_API_KEYvariable:

The client will automatically start the MCP server, so ensure you've built it first.

Once running, you can interact with the MCP server through the MCP client CLI. Try asking the LLM some questions about Chinese tea:
- "What teas do you know about?"
- "Which teas come from Fujian?"
- "What is your favorite green tea?"

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

One shared context layer for AI agents and humans — live API specs, DB schemas, and versioned contracts across repos so every agent and teammate works from the same source of truth.

Local stdio MCP server that lets AI coding agents read and maintain structured architecture, rules, and decisions directly from your repository.

Official Context7 MCP server that brings up-to-date, version-specific library documentation and code examples into AI coding prompts.

Remote, no-auth MCP server providing AI-powered codebase context and answers

Create and read feature flags, review experiments, generate flag types, search docs, and interact with GrowthBook's feature flagging and experimentation platform.

Official MCP server for Stimulsoft Reports & Dashboards documentation. Semantic search across FAQ, Programming Manual, Server/User Manual, and Server/Cloud API for .NET, WPF, Avalonia, WEB, Blazor, Angular, React, JS, PHP, Java, and Python platforms.

Search Apple's Developer Documentation with smart search and wildcard support.

Access documentation from the Awesome-llms-txt repository directly in your conversations.

Connect AI tools like Cursor and VS Code to your product documentation using the Biel.ai platform.

MCP server that ingests project docs once and lets Claude search by meaning instead of reading everything — saving tokens on large codebases

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.