Metadata-Version: 2.3
Name: mcp-django-shell
Version: 0.9.0
Summary: MCP server providing a stateful Django shell for LLM assistants.
Author: Josh Thomas
Author-email: Josh Thomas <josh@joshthomas.dev>
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Django
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.1
Classifier: Framework :: Django :: 5.2
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Dist: django>4.2
Requires-Dist: fastmcp>=2.11.3
Requires-Dist: mcp-django>=0.1.0,<1.0.0
Requires-Dist: pydantic[email]>=2.11.7
Requires-Python: >=3.10
Project-URL: Documentation, https://github.com/joshuadavidthomas/mcp-django#README
Project-URL: Issues, https://github.com/joshuadavidthomas/mcp-django/issues
Project-URL: Source, https://github.com/joshuadavidthomas/mcp-django
Description-Content-Type: text/markdown

# mcp-django-shell

Django shell tools for the [mcp-django](https://github.com/joshuadavidthomas/mcp-django) Model Context Protocol server.

## ⚠️ Security Warning

This package provides unrestricted shell access to your Django project. It executes arbitrary Python code with full access to your database and file system.

**NEVER install this in production environments!**

## Installation

This package is distributed as an optional extra of the main `mcp-django` package:

```bash
pip install "mcp-django[shell]"
```

## Features

The `mcp-django-shell` package adds two tools to the base MCP server:

- **`django_shell`** - Execute Python code in a persistent Django shell session
- **`django_reset`** - Reset the session, clearing all variables and imports

These tools enable LLM assistants to:

- Write and execute Python code directly in your Django environment
- Maintain state between calls (imports, variables persist)
- Query and modify your database using the Django ORM
- Debug and test code interactively

## Documentation

For full documentation, configuration, and usage instructions, see the main package:

[https://github.com/joshuadavidthomas/mcp-django](https://github.com/joshuadavidthomas/mcp-django)

## License

mcp-django-shell is licensed under the MIT license. See the [LICENSE](https://github.com/joshuadavidthomas/mcp-django/blob/main/LICENSE) file for details.
