MCP Server Guide & Examples

by kaianuar

424 downloads
Not rated
GitHub

About

A comprehensive guide and example implementations for building Model Context Protocol (MCP) servers in Python and TypeScript.

Details

Author
kaianuar
Downloads
424
Categories
Other

- Complete server examples in Python and TypeScript
- Demonstrates tools (calculate, fetch-json, file I/O)
- Static and dynamic resource examples
- Prompt templates and logging patterns
- Sandboxed file operations and error handling
- Type safety with TypeScript and Pydantic

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Server Guide & Examples
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Choose a preferred implementation (Python or TypeScript), install dependencies (pip or npm), run the server script, then connect using the MCP CLI tool (mcp-cli connect). Refer to the server guide and language-specific documentation for details.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp server guide & examples": {
            "mcp-server-guide": {
                "command": "python",
                "args": [
                    "server.py"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-server-guide": {
        "command": "python",
        "args": [
            "server.py"
        ]
    }
}

MCP Server Guide & Examples

A comprehensive guide and collection of example implementations for building Model Context Protocol (MCP) servers. This repository demonstrates how to create MCP servers in multiple languages, with a focus on Python and TypeScript.

πŸš€ Features

- Complete Server Examples:
- Python minimal server with async support
- TypeScript minimal server with ES modules
- Both implementations showcase core MCP concepts

- Core Functionality Examples:
- Tools (calculate, fetch-json, file I/O)
- Resources (static and dynamic)
- Prompts and templates
- Logging and error handling

- Security & Best Practices:
- Sandboxed file operations
- Error handling patterns
- Logging strategies
- Type safety (TypeScript/Pydantic)

πŸ“š Documentation

- Server Guide - Main documentation and tutorial
- Python Example - Python implementation details
- TypeScript Example - TypeScript implementation details

πŸ› οΈ Quick Start

1. Choose your preferred implementation:

   # Python
cd examples/python-minimal
pip install -r requirements.txt
python server.py

# TypeScript
cd examples/typescript-minimal
npm install
npm run build
npm start

2. Connect using the MCP CLI:

   mcp-cli connect

πŸ“‹ Prerequisites

- Python 3.8+ (for Python example)
- Node.js 16+ (for TypeScript example)
- MCP CLI tool (npm install -g @modelcontextprotocol/cli)

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is licensed under the ISC License - see the LICENSE file for details.

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.