We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/creatuluw/tpl.mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
CONFIG.md•2.15 kB
# Configuration Guide
## Environment Variables
The schema manager and MCP server use environment variables for configuration. You can set these in several ways:
### Option 1: Create a `.env` file (Recommended)
Create a `.env` file in the project root:
```bash
# .env
DIRECTUS_URL=https://te9-pg-api.up.railway.app/
DIRECTUS_TOKEN=your-actual-token-here
NODE_ENV=development
```
### Option 2: Set environment variables directly
**Windows (PowerShell):**
```powershell
$env:DIRECTUS_URL="https://te9-pg-api.up.railway.app/"
$env:DIRECTUS_TOKEN="your-actual-token-here"
```
**macOS/Linux (Bash/Zsh):**
```bash
export DIRECTUS_URL="https://te9-pg-api.up.railway.app/"
export DIRECTUS_TOKEN="your-actual-token-here"
```
## Required Variables
| Variable | Description | Default |
|----------|-------------|---------|
| `DIRECTUS_URL` | Your Directus instance URL | `https://te9-pg-api.up.railway.app/` |
| `DIRECTUS_TOKEN` | Your Directus API token | `mo7tahjWjKgHW-42_tEMThJiqBstu2V_` |
| `NODE_ENV` | Environment mode | `development` |
## Getting a Valid Token
1. **Go to your Directus admin panel:**
```
https://te9-pg-api.up.railway.app/admin
```
2. **Login and navigate to User Directory**
3. **Select your user profile**
4. **Generate a new token:**
- Scroll to "Token" field
- Click "Generate Token"
- Copy the token
- **IMPORTANT:** Click "Save"!
5. **Update your configuration:**
- Add the token to your `.env` file, or
- Set it as an environment variable
## Testing Configuration
After setting up your environment variables:
```bash
# Test the connection
npm run schema test
# Should output:
# ✅ Connected to Directus! Found X collections
```
## Troubleshooting
### Token Issues
- Make sure you clicked "Save" after generating the token
- Ensure the user has admin permissions
- Try generating a fresh token
### URL Issues
- Check that the URL ends with `/`
- Verify the Directus instance is accessible
- Test the URL in your browser
### Environment Loading
- Restart your terminal after setting variables
- Check that the `.env` file is in the project root
- Ensure no typos in variable names