Spaces:
Running
Running
A newer version of the Gradio SDK is available:
5.33.1
π A1D MCP Server - Deployment Guide
π Quick Deployment to Hugging Face Space
Method 1: Using the Push Script (Recommended)
Run the push script:
./push_to_space.sh
When prompted for credentials:
- Username:
aigchacker
(your Hugging Face username) - Password: Your Hugging Face token (not your account password)
- Username:
Get your Hugging Face token:
- Go to: https://huggingface.co/settings/tokens
- Click "New token"
- Name:
a1d-mcp-server
- Type:
Write
- Click "Generate a token"
- Copy the token
Method 2: Manual Git Push
# Ensure you're in the project directory
cd /path/to/a1d-mcp-server-hf
# Check git status
git status
# Push to Space
git push -u origin main
π§ Post-Deployment Configuration
1. Set Environment Variables in Space
- Go to your Space: https://huggingface.co/spaces/aigchacker/a1d-mcp-server
- Click "Settings" tab
- Scroll to "Variables and secrets"
- Add environment variable:
- Name:
A1D_API_KEY
- Value: Your A1D API key (get from https://a1d.ai/home/api)
- Type: Secret (recommended)
- Name:
- Click "Add variable"
- Space will automatically restart
2. Verify Deployment
- Check Space status: Should show "Running"
- Test web interface: Click "App" tab to test tools
- Test MCP endpoint:
https://aigchacker-a1d-mcp-server.hf.space/gradio_api/mcp/sse
π MCP Client Configuration
For Claude Desktop (Header-based API Key)
Add to your Claude Desktop config:
{
"mcpServers": {
"a1d-hosted": {
"command": "npx",
"args": [
"mcp-remote@latest",
"https://aigchacker-a1d-mcp-server.hf.space/gradio_api/mcp/sse",
"--header",
"API_KEY:${MCP_API_KEY}"
],
"env": {
"MCP_API_KEY": "your_a1d_api_key_here"
}
}
}
}
For Claude Desktop (Environment Variable)
{
"mcpServers": {
"a1d-hosted": {
"command": "npx",
"args": [
"mcp-remote",
"https://aigchacker-a1d-mcp-server.hf.space/gradio_api/mcp/sse"
]
}
}
}
π Troubleshooting
Push Issues
Problem: fatal: unable to access 'https://huggingface.co/spaces/...'
Solution:
- Check your Hugging Face token
- Ensure you have write permissions to the Space
- Try clearing git credentials:
git config --global --unset credential.helper
Problem: Authentication failed
Solution:
- Use your Hugging Face username and token (not password)
- Generate a new token with write permissions
Space Issues
Problem: Space shows "Build Error" Solution:
- Check the logs in the Space
- Ensure all files are properly committed
- Verify requirements.txt is correct
Problem: "API key not found" error Solution:
- Set A1D_API_KEY environment variable in Space settings
- Restart the Space after adding the variable
MCP Client Issues
Problem: MCP client can't connect Solution:
- Verify the Space is running
- Check the MCP endpoint URL
- Ensure mcp-remote is installed:
npm install -g mcp-remote
π± Space URLs
- Space Home: https://huggingface.co/spaces/aigchacker/a1d-mcp-server
- Web Interface: https://aigchacker-a1d-mcp-server.hf.space
- MCP Endpoint: https://aigchacker-a1d-mcp-server.hf.space/gradio_api/mcp/sse
π― Next Steps
- β Deploy to Space
- β Set environment variables
- β Test web interface
- β Configure MCP client
- β Test with Claude Desktop
- π Start using AI tools!
Need help? Check the main README.md or create an issue in the repository.