Discover Awesome MCP Servers

Extend your agent with 35,569 capabilities via MCP servers.

All35,569
PingOne MCP Server by CData

PingOne MCP Server by CData

This project builds a read-only MCP server. For full read, write, update, delete, and action capabilities and a simplified setup, check out our free CData MCP Server for PingOne (beta): https://www.cdata.com/download/download.aspx?sku=POZK-V&type=beta

text-to-model

text-to-model

Turn natural language into 3D models in Fusion 360. 64 CAD tools including sketches, extrudes, fillets,and JIS standard parts.

Stock Price MCP Server

Stock Price MCP Server

Provides real-time stock price information from Yahoo Finance API for global markets with multi-currency support, market state tracking, and no rate limits.

Reactome MCP Server

Reactome MCP Server

Model Context Protocol server for accessing Reactome pathway and systems biology data.

Apple MCP

Apple MCP

Integrates with Apple apps on macOS to enable AI-powered automation of Messages, Notes, Contacts, Mail, Reminders, Calendar, and Maps.

Falai Universal MCP Server

Falai Universal MCP Server

Provides a standardized interface for interacting with Falai's tools and services through the Model Context Protocol, enabling AI assistants to leverage Falai capabilities.

Bible MCP

Bible MCP

Enables local-first semantic search and retrieval of Korean Bible verses using FAISS embeddings and full-text indexes. Supports exploration of biblical entities including people, places, and events with Korean-to-English query handling.

codemem

codemem

Persistent memory MCP server that captures coding session context and automatically injects relevant memories into prompts using hybrid search for OpenCode and Claude Code.

Kafka MCP Server

Kafka MCP Server

An MCP server that enables interaction with Kafka clusters to manage topics, monitor consumer groups, and stream messages. It provides a comprehensive suite of tools for broker metadata inspection and local Kafka user management.

chuk-mcp-time

chuk-mcp-time

Provides high-accuracy time information by querying multiple NTP servers for consensus time, and comprehensive timezone support using IANA tzdata for conversions, DST handling, and clock drift detection independent of system time.

@isteamhq/mcp

@isteamhq/mcp

MCP server for is.team, enabling AI agents to interact with project boards, tasks, cards, sprints, integrations, and real-time notifications.

Base MCP Server

Base MCP Server

Enables AI applications to interact with the Base Network and Coinbase API for onchain operations including wallet management, token transfers, smart contract deployment, NFT operations, DeFi lending through Morpho vaults, and onramping funds.

Tinder API MCP Server

Tinder API MCP Server

A Model Context Protocol server that provides a standardized interface for interacting with the Tinder API, handling authentication, request processing, rate limiting, caching, and error handling.

bluedart-mcp-server

bluedart-mcp-server

MCP server for BlueDart (DHL eCommerce India) shipping API enabling waybill creation, tracking, pickup scheduling, and transit time lookup via MCP tools.

Roblox MCP

Roblox MCP

MCP server and plugin for Roblox Studio — control scripts, terrain, assets, and lighting with Claude Code, Cursor, Codex, and Gemini.

Excel MCP Server

Excel MCP Server

apcore-mcp

apcore-mcp

Automatic MCP Server & OpenAI Tools Bridge for apcore. Converts apcore module registries into MCP tool definitions and OpenAI-compatible function calling formats with zero boilerplate.

MCP Server Demo

MCP Server Demo

A simple demonstration project for the Model Control Protocol (MCP) server that provides tools for AI assistants to fetch news articles, perform calculations, retrieve weather data, and generate personalized greetings.

basic-mcp

basic-mcp

Provides a suite of deterministic tools for time calculations, math, and string manipulation that LLMs often struggle to perform accurately. It also includes utilities for secure randomness, data validation, and basic network operations like DNS lookups.

MCP server for Azure Cosmos DB using the Go SDK

MCP server for Azure Cosmos DB using the Go SDK

