We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/fringemonkey/mcp-dc'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
README.md•2.94 kB
# GitHub Codespaces Configuration
This repository is configured to work seamlessly with GitHub Codespaces, providing a complete development environment for the NetBox MCP Server.
## Quick Start
1. **Open in Codespaces**: Click the "Code" button and select "Codespaces" → "Create codespace on main"
2. **Wait for setup**: The devcontainer will automatically set up the environment (takes ~2-3 minutes)
3. **Start development**: The environment will be ready with all services running
## What's Included
- **Python 3.12** with all development tools
- **VS Code** with Python extensions pre-configured
- **Docker & Docker Compose** for local services
- **Mock NetBox & Vault** servers for development
- **PostgreSQL** database for state confidence
- **Pre-commit hooks** for code quality
- **Comprehensive test suite**
## Available Services
| Service | URL | Description |
|---------|-----|-------------|
| NetBox Mock | https://your-codespace-8000.app.github.dev | Mock NetBox API server |
| Vault Mock | https://your-codespace-8200.app.github.dev | Mock HashiCorp Vault server |
| PostgreSQL | localhost:5432 | Database for state confidence |
| Redis | localhost:6379 | Optional caching layer |
## Development Commands
```bash
# Run all tests
./scripts/test-mcp-server.sh
# Start development services
./scripts/start-dev-services.sh
# Stop development services
./scripts/stop-dev-services.sh
# Run specific test categories
pytest -m unit
pytest -m integration
pytest -m performance
# Format and lint code
black src/ tests/
isort src/ tests/
flake8 src/ tests/
mypy src/
```
## Environment Variables
The Codespace automatically configures these environment variables:
- `NETBOX_URL=https://your-codespace-8000.app.github.dev`
- `VAULT_ADDR=https://your-codespace-8200.app.github.dev`
- `POSTGRES_HOST=localhost`
- `POSTGRES_DB=mcp_state`
- `MCP_SERVER_LOG_LEVEL=DEBUG`
## Learning Resources
- [MCP Documentation](https://modelcontextprotocol.io/)
- [NetBox Documentation](https://docs.netbox.dev/)
- [HashiCorp Vault Documentation](https://www.vaultproject.io/docs)
- [PostgreSQL Documentation](https://www.postgresql.org/docs/)
## Troubleshooting
### Services not accessible
- Check that the Codespace is fully started
- Verify port forwarding is enabled
- Check the "Ports" tab in VS Code
### Database connection issues
```bash
# Check PostgreSQL status
docker-compose -f docker-compose.dev.yml ps postgres
# Connect to database
docker-compose -f docker-compose.dev.yml exec postgres psql -U mcp_user -d mcp_state
```
### Test failures
```bash
# Run tests with verbose output
pytest tests/ -v --tb=short
# Run specific test
pytest tests/test_unit_tools.py::TestHostTools::test_list_hosts_success -v
```
## Contributing
1. Make your changes in the Codespace
2. Run tests: `./scripts/test-mcp-server.sh`
3. Format code: `black src/ tests/ && isort src/ tests/`
4. Commit and push your changes
Happy coding! 🚀