diff --git a/README.md b/README.md index 8fbc04e..3366662 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,8 @@ - [Handling updates with a service](#handling-updates-with-a-service) - [DX (Developer Experience)](#dx-developer-experience) - [`mypy` / type annotations](#mypy--type-annotations) + - [MCP Documentation Server](#mcp-documentation-server) + - [Setting up MCP Documentation Server](#setting-up-mcp-documentation-server) - [Django Styleguide in the Wild](#django-styleguide-in-the-wild) - [Additional resources / Alternatives](#additional-resources--alternatives) - [Inspiration](#inspiration) @@ -334,7 +336,7 @@ This can actually be a downside (_this is not the case, starting from Django 4.1 The Django's documentation on constraints is quite lean, so you can check the following articles by Adam Johnson, for examples of how to use them: 1. [Using Django Check Constraints to Ensure Only One Field Is Set](https://adamj.eu/tech/2020/03/25/django-check-constraints-one-field-set/) -1. [Django’s Field Choices Don’t Constrain Your Data](https://adamj.eu/tech/2020/01/22/djangos-field-choices-dont-constrain-your-data/) +1. [Django's Field Choices Don't Constrain Your Data](https://adamj.eu/tech/2020/01/22/djangos-field-choices-dont-constrain-your-data/) 1. [Using Django Check Constraints to Prevent Self-Following](https://adamj.eu/tech/2021/02/26/django-check-constraints-prevent-self-following/) ### Properties @@ -2763,6 +2765,14 @@ Additionally, this particular project - +for ANY question about Django Styleguide, use the django-styleguide-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 + +``` + +### For Claude Code + +In a terminal after installing Claude Code, run: + +```bash +claude mcp add-json django-styleguide-docs '{"type":"stdio","command":"uvx" ,"args":["--from", "mcpdoc", "mcpdoc", "--urls", "DjangoStyleguide:https://raw.githubusercontent.com/HackSoftware/Django-Styleguide/master/llms.txt"]}' -s local +``` + +## Testing the Setup + +To test if the setup is working: + +1. Open your IDE +2. Ask a question about the Django Styleguide +3. The IDE should use the MCP server to fetch relevant documentation and provide context-aware answers + +## Troubleshooting + +If you run into issues with Python version incompatibility, you can explicitly specify the filepath to the Python executable in the `uvx` command: + +```json +{ + "mcpServers": { + "django-styleguide-docs-mcp": { + "command": "uvx", + "args": [ + "--python", + "/path/to/python", + "--from", + "mcpdoc", + "mcpdoc", + "--urls", + "DjangoStyleguide:https://raw.githubusercontent.com/HackSoftware/Django-Styleguide/master/llms.txt", + "--transport", + "stdio", + "--port", + "8082", + "--host", + "localhost" + ] + } + } +} +``` \ No newline at end of file