Configuration
Slot's MCP server can be configured to match your team's needs and preferences. This guide covers the available configuration options and how to customize your template index.
Configuration File
The MCP server is configured through a slot.config.json
file in your project root. Here's a complete example:
{
"mcp": {
"server": {
"port": 3000,
"host": "localhost",
"cors": {
"origin": "*",
"methods": ["GET", "POST"]
}
},
"search": {
"maxResults": 10,
"minScore": 0.5,
"timeout": 5000
},
"templates": {
"sources": [
{
"type": "github",
"owner": "your-org",
"repo": "templates"
}
],
"exclude": [
"**/*.test.*",
"**/*.spec.*"
]
},
"analysis": {
"features": ["all"],
"metrics": ["all"],
"cache": true
}
}
}
Server Options
Option | Description | Default |
---|---|---|
port | Port number for the MCP server | 3000 |
host | Host address to bind to | localhost |
cors | CORS configuration options | See example |
Search Configuration
Option | Description | Default |
---|---|---|
maxResults | Maximum number of results per query | 10 |
minScore | Minimum relevance score (0-1) | 0.5 |
timeout | Search timeout in milliseconds | 5000 |
Template Sources
You can configure multiple template sources to include in your index:
GitHub Source
{
"type": "github",
"owner": "your-org",
"repo": "templates",
"branch": "main", // optional
"path": "starters", // optional
"token": "YOUR_TOKEN" // optional
}
Local Source
{
"type": "local",
"path": "./templates",
"patterns": ["**/*"] // optional
}
Analysis Options
Configure which features and metrics to analyze:
Features
- technologies
- dependencies
- structure
- tooling
- documentation
Metrics
- maintenance
- community
- quality
- security
- performance
Use ["all"]
to enable all features or metrics, or specify individual items as needed.
Environment Variables
Some configuration can be overridden with environment variables:
Variable | Description |
---|---|
SLOT_MCP_PORT | Override server port |
SLOT_GITHUB_TOKEN | GitHub API token for private repos |
SLOT_CACHE_DIR | Custom cache directory location |
Next Steps
Now that you've configured your MCP server, learn how to effectively search for templates in the Search guide.