Update CLAUDE.md with FastMCP migration details
- Document migration from low-level MCP to FastMCP 2.0 - Update project structure with new files - Add FastMCP server features and error handling improvements - Update version history with all recent changes - Add Claude Desktop integration section - Update troubleshooting for common FastMCP issues 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
75ffe33008
commit
66c4c3cb18
76
CLAUDE.md
76
CLAUDE.md
@ -24,7 +24,7 @@ vultr-dns-mcp domains list
|
|||||||
vultr-dns-mcp records list example.com
|
vultr-dns-mcp records list example.com
|
||||||
|
|
||||||
# As MCP server
|
# As MCP server
|
||||||
uv run python -m vultr_dns_mcp.server --api-key YOUR_API_KEY
|
uv run python -m vultr_dns_mcp
|
||||||
```
|
```
|
||||||
|
|
||||||
## Development Setup
|
## Development Setup
|
||||||
@ -116,27 +116,42 @@ Following FastMCP testing best practices:
|
|||||||
```
|
```
|
||||||
vultr-dns-mcp/
|
vultr-dns-mcp/
|
||||||
├── src/vultr_dns_mcp/
|
├── src/vultr_dns_mcp/
|
||||||
|
│ ├── __init__.py # Package initialization with exports
|
||||||
|
│ ├── __main__.py # Module entry point for python -m
|
||||||
│ ├── client.py # High-level DNS client
|
│ ├── client.py # High-level DNS client
|
||||||
│ ├── server.py # Core Vultr API client
|
│ ├── server.py # Core Vultr API client with exceptions
|
||||||
│ ├── mcp_server.py # MCP server implementation
|
│ ├── fastmcp_server.py # FastMCP server implementation
|
||||||
│ └── cli.py # Command-line interface
|
│ └── cli.py # Command-line interface
|
||||||
├── tests/ # Comprehensive test suite
|
├── tests/ # Comprehensive test suite
|
||||||
├── docs/ # Documentation
|
├── CLAUDE.md # This documentation file
|
||||||
└── pyproject.toml # Project configuration
|
├── CLAUDE_DESKTOP_SETUP.md # Claude Desktop integration guide
|
||||||
|
├── README.md # Professional project documentation
|
||||||
|
└── pyproject.toml # Project configuration with FastMCP
|
||||||
```
|
```
|
||||||
|
|
||||||
## Key Features
|
## Key Features
|
||||||
|
|
||||||
|
### FastMCP Server Implementation
|
||||||
|
- Built on FastMCP 2.0 framework for better Claude Desktop compatibility
|
||||||
|
- All tools use proper async/await patterns
|
||||||
|
- 12 comprehensive DNS management tools
|
||||||
|
|
||||||
### MCP Tools (12 total)
|
### MCP Tools (12 total)
|
||||||
- Domain management: list, create, delete, get details
|
- Domain management: list, create, delete, get details
|
||||||
- DNS record operations: CRUD for all record types
|
- DNS record operations: CRUD for all record types
|
||||||
- Validation: Pre-creation validation with suggestions
|
- Validation: Pre-creation validation with suggestions
|
||||||
- Analysis: Configuration analysis with security recommendations
|
- Analysis: Configuration analysis with security recommendations
|
||||||
|
- Setup utilities: Quick website and email DNS configuration
|
||||||
|
|
||||||
### MCP Resources
|
### Enhanced Error Handling
|
||||||
- Domain discovery endpoints
|
- Custom exception hierarchy: VultrAPIError, VultrAuthError, VultrRateLimitError, etc.
|
||||||
- DNS record resources
|
- HTTP timeout configuration (30s total, 10s connect)
|
||||||
- Configuration capabilities
|
- Specific error types based on HTTP status codes
|
||||||
|
|
||||||
|
### Modern Development Features
|
||||||
|
- Full uv package manager integration
|
||||||
|
- IPv6 validation using Python's ipaddress module
|
||||||
|
- Comprehensive test coverage with improvement validation
|
||||||
|
|
||||||
### CLI Commands
|
### CLI Commands
|
||||||
- Domain operations: `domains list|create|delete|get`
|
- Domain operations: `domains list|create|delete|get`
|
||||||
@ -146,9 +161,15 @@ vultr-dns-mcp/
|
|||||||
## Version History
|
## Version History
|
||||||
|
|
||||||
### Current: 1.0.1
|
### Current: 1.0.1
|
||||||
- Fixed FastMCP server initialization
|
- **MAJOR**: Migrated from low-level MCP to FastMCP 2.0 framework
|
||||||
- Corrected MCP server creation for current FastMCP version
|
- **FEATURE**: Added custom exception hierarchy for better error handling
|
||||||
- Simplified initialization to use only name parameter
|
- **FEATURE**: Replaced basic IPv6 validation with Python's ipaddress module
|
||||||
|
- **FEATURE**: Added HTTP request timeouts (30s total, 10s connect)
|
||||||
|
- **FEATURE**: Full uv package manager integration throughout project
|
||||||
|
- **FEATURE**: Created comprehensive Claude Desktop setup documentation
|
||||||
|
- **FIX**: Resolved event loop issues with proper async/await patterns
|
||||||
|
- **IMPROVEMENT**: Enhanced README with professional structure and badges
|
||||||
|
- **IMPROVEMENT**: Added test suite for validating all improvements
|
||||||
|
|
||||||
### 1.0.0 - Initial Release
|
### 1.0.0 - Initial Release
|
||||||
- Complete MCP server implementation
|
- Complete MCP server implementation
|
||||||
@ -210,10 +231,11 @@ Use the GitHub Actions "Publish to PyPI" workflow with manual trigger.
|
|||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
### Common Issues
|
### Common Issues
|
||||||
- **ImportError**: Run `pip install -e .` from repository root
|
- **ImportError**: Run `uv sync` or `pip install -e .` from repository root
|
||||||
- **AsyncioError**: Ensure `asyncio_mode = "auto"` in pyproject.toml
|
- **AsyncioError**: FastMCP handles async properly, ensure tools use `async def`
|
||||||
- **MockError**: Check that test fixtures are properly configured
|
- **Event Loop Error**: Use `await` instead of `asyncio.run()` in FastMCP tools
|
||||||
- **API Errors**: Verify VULTR_API_KEY environment variable
|
- **MCP Connection**: Ensure Claude Desktop config uses absolute Python path
|
||||||
|
- **API Errors**: Verify VULTR_API_KEY environment variable is set
|
||||||
|
|
||||||
### Test Debugging
|
### Test Debugging
|
||||||
```bash
|
```bash
|
||||||
@ -232,6 +254,28 @@ pytest --collect-only tests/
|
|||||||
python -c "from vultr_dns_mcp.server import create_mcp_server"
|
python -c "from vultr_dns_mcp.server import create_mcp_server"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Claude Desktop Integration
|
||||||
|
|
||||||
|
### Quick Setup
|
||||||
|
1. Install the package: `pip install vultr-dns-mcp`
|
||||||
|
2. Add to Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"vultr-dns": {
|
||||||
|
"command": "/path/to/python",
|
||||||
|
"args": ["-m", "vultr_dns_mcp"],
|
||||||
|
"env": {
|
||||||
|
"VULTR_API_KEY": "your-api-key"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
3. Restart Claude Desktop
|
||||||
|
|
||||||
|
For detailed setup instructions, see `CLAUDE_DESKTOP_SETUP.md`.
|
||||||
|
|
||||||
## Support & Documentation
|
## Support & Documentation
|
||||||
|
|
||||||
- **GitHub**: https://github.com/rsp2k/vultr-dns-mcp
|
- **GitHub**: https://github.com/rsp2k/vultr-dns-mcp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user