Context7 Smithery AI 대리자 MCP 서버
고급
이것은Engineering, AI분야의자동화 워크플로우로, 18개의 노드를 포함합니다.주로 McpClientTool, Agent, McpTrigger, ToolWorkflow, ExecuteWorkflowTrigger 등의 노드를 사용하며인공지능 기술을 결합하여 스마트 자동화를 구현합니다. Context7과 Gemini를 사용한 문서 검색 AI 대리인
사전 요구사항
- •Google Gemini API Key
사용된 노드 (18)
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
"id": "vqujIu65SFbZUz0n",
"meta": {
"instanceId": "3612a0c89f35a354ddd1216385240db51b4635fde7cae2a0d5004be915b832f3",
"templateCredsSetupCompleted": true
},
"name": "Context7 Smithery AI Agent MCP Server",
"tags": [],
"nodes": [
{
"id": "a42ae423-a348-460e-888c-f3df2b82021d",
"name": "Google Gemini 채팅 모델",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
440,
380
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.5-flash-preview-05-20"
},
"credentials": {
"googlePalmApi": {
"id": "c8jj7D6oz6RJ81qp",
"name": "Google Gemini Context7"
}
},
"typeVersion": 1
},
{
"id": "22f3e783-4310-4d15-a875-cbb400a82c1b",
"name": "context7-resolve-library-id",
"type": "n8n-nodes-mcp.mcpClientTool",
"position": [
1280,
480
],
"parameters": {
"toolName": "resolve-library-id",
"operation": "executeTool",
"connectionType": "http",
"toolParameters": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Tool_Parameters', `Generate a JSON object with the parameters for this tool.\nThe tool expects a JSON object with one **required** key:\n- \"libraryName\": (string) The common name of the software library or framework.\nExample: {\"libraryName\": \"react\"}`, 'json') }}",
"descriptionType": "manual",
"toolDescription": "Resolves a general library name (e.g., 'nextjs', 'mongodb') into a unique Context7-compatible library ID (e.g., '/vercel/next.js', '/mongodb/docs'). Use this tool first to get the correct ID before attempting to fetch its documentation."
},
"credentials": {
"mcpClientHttpApi": {
"id": "CL3sgNzCgbtRRxtL",
"name": "smithery_context7"
}
},
"typeVersion": 1
},
{
"id": "526eab1c-7a08-45eb-8169-7e8d4578c117",
"name": "context7-get-library-docs",
"type": "n8n-nodes-mcp.mcpClientTool",
"position": [
1840,
480
],
"parameters": {
"toolName": "get-library-docs",
"operation": "executeTool",
"connectionType": "http",
"toolParameters": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Tool_Parameters', `Generate a JSON object with the parameters for this tool.\nThe tool expects a JSON object with the following keys:\n- \"context7CompatibleLibraryID\": (string, **required**) The exact Context7-compatible library ID (e.g., \"/vercel/next.js\").\n- \"topic\": (string, optional) A specific topic to focus the documentation on (e.g., \"routing\").\n- \"tokens\": (number, optional, default: 10000) Maximum number of tokens for the documentation. Minimum effective value is 10000.\nExample for required only: {\"context7CompatibleLibraryID\": \"/mongodb/docs\"}\nExample with optional: {\"context7CompatibleLibraryID\": \"/vercel/next.js\", \"topic\": \"authentication\", \"tokens\": 15000}`, 'json') }}",
"descriptionType": "manual",
"toolDescription": "Fetches documentation for a specified library using its Context7-compatible library ID. You can optionally focus on a specific topic within the documentation and set a maximum token limit for the returned content."
},
"credentials": {
"mcpClientHttpApi": {
"id": "CL3sgNzCgbtRRxtL",
"name": "smithery_context7"
}
},
"typeVersion": 1
},
{
"id": "5cafb0d4-19ac-4589-88d8-34b88404e0f1",
"name": "Context7 MCP 서버 트리거",
"type": "@n8n/n8n-nodes-langchain.mcpTrigger",
"position": [
120,
-860
],
"webhookId": "c597b9e9-33bf-41d9-8602-e63d2bee174b",
"parameters": {
"path": "dafdfsdfsdf6e8-ea19-43b7-b337-a5iuodsf98vjfewf"
},
"typeVersion": 1
},
{
"id": "945d8818-c346-44ba-b4c1-56d166a4f381",
"name": "Context7 AI 에이전트",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
880,
-20
],
"parameters": {
"text": "={{ $('Context7 Workflow Start').item.json.query }}",
"options": {
"systemMessage": "You are an AI assistant with access to Context7 tools to help users find software library documentation.\nYour primary functions are to:\n1. **Resolve Library IDs:** When a user asks for documentation for a library like 'Next.js' or 'MongoDB', first use the `resolve-library-id` tool to find its specific Context7-compatible ID (e.g., '/vercel/next.js'). The input for this tool is the `libraryName`.\n2. **Get Library Documentation:** Once you have the `context7CompatibleLibraryID` from the previous step, use the `get-library-docs` tool to fetch the documentation.\n * The required parameter is `context7CompatibleLibraryID`.\n * If the user specifies a particular `topic` (e.g., \"routing in Next.js\"), include this in the `topic` parameter.\n * You can also adjust the `tokens` parameter if a different length of documentation is implicitly or explicitly requested, keeping in mind the default and minimum is 10000.\n\nAlways use `resolve-library-id` before `get-library-docs` if you don't already have the exact Context7-compatible library ID. Be precise with the IDs."
},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "1b0cd3cc-8566-4cb5-932c-005149a2467b",
"name": "Context7 워크플로 시작",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
100,
-20
],
"parameters": {
"workflowInputs": {
"values": [
{
"name": "query"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "e955aa60-2b80-45d5-885b-24b7fe56a426",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
700,
520
],
"parameters": {
"sessionKey": "={{ $execution.id }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "4927c593-5762-4a26-87eb-8a7e0a4b3d32",
"name": "call_context7_ai_agent",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
280,
-460
],
"parameters": {
"workflowId": {
"__rl": true,
"mode": "list",
"value": "vqujIu65SFbZUz0n",
"cachedResultName": "Context7 Smithery AI Agent MCP Server"
},
"description": "=Processes a natural language query to find and retrieve software library documentation using Context7. It intelligently uses sub-tools to first resolve library names to Context7 IDs and then fetches the relevant documentation.",
"workflowInputs": {
"value": {
"query": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('query', `The user's natural language question or request for software library documentation. For example: 'How do I implement authentication in Next.js?' or 'Get docs for MongoDB aggregation framework'.`, 'string') }}"
},
"schema": [
{
"id": "query",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "query",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"typeVersion": 2.2
},
{
"id": "d72a2661-5622-4bfa-9d42-8c96b5fef877",
"name": "스티키 노트",
"type": "n8n-nodes-base.stickyNote",
"position": [
1700,
-40
],
"parameters": {
"width": 680,
"height": 320,
"content": "## MCP JSON for Roo Code etc\n\nTo use this in Roo Code, Cline etc use\n\n\"n8n-context7\": {\n \"url\": \"https://n8n.coolify.au/mcp/dafd56e8-ea19-43b7-b337-a5881c3bc541/sse\",\n \"alwaysAllow\": [\n \"call_context7_ai_agent\"\n ]\n }\n\nwhere the url is the the path that you get from the mcp server node in n8n"
},
"typeVersion": 1
},
{
"id": "c0dc815b-3d0f-49e2-8da0-08d2f45d0991",
"name": "스티키 노트1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-260,
-1140
],
"parameters": {
"color": 4,
"width": 580,
"height": 420,
"content": "This node is the public entry point for the Context7 AI Agent service.\nIt exposes an MCP (Multi-Agent Collaboration Protocol) SSE (Server-Sent Events) endpoint.\n\n- Path: The long, random path (e.g., /dafdfsdfsdf... ) acts as a simple 'security by obscurity' measure.\n- Function: It listens for incoming HTTP POST requests to its SSE endpoint.\n- Tool Exposed: This trigger makes the 'call_context7_ai_agent' tool (defined by the connected Tool Workflow node) available to external MCP clients.\n- Input: Expects a JSON payload from the client, typically like: {\"input\": {\"query\": \"user's question\"}}\n- Output: Streams SSE events back to the client, containing the AI agent's responses and intermediate steps."
},
"typeVersion": 1
},
{
"id": "adc54a99-b04d-40be-a9a4-25f837453c14",
"name": "스티키 노트2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-260,
-680
],
"parameters": {
"color": 4,
"width": 580,
"height": 340,
"content": "This node represents the tool that external clients call via the MCP Server Trigger.\nWhen triggered, it executes the separate \"Context7 Smithery AI Agent MCP Server\" sub-workflow (ID: vqujIu65SFbZUz0n).\n\n- Action: Invokes the AI agent sub-workflow to process the user's request.\n- Inputs to Sub-Workflow:\n - 'query': The user's natural language question, received from the external MCP client. This is passed directly to the sub-workflow.\n- Output: The result from the sub-workflow (the AI agent's final response or stream) is passed back through the MCP Server Trigger to the client."
},
"typeVersion": 1
},
{
"id": "5cc037d1-4155-49dc-86f5-7af9976149bf",
"name": "스티키 노트3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1700,
-660
],
"parameters": {
"color": 2,
"width": 680,
"height": 600,
"content": "## Main MCP Server Workflow Overview\n\nThis workflow acts as the public gateway for the Context7 AI Documentation Agent.\n\n1. **`Context7 MCP Server Trigger`**:\n * Receives requests from external clients (e.g., Roo Code, Cline) at its unique SSE endpoint URL.\n * The path is intentionally long and random for basic access control.\n * Client JSON for Roo Code etc.:\n \"n8n-context7\": {\n \"url\": \"https://n8n.coolify.au/mcp/YOUR_LONG_RANDOM_PATH/sse\",\n \"alwaysAllow\": [\n \"call_context7_ai_agent\" // This is the tool name defined in the Tool Workflow node\n ]\n }\n (Replace YOUR_LONG_RANDOM_PATH with the actual path from the trigger node)\n\n2. **`call_context7_ai_agent` (Tool Workflow Node)**:\n * This is the \"tool\" the MCP Server Trigger exposes.\n * It calls the separate AI Agent Sub-Workflow (ID: vqujIu65SFbZUz0n), passing the user's `query`.\n\n**Data Flow:**\nExternal Client -> MCP Server Trigger -> call_context7_ai_agent (Tool) -> AI Agent Sub-Workflow -> (Response Stream) -> MCP Server Trigger -> External Client\n\n3. ** There is a video I've made on youtube that explains this workflow a bit and why I created it: https://youtu.be/dudvmyp7Pyg?si=N59DYTe2WE6GPlvf"
},
"typeVersion": 1
},
{
"id": "79bf63c1-b325-4a3c-950e-30df5aef15e4",
"name": "스티키 노트4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-20,
-200
],
"parameters": {
"color": 5,
"width": 360,
"height": 200,
"content": "This is the entry point for the AI Agent sub-workflow.\n- Receives:\n - 'query': The user's natural language question from the main workflow.\n- Passes data to: The IF node (for API key check, if implemented) or directly to the AI Agent."
},
"typeVersion": 1
},
{
"id": "2486cacc-b06a-4e30-b363-456930cf0ea5",
"name": "스티키 노트5",
"type": "n8n-nodes-base.stickyNote",
"position": [
760,
-280
],
"parameters": {
"color": 5,
"width": 560,
"height": 440,
"content": "The core AI logic unit.\n- Model: Uses Google Gemini.\n- System Prompt: Instructs the AI on how to use the Context7 tools.\n- Tools: Has access to 'context7-resolve-library-id' and 'context7-get-library-docs'.\n- Memory: Connected to 'Simple Memory' using the current execution ID ({{ $execution.id }}) as the session key for conversation context.\n- Input: Receives the user's 'query'.\n- Output: Generates a response by orchestrating calls to its tools based on the query."
},
"typeVersion": 1
},
{
"id": "f5f12aa6-d90a-419c-9baa-2c7c451a71d1",
"name": "스티키 노트6",
"type": "n8n-nodes-base.stickyNote",
"position": [
580,
640
],
"parameters": {
"color": 6,
"width": 360,
"height": 200,
"content": "Provides conversational memory for the AI Agent.\n- Type: Window Buffer Memory (keeps a sliding window of recent messages).\n- Session Key: Uses `{{ $execution.id }}`. This ensures that memory is unique to each individual execution of this sub-workflow, preventing cross-talk between different user requests."
},
"typeVersion": 1
},
{
"id": "d2598e8e-3931-436f-a480-b4bef659bccb",
"name": "스티키 노트7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1100,
640
],
"parameters": {
"color": 6,
"width": 480,
"height": 500,
"content": "This node allows the AI Agent to use the external 'resolve-library-id' Context7 MCP tool.\n\n- Connection: Uses the 'smithery_context7' credential to communicate with the Context7 MCP service.\n- Action: When invoked by the AI Agent, this node makes a call to the Context7 'resolve-library-id' tool.\n- Purpose of External Tool: To convert a common library name (e.g., \"react\") into a Context7-specific ID (e.g., \"/facebook/react\").\n- AI Agent Interaction:\n - The AI Agent's system prompt guides it to use this tool first to get a library ID.\n - The \"Tool Parameters\" for this node are configured to use an AI-generated JSON object. The AI is prompted with: \"Generate a JSON object with the parameters for this tool. The tool expects a JSON object with one **required** key: - \"libraryName\": (string) The common name of the software library or framework. Example: {\\\"libraryName\\\": \\\"react\\\"}\"\n - The AI Agent will construct this JSON (e.g., `{\"libraryName\": \"nextjs\"}`) and pass it to this node.\n- Output: Returns the Context7-compatible library ID to the AI Agent."
},
"typeVersion": 1
},
{
"id": "7bebd852-75e5-427e-a3ee-781cd85f20e6",
"name": "스티키 노트8",
"type": "n8n-nodes-base.stickyNote",
"position": [
1620,
640
],
"parameters": {
"color": 6,
"width": 520,
"height": 500,
"content": "This node allows the AI Agent to use the external 'get-library-docs' Context7 MCP tool.\n\n- Connection: Uses the 'smithery_context7' credential to communicate with the Context7 MCP service.\n- Action: When invoked by the AI Agent, this node makes a call to the Context7 'get-library-docs' tool.\n- Purpose of External Tool: To fetch documentation for a library, given its Context7-specific ID.\n- AI Agent Interaction:\n - The AI Agent's system prompt guides it to use this tool after obtaining a `context7CompatibleLibraryID` (usually from the 'resolve-library-id' tool).\n - The \"Tool Parameters\" for this node are configured to use an AI-generated JSON object. The AI is prompted with details about expected keys like `context7CompatibleLibraryID` (required), `topic` (optional), and `tokens` (optional).\n - Example JSON the AI might construct: `{\"context7CompatibleLibraryID\": \"/vercel/next.js\", \"topic\": \"routing\"}`.\n- Output: Returns the fetched library documentation (or relevant snippets) to the AI Agent."
},
"typeVersion": 1
},
{
"id": "f4749f9a-6f9e-45c5-b6a9-a89d4dc77dec",
"name": "스티키 노트9",
"type": "n8n-nodes-base.stickyNote",
"position": [
500,
-1380
],
"parameters": {
"color": 7,
"width": 1140,
"height": 1040,
"content": "## n8n AI Agent as an MCP Service (Context7 Docs Example)\n\n**What This Workflow Does:**\nThis n8n setup transforms a complex AI agent into a single, callable tool exposed over an MCP (Multi-Agent Collaboration Protocol) SSE (Server-Sent Events) endpoint. It allows external clients (like development environments, other AI agents, or custom applications) to leverage the power of an n8n-hosted AI agent with a simple natural language query.\n\n**How It Works:**\n1. **`Context7 MCP Server Trigger` (This Workflow):** Creates a public SSE endpoint. Its path is kept long and random for basic security by obscurity. This trigger exposes the `call_context7_ai_agent` tool.\n2. **`call_context7_ai_agent` (Tool Workflow Node, This Workflow):** This node is the \"tool\" offered by the MCP server. When called by a client, it doesn't do the AI work itself; instead, it invokes a separate sub-workflow.\n3. **AI Agent Sub-Workflow (e.g., \"Context7 Smithery AI Agent MCP Server\" - ID: vqujIu65SFbZUz0n):** This is where the magic happens!\n * It receives the `query` from the main workflow.\n * A `Context7 AI Agent` node, powered by a model like Google Gemini, orchestrates the task.\n * The agent uses connected tools:\n * `context7-resolve-library-id`: To find the correct ID for a software library.\n * `context7-get-library-docs`: To fetch documentation for that library.\n * It uses `Simple Memory` (scoped by execution ID) to maintain conversational context if needed for multi-turn interactions (though this example is primarily single-shot).\n\n**Why This Pattern is Useful & The Smithery Connection:**\n\n* **Simplifies Client-Side Logic:** Clients (like **Smithery's Roo code**, VS Code extensions, or other AI systems) don't need to manage complex multi-step reasoning, tool selection, or API calls to different services. They just call *one tool* (`call_context7_ai_agent`) with a plain language request (e.g., \"What is flexbox in Tailwind CSS?\").\n* **Reduces Client-Side Token Usage:** All the detailed system prompts, tool descriptions for the sub-tools (resolve-id, get-docs), and the actual execution of these tools happen *within n8n*. The client only sends a short query and receives the processed result. This is incredibly efficient, especially if the client is another LLM.\n* **Centralized Agent Capabilities:** You can update, enhance, or swap out models and tools within your n8n AI agent sub-workflow without needing to update any of the client applications that consume it.\n* **Ideal for Agentic Systems:** This pattern is a cornerstone of building robust **agentic systems**. By encapsulating specialized AI capabilities within n8n and exposing them as callable MCP tools:\n * You can create a \"team\" of specialized n8n agents.\n * A primary agent (in Smithery, or another n8n workflow) can delegate tasks to these specialized n8n agent-tools.\n * It promotes modularity, reusability, and scalability in AI application development.\n* **Leverage n8n's Ecosystem:** Build your agent with n8n's visual interface, manage credentials securely, and easily integrate with hundreds of other services if your agent needs them.\n\n**Client Configuration Example (for Roo Code/Cline):**\nTo connect to this n8n agent from a client like Roo code, you'd configure it with the MCP server details:\n```json\n\"n8n-context7-agent\": { // A descriptive name for your client\n \"url\": \"https://YOUR_N8N_INSTANCE/mcp/YOUR_LONG_RANDOM_PATH/sse\", // Path from MCP Server Trigger\n \"alwaysAllow\": [\n \"call_context7_ai_agent\" // Name of the Tool Workflow node\n ]\n}"
},
"typeVersion": 1
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "785e4ebf-bb80-48e3-872c-40d1b9a8d14b",
"connections": {
"e955aa60-2b80-45d5-885b-24b7fe56a426": {
"ai_memory": [
[
{
"node": "945d8818-c346-44ba-b4c1-56d166a4f381",
"type": "ai_memory",
"index": 0
}
]
]
},
"4927c593-5762-4a26-87eb-8a7e0a4b3d32": {
"ai_tool": [
[
{
"node": "5cafb0d4-19ac-4589-88d8-34b88404e0f1",
"type": "ai_tool",
"index": 0
}
]
]
},
"1b0cd3cc-8566-4cb5-932c-005149a2467b": {
"main": [
[
{
"node": "945d8818-c346-44ba-b4c1-56d166a4f381",
"type": "main",
"index": 0
}
]
]
},
"a42ae423-a348-460e-888c-f3df2b82021d": {
"ai_languageModel": [
[
{
"node": "945d8818-c346-44ba-b4c1-56d166a4f381",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"526eab1c-7a08-45eb-8169-7e8d4578c117": {
"ai_tool": [
[
{
"node": "945d8818-c346-44ba-b4c1-56d166a4f381",
"type": "ai_tool",
"index": 0
}
]
]
},
"22f3e783-4310-4d15-a875-cbb400a82c1b": {
"ai_tool": [
[
{
"node": "945d8818-c346-44ba-b4c1-56d166a4f381",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}자주 묻는 질문
이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
고급 - 엔지니어링, 인공지능
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
Brave 검색 지능 대리자
Brave 검색 API와 Google Gemini MCP 서버를 기반으로 한 지능형 네트워크 및 로컬 검색
Mcp Client Tool
Agent
Mcp Trigger
+
Mcp Client Tool
Agent
Mcp Trigger
26 노드Jez
엔지니어링
로컬 이벤트 파인더
AI 기반 로컬 이벤트 파인더: 멀티 툴 검색 지원
Jina Ai Tool
Mcp Client Tool
Agent
+
Jina Ai Tool
Mcp Client Tool
Agent
28 노드Jez
인공지능
MCP 서버 Github 인공지능 도구
MCP 서버 Github 대리기 도구
Set
Agent
Mcp Trigger
+
Set
Agent
Mcp Trigger
15 노드William Lettieri
엔지니어링
기술 레이더
사용SQL데이터库、RAG및路由에이전트构建AI驱动의技术雷达顾问
If
Code
Cron
+
If
Code
Cron
53 노드Sean Lon
엔지니어링
AI 어시스턴트와 Airtable 대화 및 데이터 분석
AI스마트어시스턴트与Airtable对话及데이터분석
If
Set
Merge
+
If
Set
Merge
41 노드Mark Shcherbakov
엔지니어링
에이전트 접근 제어 템플릿
사용Airtable및Telegram의AI에이전트访问控制(RBAC)
If
Set
Airtable
+
If
Set
Airtable
36 노드Mario
엔지니어링
워크플로우 정보
난이도
고급
노드 수18
카테고리2
노드 유형8
저자
Jez
@jezI'm passionate about combining traditional web development with AI and automation to create impactful online solutions. As Founder & CEO of Jezweb, an award-winning Newcastle, Australia agency, I lead a 30+ person team delivering high-quality web design, development, and hosting services to over 3000 clients.
외부 링크
n8n.io에서 보기 →
이 워크플로우 공유