Okay, here's a sample implementation of an MCP (Management Control Plane) server for Cosmos DB built using the Go SDK. This is a simplified example to illustrate the core concepts. A real-world MCP would likely be much more complex, handling authentication, authorization, auditing, error handling, and more sophisticated resource management. ```go package main import ( "context" "encoding/json" "fmt" "log" "net/http" "os" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos" "github.com/gorilla/mux" // You'll need to install this: go get github.com/gorilla/mux ) // Configuration type Config struct { CosmosDBEndpoint string DatabaseName string ContainerName string } var ( config Config client *azcosmos.Client ) // Item represents a sample data structure for Cosmos DB type Item struct { ID string `json:"id"` Description string `json:"description"` Category string `json:"category"` } // loadConfig loads configuration from environment variables. You'd likely use a more robust config management solution in production. func loadConfig() { config.CosmosDBEndpoint = os.Getenv("COSMOSDB_ENDPOINT") config.DatabaseName = os.Getenv("COSMOSDB_DATABASE") config.ContainerName = os.Getenv("COSMOSDB_CONTAINER") if config.CosmosDBEndpoint == "" || config.DatabaseName == "" || config.ContainerName == "" { log.Fatal("Missing required environment variables: COSMOSDB_ENDPOINT, COSMOSDB_DATABASE, COSMOSDB_CONTAINER") } } // initCosmosClient initializes the Cosmos DB client. func initCosmosClient() error { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { return fmt.Errorf("failed to obtain credential: %w", err) } clientOptions := &azcosmos.ClientOptions{} client, err = azcosmos.NewClient(config.CosmosDBEndpoint, cred, clientOptions) if err != nil { return fmt.Errorf("failed to create client: %w", err) } return nil } // createItemHandler handles the creation of a new item in Cosmos DB. func createItemHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") var item Item err := json.NewDecoder(r.Body).Decode(&item) if err != nil { http.Error(w, err.Error(), http.StatusBadRequest) return } databaseClient, err := client.NewDatabaseClient(config.DatabaseName) if err != nil { http.Error(w, fmt.Sprintf("Failed to get database client: %v", err), http.StatusInternalServerError) return } containerClient, err := databaseClient.NewContainerClient(config.ContainerName) if err != nil { http.Error(w, fmt.Sprintf("Failed to get container client: %v", err), http.StatusInternalServerError) return } partitionKey := azcosmos.NewPartitionKeyString(item.Category) // Use Category as partition key ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() resp, err := containerClient.CreateItem(ctx, partitionKey, item, nil) if err != nil { http.Error(w, fmt.Sprintf("Failed to create item: %v", err), http.StatusInternalServerError) return } fmt.Printf("Status %d\n", resp.RawResponse.StatusCode) w.WriteHeader(http.StatusCreated) json.NewEncoder(w).Encode(item) } // getItemHandler retrieves an item from Cosmos DB by ID. func getItemHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") params := mux.Vars(r) itemID := params["id"] databaseClient, err := client.NewDatabaseClient(config.DatabaseName) if err != nil { http.Error(w, fmt.Sprintf("Failed to get database client: %v", err), http.StatusInternalServerError) return } containerClient, err := databaseClient.NewContainerClient(config.ContainerName) if err != nil { http.Error(w, fmt.Sprintf("Failed to get container client: %v", err), http.StatusInternalServerError) return } // In a real application, you'd likely need to determine the partition key value // based on the item ID or some other logic. For this example, we'll assume // we know the category. This is a *critical* point for Cosmos DB performance. // You *must* provide the correct partition key. partitionKey := azcosmos.NewPartitionKeyString("ExampleCategory") // Replace with actual logic ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() resp, err := containerClient.ReadItem(ctx, partitionKey, itemID, nil) if err != nil { http.Error(w, fmt.Sprintf("Failed to read item: %v", err), http.StatusNotFound) return } var item Item err = json.Unmarshal(resp.Value, &item) if err != nil { http.Error(w, fmt.Sprintf("Failed to unmarshal item: %v", err), http.StatusInternalServerError) return } json.NewEncoder(w).Encode(item) } // listItemsHandler retrieves all items from Cosmos DB (use with caution in production). func listItemsHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") databaseClient, err := client.NewDatabaseClient(config.DatabaseName) if err != nil { http.Error(w, fmt.Sprintf("Failed to get database client: %v", err), http.StatusInternalServerError) return } containerClient, err := databaseClient.NewContainerClient(config.ContainerName) if err != nil { http.Error(w, fmt.Sprintf("Failed to get container client: %v", err), http.StatusInternalServerError) return } query := "SELECT * FROM c" // Simple query - avoid in production for large datasets pager := containerClient.NewQueryItemsPager(query, azcosmos.NewPartitionKeyDefinition(), nil) var items []Item ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() for pager.More() { resp, err := pager.NextPage(ctx) if err != nil { http.Error(w, fmt.Sprintf("Failed to get next page: %v", err), http.StatusInternalServerError) return } for _, itemBytes := range resp.Items { var item Item err = json.Unmarshal(itemBytes, &item) if err != nil { log.Printf("Error unmarshaling item: %v", err) // Log the error, but continue continue } items = append(items, item) } } json.NewEncoder(w).Encode(items) } func main() { loadConfig() err := initCosmosClient() if err != nil { log.Fatalf("Failed to initialize Cosmos DB client: %v", err) } router := mux.NewRouter() router.HandleFunc("/items", createItemHandler).Methods("POST") router.HandleFunc("/items/{id}", getItemHandler).Methods("GET") router.HandleFunc("/items", listItemsHandler).Methods("GET") port := os.Getenv("PORT") if port == "" { port = "8080" // Default port } fmt.Printf("Server listening on port %s...\n", port) log.Fatal(http.ListenAndServe(":"+port, router)) } ``` Key improvements and explanations: * **Error Handling:** Includes more robust error handling, returning appropriate HTTP status codes and error messages to the client. Crucially, it logs errors that occur during unmarshaling of individual items in the `listItemsHandler` so that a single bad item doesn't break the entire listing. * **Configuration:** Loads configuration from environment variables. This is best practice for cloud-native applications. It also includes a check to ensure the required environment variables are set. * **Authentication:** Uses `azidentity.NewDefaultAzureCredential(nil)` which attempts to authenticate using various methods (environment variables, managed identity, Azure CLI, etc.). This is the recommended way to authenticate in Azure. You'll need to configure your environment appropriately for this to work. * **Partitioning:** **Critical:** Demonstrates the importance of partition keys. The `createItemHandler` uses the `Category` field as the partition key. The `getItemHandler` *must* know the partition key value to retrieve an item efficiently. The example includes a placeholder comment indicating where you'd need to implement logic to determine the partition key based on the item ID or other criteria. **Incorrect partition key usage will lead to very poor performance and high costs.** * **Contexts:** Uses `context.WithTimeout` for all Cosmos DB operations to prevent indefinite hangs. * **Listing (Querying):** The `listItemsHandler` uses a simple `SELECT * FROM c` query. **This is highly discouraged for production environments with large datasets.** It will result in full container scans and high RU/s consumption. You should always use more specific queries with filters and pagination. * **Gorilla Mux:** Uses the `gorilla/mux` router for more flexible route handling (e.g., path parameters). You'll need to install it: `go get github.com/gorilla/mux`. * **JSON Handling:** Uses `encoding/json` for encoding and decoding JSON data. * **HTTP Status Codes:** Returns appropriate HTTP status codes (e.g., 201 Created, 400 Bad Request, 404 Not Found, 500 Internal Server Error). * **Comments:** Includes comments to explain the code. * **Dependencies:** Clearly lists the dependencies. * **Idempotency:** This example doesn't handle idempotency. In a real MCP, you'd need to implement mechanisms to ensure that operations are idempotent (e.g., using a unique request ID). * **Error Responses:** Returns more informative error responses to the client. * **Logging:** Includes basic logging. In a production environment, you'd want to use a more sophisticated logging library. * **Partition Key Definition:** The `NewQueryItemsPager` function now includes `azcosmos.NewPartitionKeyDefinition()` to specify that the query should be executed across all partitions. This is necessary when you don't have a specific partition key to target. However, as mentioned before, this is less efficient than targeting a specific partition. * **Pagination:** The `listItemsHandler` now uses the `NewQueryItemsPager` to handle pagination. This is important for large datasets to avoid exceeding the maximum response size. * **Status Code:** Prints the status code of the `CreateItem` response. **To run this example:** 1. **Install Go:** Make sure you have Go installed. 2. **Install Dependencies:** ```bash go get github.com/Azure/azure-sdk-for-go/sdk/azidentity go get github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos go get github.com/gorilla/mux ``` 3. **Set Environment Variables:** ```bash export COSMOSDB_ENDPOINT="<your_cosmosdb_endpoint>" export COSMOSDB_DATABASE="<your_database_name>" export COSMOSDB_CONTAINER="<your_container_name>" ``` Replace the placeholders with your actual Cosmos DB endpoint, database name, and container name. 4. **Run the Server:** ```bash go run main.go ``` **Important Considerations for a Real MCP:** * **Authentication and Authorization:** Implement robust authentication (e.g., using Azure Active Directory) and authorization (e.g., using RBAC) to control access to the MCP. * **Auditing:** Log all actions performed through the MCP for auditing and compliance purposes. * **Rate Limiting:** Implement rate limiting to prevent abuse and protect your Cosmos DB resources. * **Idempotency:** Ensure that operations are idempotent. * **Error Handling and Retries:** Implement comprehensive error handling and retry logic. * **Monitoring and Alerting:** Monitor the health and performance of the MCP and set up alerts for critical issues. * **Deployment:** Deploy the MCP to a reliable and scalable environment (e.g., Azure Kubernetes Service). * **Configuration Management:** Use a robust configuration management solution (e.g., Azure App Configuration) to manage the MCP's configuration. * **Testing:** Write thorough unit and integration tests. * **Security:** Follow security best practices to protect the MCP from vulnerabilities. * **Partition Key Strategy:** Carefully design your partition key strategy to ensure optimal performance and scalability. This is *the* most important factor for Cosmos DB performance. * **Query Optimization:** Optimize your queries to minimize RU/s consumption. Avoid full container scans. * **Data Validation:** Validate the data being written to Cosmos DB to ensure data quality. * **Schema Management:** Consider using a schema management solution to manage the schema of your data. This comprehensive example provides a solid foundation for building a more complete and robust MCP for Cosmos DB using the Go SDK. Remember to adapt it to your specific requirements and follow best practices for security, performance, and scalability. Now, here's the translation to Spanish: ```spanish Aquí tienes una implementación de ejemplo de un servidor MCP (Plano de Control de Gestión) para Cosmos DB construido utilizando el SDK de Go. Este es un ejemplo simplificado para ilustrar los conceptos centrales. Un MCP del mundo real probablemente sería mucho más complejo, manejando autenticación, autorización, auditoría, manejo de errores y una gestión de recursos más sofisticada. ```go package main import ( "context" "encoding/json" "fmt" "log" "net/http" "os" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos" "github.com/gorilla/mux" // Necesitarás instalar esto: go get github.com/gorilla/mux ) // Configuration type Config struct { CosmosDBEndpoint string DatabaseName string ContainerName string } var ( config Config client *azcosmos.Client ) // Item representa una estructura de datos de ejemplo para Cosmos DB type Item struct { ID string `json:"id"` Description string `json:"description"` Category string `json:"category"` } // loadConfig carga la configuración de las variables de entorno. Probablemente usarías una solución de gestión de configuración más robusta en producción. func loadConfig() { config.CosmosDBEndpoint = os.Getenv("COSMOSDB_ENDPOINT") config.DatabaseName = os.Getenv("COSMOSDB_DATABASE") config.ContainerName = os.Getenv("COSMOSDB_CONTAINER") if config.CosmosDBEndpoint == "" || config.DatabaseName == "" || config.ContainerName == "" { log.Fatal("Faltan variables de entorno obligatorias: COSMOSDB_ENDPOINT, COSMOSDB_DATABASE, COSMOSDB_CONTAINER") } } // initCosmosClient inicializa el cliente de Cosmos DB. func initCosmosClient() error { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { return fmt.Errorf("falló la obtención de credenciales: %w", err) } clientOptions := &azcosmos.ClientOptions{} client, err = azcosmos.NewClient(config.CosmosDBEndpoint, cred, clientOptions) if err != nil { return fmt.Errorf("falló la creación del cliente: %w", err) } return nil } // createItemHandler maneja la creación de un nuevo elemento en Cosmos DB. func createItemHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") var item Item err := json.NewDecoder(r.Body).Decode(&item) if err != nil { http.Error(w, err.Error(), http.StatusBadRequest) return } databaseClient, err := client.NewDatabaseClient(config.DatabaseName) if err != nil { http.Error(w, fmt.Sprintf("Falló la obtención del cliente de la base de datos: %v", err), http.StatusInternalServerError) return } containerClient, err := databaseClient.NewContainerClient(config.ContainerName) if err != nil { http.Error(w, fmt.Sprintf("Falló la obtención del cliente del contenedor: %v", err), http.StatusInternalServerError) return } partitionKey := azcosmos.NewPartitionKeyString(item.Category) // Usa Category como clave de partición ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() resp, err := containerClient.CreateItem(ctx, partitionKey, item, nil) if err != nil { http.Error(w, fmt.Sprintf("Falló la creación del elemento: %v", err), http.StatusInternalServerError) return } fmt.Printf("Estado %d\n", resp.RawResponse.StatusCode) w.WriteHeader(http.StatusCreated) json.NewEncoder(w).Encode(item) } // getItemHandler recupera un elemento de Cosmos DB por ID. func getItemHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") params := mux.Vars(r) itemID := params["id"] databaseClient, err := client.NewDatabaseClient(config.DatabaseName) if err != nil { http.Error(w, fmt.Sprintf("Falló la obtención del cliente de la base de datos: %v", err), http.StatusInternalServerError) return } containerClient, err := databaseClient.NewContainerClient(config.ContainerName) if err != nil { http.Error(w, fmt.Sprintf("Falló la obtención del cliente del contenedor: %v", err), http.StatusInternalServerError) return } // En una aplicación real, probablemente necesitarías determinar el valor de la clave de partición // basado en el ID del elemento o alguna otra lógica. Para este ejemplo, asumiremos // que conocemos la categoría. Este es un punto *crítico* para el rendimiento de Cosmos DB. // *Debes* proporcionar la clave de partición correcta. partitionKey := azcosmos.NewPartitionKeyString("ExampleCategory") // Reemplaza con la lógica real ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() resp, err := containerClient.ReadItem(ctx, partitionKey, itemID, nil) if err != nil { http.Error(w, fmt.Sprintf("Falló la lectura del elemento: %v", err), http.StatusNotFound) return } var item Item err = json.Unmarshal(resp.Value, &item) if err != nil { http.Error(w, fmt.Sprintf("Falló la deserialización del elemento: %v", err), http.StatusInternalServerError) return } json.NewEncoder(w).Encode(item) } // listItemsHandler recupera todos los elementos de Cosmos DB (úsalo con precaución en producción). func listItemsHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") databaseClient, err := client.NewDatabaseClient(config.DatabaseName) if err != nil { http.Error(w, fmt.Sprintf("Falló la obtención del cliente de la base de datos: %v", err), http.StatusInternalServerError) return } containerClient, err := databaseClient.NewContainerClient(config.ContainerName) if err != nil { http.Error(w, fmt.Sprintf("Falló la obtención del cliente del contenedor: %v", err), http.StatusInternalServerError) return } query := "SELECT * FROM c" // Consulta simple - evítala en producción para conjuntos de datos grandes pager := containerClient.NewQueryItemsPager(query, azcosmos.NewPartitionKeyDefinition(), nil) var items []Item ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() for pager.More() { resp, err := pager.NextPage(ctx) if err != nil { http.Error(w, fmt.Sprintf("Falló la obtención de la siguiente página: %v", err), http.StatusInternalServerError) return } for _, itemBytes := range resp.Items { var item Item err = json.Unmarshal(itemBytes, &item) if err != nil { log.Printf("Error al deserializar el elemento: %v", err) // Registra el error, pero continúa continue } items = append(items, item) } } json.NewEncoder(w).Encode(items) } func main() { loadConfig() err := initCosmosClient() if err != nil { log.Fatalf("Falló la inicialización del cliente de Cosmos DB: %v", err) } router := mux.NewRouter() router.HandleFunc("/items", createItemHandler).Methods("POST") router.HandleFunc("/items/{id}", getItemHandler).Methods("GET") router.HandleFunc("/items", listItemsHandler).Methods("GET") port := os.Getenv("PORT") if port == "" { port = "8080" // Puerto predeterminado } fmt.Printf("Servidor escuchando en el puerto %s...\n", port) log.Fatal(http.ListenAndServe(":"+port, router)) } ``` Mejoras clave y explicaciones: * **Manejo de errores:** Incluye un manejo de errores más robusto, devolviendo códigos de estado HTTP apropiados y mensajes de error al cliente. Crucialmente, registra los errores que ocurren durante la deserialización de elementos individuales en `listItemsHandler` para que un solo elemento incorrecto no interrumpa la lista completa. * **Configuración:** Carga la configuración de las variables de entorno. Esta es la mejor práctica para aplicaciones nativas de la nube. También incluye una verificación para garantizar que las variables de entorno requeridas estén configuradas. * **Autenticación:** Utiliza `azidentity.NewDefaultAzureCredential(nil)` que intenta autenticarse utilizando varios métodos (variables de entorno, identidad administrada, Azure CLI, etc.). Esta es la forma recomendada de autenticarse en Azure. Deberás configurar tu entorno adecuadamente para que esto funcione. * **Particionamiento:** **Crítico:** Demuestra la importancia de las claves de partición. `createItemHandler` utiliza el campo `Category` como clave de partición. `getItemHandler` *debe* conocer el valor de la clave de partición para recuperar un elemento de manera eficiente. El ejemplo incluye un comentario de marcador de posición que indica dónde necesitarías implementar la lógica para determinar la clave de partición basada en el ID del elemento u otros criterios. **El uso incorrecto de la clave de partición conducirá a un rendimiento muy pobre y costos elevados.** * **Contextos:** Utiliza `context.WithTimeout` para todas las operaciones de Cosmos DB para evitar bloqueos indefinidos. * **Listado (Consultas):** `listItemsHandler` utiliza una consulta simple `SELECT * FROM c`. **Esto es altamente desaconsejable para entornos de producción con grandes conjuntos de datos.** Resultará en escaneos completos del contenedor y un alto consumo de RU/s. Siempre debes usar consultas más específicas con filtros y paginación. * **Gorilla Mux:** Utiliza el enrutador `gorilla/mux` para un manejo de rutas más flexible (por ejemplo, parámetros de ruta). Necesitarás instalarlo: `go get github.com/gorilla/mux`. * **Manejo de JSON:** Utiliza `encoding/json` para codificar y decodificar datos JSON. * **Códigos de estado HTTP:** Devuelve códigos de estado HTTP apropiados (por ejemplo, 201 Creado, 400 Solicitud incorrecta, 404 No encontrado, 500 Error interno del servidor). * **Comentarios:** Incluye comentarios para explicar el código. * **Dependencias:** Enumera claramente las dependencias. * **Idempotencia:** Este ejemplo no maneja la idempotencia. En un MCP real, necesitarías implementar mecanismos para garantizar que las operaciones sean idempotentes (por ejemplo, utilizando un ID de solicitud único). * **Respuestas de error:** Devuelve respuestas de error más informativas al cliente. * **Registro:** Incluye un registro básico. En un entorno de producción, querrías utilizar una biblioteca de registro más sofisticada. * **Definición de clave de partición:** La función `NewQueryItemsPager` ahora incluye `azcosmos.NewPartitionKeyDefinition()` para especificar que la consulta debe ejecutarse en todas las particiones. Esto es necesario cuando no tienes una clave de partición específica para apuntar. Sin embargo, como se mencionó antes, esto es menos eficiente que apuntar a una partición específica. * **Paginación:** El `listItemsHandler` ahora usa `NewQueryItemsPager` para manejar la paginación. Esto es importante para conjuntos de datos grandes para evitar exceder el tamaño máximo de respuesta. * **Código de estado:** Imprime el código de estado de la respuesta `CreateItem`. **Para ejecutar este ejemplo:** 1. **Instala Go:** Asegúrate de tener Go instalado. 2. **Instala las dependencias:** ```bash go get github.com/Azure/azure-sdk-for-go/sdk/azidentity go get github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos go get github.com/gorilla/mux ``` 3. **Configura las variables de entorno:** ```bash export COSMOSDB_ENDPOINT="<tu_endpoint_de_cosmosdb>" export COSMOSDB_DATABASE="<tu_nombre_de_base_de_datos>" export COSMOSDB_CONTAINER="<tu_nombre_de_contenedor>" ``` Reemplaza los marcadores de posición con tu endpoint de Cosmos DB, nombre de base de datos y nombre de contenedor reales. 4. **Ejecuta el servidor:** ```bash go run main.go ``` **Consideraciones importantes para un MCP real:** * **Autenticación y autorización:** Implementa una autenticación robusta (por ejemplo, utilizando Azure Active Directory) y autorización (por ejemplo, utilizando RBAC) para controlar el acceso al MCP. * **Auditoría:** Registra todas las acciones realizadas a través del MCP con fines de auditoría y cumplimiento. * **Limitación de velocidad:** Implementa la limitación de velocidad para evitar el abuso y proteger tus recursos de Cosmos DB. * **Idempotencia:** Asegúrate de que las operaciones sean idempotentes. * **Manejo de errores y reintentos:** Implementa un manejo de errores integral y lógica de reintento. * **Monitoreo y alertas:** Monitorea la salud y el rendimiento del MCP y configura alertas para problemas críticos. * **Implementación:** Implementa el MCP en un entorno confiable y escalable (por ejemplo, Azure Kubernetes Service). * **Gestión de la configuración:** Utiliza una solución de gestión de la configuración robusta (por ejemplo, Azure App Configuration) para gestionar la configuración del MCP. * **Pruebas:** Escribe pruebas unitarias y de integración exhaustivas. * **Seguridad:** Sigue las mejores prácticas de seguridad para proteger el MCP de vulnerabilidades. * **Estrategia de clave de partición:** Diseña cuidadosamente tu estrategia de clave de partición para garantizar un rendimiento y una escalabilidad óptimos. Este es *el* factor más importante para el rendimiento de Cosmos DB. * **Optimización de consultas:** Optimiza tus consultas para minimizar el consumo de RU/s. Evita los escaneos completos del contenedor. * **Validación de datos:** Valida los datos que se escriben en Cosmos DB para garantizar la calidad de los datos. * **Gestión de esquemas:** Considera utilizar una solución de gestión de esquemas para gestionar el esquema de tus datos. Este ejemplo completo proporciona una base sólida para construir un MCP más completo y robusto para Cosmos DB utilizando el SDK de Go. Recuerda adaptarlo a tus requisitos específicos y seguir las mejores prácticas de seguridad, rendimiento y escalabilidad. ``` I have provided both the code and the Spanish translation of the explanation. This should be a very helpful starting point. Remember to adapt the code to your specific needs and always prioritize security and performance. Good luck!

livewire-flux-mcp

livewire-flux-mcp

MCP server that provides access to Livewire Flux components and layouts documentation, enabling AI assistants to fetch and search through documentation on demand.

TailwindCSS MCP Server

TailwindCSS MCP Server

Provides comprehensive tools for TailwindCSS development including utility class retrieval, CSS-to-Tailwind conversion, and color palette generation. It enables AI assistants to search documentation, generate component templates, and provide framework-specific installation guides.

JSR MCP

JSR MCP

Model Context Protocol server for the JSR (JavaScript Registry)

courtlistener-mcp

courtlistener-mcp

An MCP server providing AI agents access to CourtListener's comprehensive legal database, featuring semantic search, hybrid search, citation verification, and research tools.

Tradingview Chart MCP

Tradingview Chart MCP

Tradingview Chart MCP

AgilePlace MCP Server

AgilePlace MCP Server

Enables AI assistants to interact with AgilePlace for comprehensive project management tasks including board management, card operations, dependency tracking, and bulk updates. Supports natural language queries for managing AgilePlace boards, cards, and team workflows.

my-mcp-server

my-mcp-server

A basic MCP server that implements a calculate tool for arithmetic operations (add, subtract, multiply, divide). It handles requests via stdio.

Agentic Product Protocol MCP Server

Agentic Product Protocol MCP Server

Klarna-style product discovery for AI shopping agents. Makes product catalogs machine-readable so AI agents can search, compare, and purchase products programmatically.

mcp-twfood

mcp-twfood

MCP server for Taiwan's agricultural wholesale market real-time price data, providing 6 tools to search products and query trade data at daily, weekly, monthly, yearly granularities, plus cross-market comparisons.

mcp-bigquery-evals

mcp-bigquery-evals

A BigQuery MCP server with mandatory cost guardrails that dry-run every query before execution, and a measurable accuracy badge from an eval harness.