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

OptionDescriptionDefault
portPort number for the MCP server3000
hostHost address to bind tolocalhost
corsCORS configuration optionsSee example

Search Configuration

OptionDescriptionDefault
maxResultsMaximum number of results per query10
minScoreMinimum relevance score (0-1)0.5
timeoutSearch timeout in milliseconds5000

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:

VariableDescription
SLOT_MCP_PORTOverride server port
SLOT_GITHUB_TOKENGitHub API token for private repos
SLOT_CACHE_DIRCustom cache directory location

Next Steps

Now that you've configured your MCP server, learn how to effectively search for templates in the Search guide.