KM

kyopark2014/mcp

Developer tools

This page was translated automatically. Technical details may differ from the original. View the original

41 stars 9 forks Quality 83 Trend 32Apache-2.0

It shows how to use model-context-protocol.

Overview

MCP (Model Context Protocol) is rapidly spreading as a key interface for generative AI applications that utilize external data. It started as an open-source project on Anthropic in November 2024 and is currently supported not only by Cursor but also by OpenAI. Here, we explain how applications created with LangGraph using MCP with LangChain utilize MCP. The RAG implemented here is implemented as Amazon's fully managed RAG service, Knowledge Base, so tasks such as extracting text, synchronizing, and chunking documents can be easily performed, and images and tables can be analyzed using multimodals. Here, the API was configured using AWS Lambda to make RAG easily accessible from the MCP server. The architecture below shows configuring an agent including MCP in an AWS environment. Agents can utilize external data sources by utilizing the MCP server/client architecture. The MCP client communicates via stdio/SSE based on the MCP server and JSON-RPC protocol. When using Stdio, the MCP server is composed of code like Python and Java, and when the client requests it, it collects or delivers data via RAG or the internet. When using SSE, the MCP client and server communicate via IP. Here, the application UI is configured using Streamlit, and users use ALB - CloudFront to access the application via HTTPS via the browser. Additionally, this section explains how to develop an MCP-based application using LangGraph, which offers better customization.

Overview (machine translated)

MCP (Model Context Protocol) is rapidly spreading as a key interface for generative AI applications that utilize external data. It started as an open-source project on Anthropic in November 2024 and is currently supported not only by Cursor but also by OpenAI. Here, we explain how applications created with LangGraph using MCP with LangChain utilize MCP. The RAG implemented here is implemented as Amazon’s fully managed RAG service, Knowledge Base, so tasks such as extracting text, synchronizing, and chunking documents can be easily performed, and images and tables can be analyzed using multimodals. Here, the API was configured using AWS Lambda to make RAG easily accessible from the MCP server.

The architecture below shows configuring an agent including MCP in an AWS environment. Agents can utilize external data sources by utilizing the MCP server/client architecture. The MCP client communicates via stdio/SSE based on the MCP server and JSON-RPC protocol. When using Stdio, the MCP server is composed of code like Python and Java, and when the client requests it, it collects or delivers data via RAG or the internet. When using SSE, the MCP client and server communicate via IP. Here, the application UI is configured using Streamlit, and users use ALB - CloudFront to access the application via HTTPS via the browser. Additionally, this section explains how to develop an MCP-based application using LangGraph, which offers better customization.

Leveraging MCP

MCP Basic

Users can connect to the MCP server not only through AI tools like Claude Desktop and Cursor installed on their computers, but also through applications mainly developed in the form of agents. The MCP server provides the capabilities it can perform in response to requests from the MCP client and handles the client’s requests.

This page was translated automatically. Technical details may differ from the original.

Install

npx -y @smithery/cli@latest run @gradusnikov/google-search-mcp-server --config {\"googleCseId\":\"b5cd8c527fbd64b72\ \"googleApiKey\":\"AIzbSyDQlYpck8-9TbBSuxoew1luOGVB6unRPNk\"}
New to MCP? Start with the mcpskill.org guide →

Configuration

from mcp import ClientSession, StdioServerParameters def load_mcp_server_parameters(): mcp_json = json.loads(mcp_config) mcpServers = mcp_json.get("mcpServers") command = "" args = [] if mcpServers is not None: for server in mcpServers: config = mcpServers.get(server) if "command" in config: command = config["command"] if "args" in config: args = config["args"] break return StdioServerParameters( command=command, args=args )