asharijuang
MCP Serverasharijuangpublic

simple_mcp

simple mcp mix function

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Python
Language
-
License

About This Server

simple mcp mix function

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

MCP Shopping

Konsep Model Context Protocol (MCP)

Model Context Protocol (MCP) adalah protokol yang memungkinkan komunikasi antara aplikasi dan model AI (LLM) dengan cara yang terstruktur dan terorganisir. MCP memungkinkan kita untuk:

  1. Resources: Menyediakan data statis yang bisa dibaca oleh LLM

    • Contoh: Database produk, waktu saat ini, konfigurasi sistem
    • Format: URI berbasis string yang bisa diakses oleh LLM
  2. Tools: Fungsi-fungsi yang bisa dipanggil oleh LLM untuk melakukan operasi

    • Contoh: Pencarian produk, perhitungan diskon, pengecekan stok
    • Memungkinkan interaksi dengan dunia nyata
  3. Prompts: Template percakapan yang memberikan konteks dan arahan kepada LLM

    • Contoh: Template untuk rekomendasi produk, asisten keranjang belanja
    • Membantu LLM memberikan respons yang sesuai dengan konteks

Struktur Proyek

File Utama

  1. server.py

    • Server MCP utama yang mengelola resources, tools, dan prompts
    • Menggunakan FastMCP sebagai implementasi MCP
  2. products.json

    • Database produk dalam format JSON
    • Berisi informasi tentang semua produk yang tersedia

Komponen Utama

  1. Resources

    @mcp.resource("time:///current")
    def get_current_time() -> str:
        """Mengembalikan waktu dan tanggal saat ini."""
        return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    
  2. Tools

    @mcp.tool()
    def search_products(query: str, min_price: Optional[int] = None, max_price: Optional[int] = None) -> str:
        """Mencari produk berdasarkan kata kunci dan rentang harga."""
        # Implementasi pencarian produk
    
  3. Prompts

    @mcp.prompt()
    def product_recommendation() -> list[base.Message]:
        """Prompt untuk memberikan rekomendasi produk."""
        # Template percakapan untuk rekomendasi
    

Cara Penggunaan

  1. Pastikan Python dan dependensi yang diperlukan sudah terinstall
  2. Jalankan server MCP:
    uv run server.py
    
  3. Interaksi dengan MCP server melalui:
    • Resources: Mengakses data statis
    • Tools: Memanggil fungsi untuk operasi
    • Prompts: Mendapatkan respons terstruktur dari LLM

Contoh Penggunaan

  1. Mengakses Resource

    # Mendapatkan waktu saat ini
    current_time = mcp.resource("time:///current")
    
  2. Menggunakan Tool

    # Mencari produk
    results = mcp.tool("search_products", query="laptop", min_price=10000000)
    
  3. Menggunakan Prompt

    # Mendapatkan rekomendasi produk
    recommendation = mcp.prompt("product_recommendation")
    

Fitur Utama

  1. Database Produk

    • Produk terorganisir berdasarkan kategori
    • Informasi detail termasuk harga, stok, dan spesifikasi
  2. Sistem Rekomendasi

    • Berdasarkan kebutuhan pengguna
    • Membandingkan produk berdasarkan spesifikasi dan harga
  3. Keranjang Belanja

    • Menambah dan menghapus produk
    • Menghitung total harga
    • Menampilkan rekomendasi produk terkait

Kontribusi

Untuk menambahkan fitur baru atau memperbaiki bug:

  1. Fork repository ini
  2. Buat branch baru (git checkout -b feature/AmazingFeature)
  3. Commit perubahan Anda (git commit -m 'Add some AmazingFeature')
  4. Push ke branch (git push origin feature/AmazingFeature)
  5. Buat Pull Request

Quick Start

1

Clone the repository

git clone https://github.com/asharijuang/simple_mcp
2

Install dependencies

cd simple_mcp
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerasharijuang
Reposimple_mcp
LanguagePython
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation