From f7556c9bd6a3933ca1aad1e5e3150bc369e65688 Mon Sep 17 00:00:00 2001 From: Lance Martin Date: Fri, 21 Mar 2025 13:29:08 -0700 Subject: [PATCH] Update README with rules --- README.md | 59 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b5e6d01..d01430d 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,19 @@ npx @modelcontextprotocol/inspector ``` * Confirm that the server is running in your `Cursor Settings/MCP` tab. +* Best practice is to then update Cursor Global (User) rules. +* Open Cursor `Settings/Rules` and update `User Rules` with the following (or similar): + +``` +for ANY question about LangGraph, use the langgraph-docs-mcp server to help answer -- ++ call list_doc_sources tool to get the available llms.txt file ++ call fetch_docs tool to read it ++ reflect on the urls in llms.txt ++ reflect on the input question ++ call fetch_docs on any urls relevant to the question ++ use this to answer the question +``` + * `CMD+L` (on Mac) to open chat. * Ensure `agent` is selected. @@ -82,14 +95,6 @@ npx @modelcontextprotocol/inspector Then, try an example prompt, such as: ``` -use the langgraph-docs-mcp server to answer any LangGraph questions -- -+ call list_doc_sources tool to get the available llms.txt file -+ call fetch_docs tool to read it -+ reflect on the urls in llms.txt -+ reflect on the input question -+ call fetch_docs on any urls relevant to the question -+ use this to answer the question - what are types of memory in LangGraph? ``` @@ -103,8 +108,16 @@ what are types of memory in LangGraph? ![Screenshot 2025-03-19 at 11 02 52 AM](https://github.com/user-attachments/assets/d45b427c-1c1e-4602-820a-7161a310af24) -* `CMD+L` (on Mac) to open Cascade and refresh MCP servers. -* Available MCP servers will be listed, showing `langgraph-docs-mcp` as connected. +* Update `Windsurf Rules/Global rules` with the following (or similar): + +``` +for ANY question about LangGraph, use the langgraph-docs-mcp server to help answer -- ++ call list_doc_sources tool to get the available llms.txt file ++ call fetch_docs tool to read it ++ reflect on the urls in llms.txt ++ reflect on the input question ++ call fetch_docs on any urls relevant to the question +``` ![Screenshot 2025-03-18 at 2 02 12 PM](https://github.com/user-attachments/assets/5a29bd6a-ad9a-4c4a-a4d5-262c914c5276) @@ -119,6 +132,19 @@ Then, try the example prompt: * Update with `langgraph-docs-mcp` as noted above. * Restart Claude Desktop app. +> Note: currently (3/21/25) it appears that Claude Code does not support `rules` for global rules, so appending the following to your prompt. + +``` + +for ANY question about LangGraph, use the langgraph-docs-mcp server to help answer -- ++ call list_doc_sources tool to get the available llms.txt file ++ call fetch_docs tool to read it ++ reflect on the urls in llms.txt ++ reflect on the input question ++ call fetch_docs on any urls relevant to the question + +``` + ![Screenshot 2025-03-18 at 2 05 54 PM](https://github.com/user-attachments/assets/228d96b6-8fb3-4385-8399-3e42fa08b128) * You will see your tools visible in the bottom right of your chat input. @@ -146,6 +172,19 @@ $ /mcp ![Screenshot 2025-03-18 at 2 13 49 PM](https://github.com/user-attachments/assets/eb876a0e-27b4-480e-8c37-0f683f878616) +> Note: currently (3/21/25) it appears that Claude Code does not support `rules` for global rules, so appending the following to your prompt. + +``` + +for ANY question about LangGraph, use the langgraph-docs-mcp server to help answer -- ++ call list_doc_sources tool to get the available llms.txt file ++ call fetch_docs tool to read it ++ reflect on the urls in llms.txt ++ reflect on the input question ++ call fetch_docs on any urls relevant to the question + +``` + Then, try the example prompt: * It will ask to approve tool calls.