Discover Awesome MCP Servers
Extend your agent with 26,560 capabilities via MCP servers.
- All26,560
- Developer Tools3,867
- Search1,714
- Research & Data1,557
- AI Integration Systems229
- Cloud Platforms219
- Data & App Analysis181
- Database Interaction177
- Remote Shell Execution165
- Browser Automation147
- Databases145
- Communication137
- AI Content Generation127
- OS Automation120
- Programming Docs Access109
- Content Fetching108
- Note Taking97
- File Systems96
- Version Control93
- Finance91
- Knowledge & Memory90
- Monitoring79
- Security71
- Image & Video Processing69
- Digital Note Management66
- AI Memory Systems62
- Advanced AI Reasoning59
- Git Management Tools58
- Cloud Storage51
- Entertainment & Media43
- Virtualization42
- Location Services35
- Web Automation & Stealth32
- Media Content Processing32
- Calendar Management26
- Ecommerce & Retail18
- Speech Processing18
- Customer Data Platforms16
- Travel & Transportation14
- Education & Learning Tools13
- Home Automation & IoT13
- Web Search Integration12
- Health & Wellness10
- Customer Support10
- Marketing9
- Games & Gamification8
- Google Cloud Integrations7
- Art & Culture4
- Language Translation3
- Legal & Compliance2
MCP-SqlServer
Berikut adalah implementasi server MCP (Message Control Protocol) dalam C# untuk integrasi LLM (Large Language Model) dengan SQL Server, diuji dengan Claude Desktop: ```csharp using System; using System.Net; using System.Net.Sockets; using System.Text; using System.Data.SqlClient; using System.Threading.Tasks; namespace MCP_LLM_SQL_Server { class Program { // Konfigurasi private static string _sqlConnectionString = "Data Source=YOUR_SERVER;Initial Catalog=YOUR_DATABASE;Integrated Security=True;"; // Ganti dengan koneksi string SQL Server Anda private static int _port = 12345; // Port untuk server MCP static async Task Main(string[] args) { TcpListener listener = null; try { // Inisialisasi listener TCP listener = new TcpListener(IPAddress.Any, _port); listener.Start(); Console.WriteLine($"Server MCP berjalan di port {_port}..."); while (true) { // Terima koneksi klien secara asinkron TcpClient client = await listener.AcceptTcpClientAsync(); Console.WriteLine("Klien terhubung."); // Tangani koneksi klien dalam tugas terpisah _ = HandleClientAsync(client); } } catch (Exception e) { Console.WriteLine($"Error: {e.Message}"); } finally { listener?.Stop(); } } static async Task HandleClientAsync(TcpClient client) { NetworkStream stream = client.GetStream(); byte[] buffer = new byte[1024]; int bytesRead; try { while ((bytesRead = await stream.ReadAsync(buffer, 0, buffer.Length)) != 0) { // Terima data dari klien string request = Encoding.UTF8.GetString(buffer, 0, bytesRead); Console.WriteLine($"Menerima permintaan: {request}"); // Proses permintaan dan dapatkan respons string response = await ProcessRequestAsync(request); // Kirim respons ke klien byte[] responseBytes = Encoding.UTF8.GetBytes(response); await stream.WriteAsync(responseBytes, 0, responseBytes.Length); Console.WriteLine($"Mengirim respons: {response}"); } } catch (Exception e) { Console.WriteLine($"Error saat menangani klien: {e.Message}"); } finally { client.Close(); Console.WriteLine("Klien terputus."); } } static async Task<string> ProcessRequestAsync(string request) { // Di sini Anda akan mengintegrasikan LLM (Claude Desktop) dan SQL Server // Contoh: // 1. Kirim permintaan ke Claude Desktop // 2. Dapatkan respons dari Claude Desktop // 3. Gunakan respons untuk membuat kueri SQL // 4. Jalankan kueri SQL // 5. Format hasil dan kembalikan // Contoh sederhana (tanpa integrasi LLM): try { // Contoh: Anggap permintaan adalah kueri SQL string sqlQuery = request; string result = await ExecuteSqlQueryAsync(sqlQuery); return result; } catch (Exception e) { return $"Error: {e.Message}"; } } static async Task<string> ExecuteSqlQueryAsync(string sqlQuery) { StringBuilder result = new StringBuilder(); try { using (SqlConnection connection = new SqlConnection(_sqlConnectionString)) { await connection.OpenAsync(); using (SqlCommand command = new SqlCommand(sqlQuery, connection)) { using (SqlDataReader reader = await command.ExecuteReaderAsync()) { while (await reader.ReadAsync()) { for (int i = 0; i < reader.FieldCount; i++) { result.Append($"{reader.GetName(i)}: {reader[i]}, "); } result.AppendLine(); } } } } } catch (Exception e) { return $"Error executing SQL: {e.Message}"; } return result.ToString(); } } } ``` **Penjelasan:** 1. **Konfigurasi:** * `_sqlConnectionString`: Ganti `YOUR_SERVER` dan `YOUR_DATABASE` dengan informasi koneksi SQL Server Anda. Pastikan akun yang digunakan memiliki izin yang sesuai untuk menjalankan kueri yang Anda harapkan. * `_port`: Port yang akan digunakan server MCP untuk mendengarkan koneksi. 2. **`Main` Method:** * Membuat `TcpListener` untuk mendengarkan koneksi masuk pada port yang ditentukan. * Menerima koneksi klien secara asinkron menggunakan `listener.AcceptTcpClientAsync()`. * Memanggil `HandleClientAsync` untuk menangani setiap koneksi klien dalam tugas terpisah menggunakan `_ = HandleClientAsync(client);`. Ini memungkinkan server untuk menangani banyak klien secara bersamaan. 3. **`HandleClientAsync` Method:** * Mendapatkan `NetworkStream` dari `TcpClient` untuk berkomunikasi dengan klien. * Membaca data dari klien secara asinkron menggunakan `stream.ReadAsync()`. * Memanggil `ProcessRequestAsync` untuk memproses permintaan yang diterima. * Mengirim respons kembali ke klien menggunakan `stream.WriteAsync()`. * Menangani pengecualian dan menutup koneksi klien. 4. **`ProcessRequestAsync` Method:** * **Bagian terpenting untuk integrasi LLM.** Saat ini, ini hanya contoh sederhana yang menganggap permintaan dari klien adalah kueri SQL langsung. * **Anda perlu mengganti bagian ini dengan logika untuk berkomunikasi dengan Claude Desktop.** Ini mungkin melibatkan: * Membuat koneksi ke Claude Desktop (misalnya, melalui API HTTP atau protokol lain). * Mengirim permintaan ke Claude Desktop (misalnya, deskripsi bahasa alami dari apa yang ingin Anda kueri). * Menerima respons dari Claude Desktop (misalnya, kueri SQL yang dihasilkan). * Menangani kesalahan dari Claude Desktop. * Memanggil `ExecuteSqlQueryAsync` untuk menjalankan kueri SQL yang dihasilkan. * Menangani pengecualian. 5. **`ExecuteSqlQueryAsync` Method:** * Membuat koneksi ke SQL Server menggunakan `SqlConnection`. * Membuat `SqlCommand` dengan kueri SQL yang diberikan. * Menjalankan kueri menggunakan `command.ExecuteReaderAsync()`. * Membaca hasil dari `SqlDataReader` dan memformatnya menjadi string. * Menangani pengecualian. **Langkah-langkah Implementasi Integrasi LLM (Claude Desktop):** 1. **Pelajari API Claude Desktop:** Anda perlu memahami bagaimana berkomunikasi dengan Claude Desktop secara terprogram. Periksa dokumentasi Claude Desktop untuk API atau protokol yang tersedia. 2. **Tambahkan Kode Komunikasi Claude Desktop:** Di dalam `ProcessRequestAsync`, tambahkan kode untuk: * Membuat koneksi ke Claude Desktop. * Mengirim permintaan ke Claude Desktop (misalnya, deskripsi bahasa alami dari kueri yang Anda inginkan). * Menerima respons dari Claude Desktop (kueri SQL yang dihasilkan). * Menangani kesalahan dari Claude Desktop. 3. **Gunakan Kueri SQL yang Dihasilkan:** Gunakan kueri SQL yang dihasilkan oleh Claude Desktop sebagai input untuk `ExecuteSqlQueryAsync`. 4. **Format Respons:** Format respons dari `ExecuteSqlQueryAsync` dengan cara yang bermakna dan kirimkan kembali ke klien. **Contoh (Konseptual) Integrasi Claude Desktop (dengan asumsi API HTTP):** ```csharp // Di dalam ProcessRequestAsync static async Task<string> ProcessRequestAsync(string request) { try { // 1. Kirim permintaan ke Claude Desktop string claudeDesktopEndpoint = "http://localhost:8000/generate_sql"; // Ganti dengan endpoint Claude Desktop Anda string claudeDesktopRequest = $"{{ \"prompt\": \"{request}\" }}"; // Format permintaan ke Claude Desktop using (HttpClient client = new HttpClient()) { StringContent content = new StringContent(claudeDesktopRequest, Encoding.UTF8, "application/json"); HttpResponseMessage response = await client.PostAsync(claudeDesktopEndpoint, content); response.EnsureSuccessStatusCode(); // Lempar pengecualian jika respons bukan 200 OK string claudeDesktopResponse = await response.Content.ReadAsStringAsync(); // 2. Parse respons dari Claude Desktop (asumsikan respons JSON) // Contoh: {"sql_query": "SELECT * FROM Customers WHERE City = 'London'"} JObject jsonResponse = JObject.Parse(claudeDesktopResponse); string sqlQuery = (string)jsonResponse["sql_query"]; // 3. Jalankan kueri SQL string result = await ExecuteSqlQueryAsync(sqlQuery); return result; } } catch (Exception e) { return $"Error: {e.Message}"; } } ``` **Penting:** * **Keamanan:** Berhati-hatilah dengan keamanan. Jangan pernah menjalankan kueri SQL yang dihasilkan langsung dari input pengguna tanpa validasi yang cermat. Claude Desktop dapat menghasilkan kueri berbahaya jika diberi prompt yang salah. Pertimbangkan untuk menggunakan daftar putih (whitelist) kueri yang diizinkan atau teknik validasi yang kuat. * **Penanganan Kesalahan:** Implementasikan penanganan kesalahan yang komprehensif untuk menangani kesalahan dari Claude Desktop, SQL Server, dan jaringan. * **Asinkron:** Gunakan operasi asinkron (`async` dan `await`) untuk menghindari pemblokiran thread utama dan menjaga responsivitas server. * **Logging:** Tambahkan logging untuk membantu Anda men-debug dan memantau server. * **Konfigurasi:** Gunakan file konfigurasi untuk menyimpan pengaturan seperti koneksi string SQL Server, endpoint Claude Desktop, dan port server. **Cara Menguji dengan Claude Desktop:** 1. **Pastikan Claude Desktop Berjalan:** Pastikan Claude Desktop berjalan dan siap menerima permintaan. 2. **Jalankan Server C#:** Jalankan program C# Anda. 3. **Kirim Permintaan dari Klien MCP:** Gunakan klien MCP (Anda dapat menulis klien sederhana sendiri atau menggunakan alat seperti `netcat`) untuk mengirim permintaan ke server C# Anda. Permintaan harus berupa deskripsi bahasa alami dari kueri yang ingin Anda jalankan. Misalnya: "Dapatkan nama dan alamat pelanggan di London." 4. **Periksa Respons:** Periksa respons yang dikirim kembali oleh server C#. Respons harus berisi hasil dari kueri SQL yang dihasilkan oleh Claude Desktop dan dijalankan terhadap SQL Server Anda. Ini adalah kerangka dasar. Anda perlu menyesuaikannya dengan kebutuhan spesifik Anda dan API Claude Desktop. Semoga ini membantu!
MCP Screenshot Server
Enables LLMs to capture and analyze screenshots of your screen, windows, or regions with smart detection capabilities. Features natural language queries, automatic window targeting, and text enhancement for UI debugging and visual inspection.
Cloudflare Playwright MCP
Enables AI assistants to control a browser through a set of tools, allowing them to perform web automation tasks like navigation, typing, clicking, and taking screenshots.
Intelligent Form Collection MCP Server
Enables intelligent form data collection for mediation/dispute resolution services through conversational AI. Supports structured information gathering, real-time validation, and database storage with integration for Cursor, Dify, and other LLM platforms.
Klaviyo MCP Server
A comprehensive Model Context Protocol server that enables interaction with the Klaviyo API, providing tools and resources for managing customer profiles, lists, segments, campaigns, flows, and various marketing automation features.
TypeScript MCP Server Boilerplate
A boilerplate project for quickly developing Model Context Protocol (MCP) servers using TypeScript SDK, with example tools (calculator, greeting) and resources (server info) pre-implemented.
MCP Personal Calendar
A CalDAV-compliant MCP server that enables AI models to manage personal schedules and to-do lists, supporting batch creation, modification, and intelligent timezone adjustments.
Tavily Web Search MCP Server
Enables web search capabilities through the Tavily API, allowing users to search the internet for information using natural language queries. Demonstrates MCP server implementation with external API integration.
mcp_server
Tally MCP Server by CData
Tally MCP Server by CData
Shared Memory MCP Server
Provides a shared context layer for AI agent teams to improve token efficiency through context deduplication and incremental state sharing. It enables multiple agents to coordinate tasks, share real-time discoveries, and manage dependencies while significantly reducing redundant data transmission.
clawd-mcp
Bridges Cursor and Claude Desktop with the OpenClaw and Moltbook ecosystems to manage personal AI agents and communication gateways across platforms like WhatsApp and Discord. It provides MCP tools to invoke agents, manage sessions, and handle social agent interactions within a secure, virtualized environment.
Jinko Hotel Booking MCP Server
Enables AI agents to search, browse, and book hotels from a database of 2 million properties worldwide. Provides comprehensive hotel search capabilities with location lookup, filtering by amenities, detailed property information, and integrated booking functionality.
Infobip
Infobip MCP Servers let you build AI agents to interact with the Infobip platform through the Model Context Protocol (MCP). Connect to Infobip and enable your agents to perform actions, such as sending messages over channels like SMS, WhatsApp, or Viber, or managing customer data in a controlled, pr
R-Server MCP
MCP Server
A Dify endpoint plugin that converts a Dify app into a MCP server, allowing communication with MCP clients like Cherry Studio via Streamable HTTP or legacy SSE protocols.
Google Calendar MCP Server
MCPサーバーをGoogleカレンダーAPIで使用する。 (MCPサーバーをGoogleカレンダーAPIで使用する is a very literal translation. Depending on the context, a more natural translation might be needed. For example, if you're asking how to *use* the Google Calendar API with an MCP server, it might be better translated as: * **GoogleカレンダーAPIをMCPサーバーで利用する方法** - How to use the Google Calendar API with an MCP server. * **MCPサーバーとGoogleカレンダーAPIの連携** - Integrating an MCP server with the Google Calendar API.)
Mysql-mcp
A specialized MySQL MCP server for Cursor that enables users to query table structures, execute SQL, and generate database documentation. It features multiple security modes to ensure safe interaction while providing tools for database overviews and query caching.
Jewish Library
Sebuah server MCP yang menyediakan kemampuan pencarian yang kuat untuk teks dan literatur Yahudi. Server ini memungkinkan Model Bahasa Besar untuk mencari dan mereferensikan teks Yahudi melalui antarmuka yang terstandardisasi.
image-reader MCP Server
A TypeScript-based MCP server that implements a simple notes system, allowing creation and management of text notes with URIs and metadata.
Git Commit MCP Server
A Model Context Protocol server that enables AI assistants to perform standard Git operations like staging, committing, and pushing changes. It facilitates a high-quality, standardized workflow for managing code repositories through natural language commands.
Summary MCP
Generates AI-powered daily and weekly productivity summaries by analyzing your Slack messages, Google Calendar events, and Gmail activity with automated scheduling and smart filtering.
MCP Weather Server
A standardized API server that enables AI agents and client applications to fetch current weather information for any location without directly interacting with external weather APIs.
Basic MCP Weather Tool
A simple educational MCP server implemented in Node.js that allows users to fetch weather information for cities using the Open-Meteo API.
SharePoint MCP Server by CData
SharePoint MCP Server by CData
Pylpex MCP
Enables execution and analysis of Pylpex code through an interpreter, supporting code execution, tokenization, variable inspection, and providing language documentation and examples.
whatsapp-mcp
An MCP server that connects Claude to WhatsApp for reading group messages, searching conversations, and sending messages. It includes advanced tools for analyzing group activity patterns, member statistics, and syncing message history.
GitHub Tools MCP Server
Model Context Protocol server that enables interaction with GitHub repositories, issues, pull requests, and search functionality through natural language.
CongressMCP-full
The open Congress.gov MCP server. Provides comprehensive access to the Congress.gov API through 6 organized toolsets, enabling AI systems to retrieve and interact with legislative data from the United States Congress with a clean, unified interface.
Hunter MCP Server
Provides integration between Hunter API and LLM providers supporting the MCP protocol, allowing natural language interaction with Hunter B2B data for finding and managing company and people information.