MCP
MCP
Use the Model Context Protocol to give the AI assistant access to external sources of truth when resolving unusual dependencies.
When to use MCP
A local model is only as good as what it can look up. For dependencies that do not live on the public package index, wire the model to MCP servers that know the truth:
- a private registry (Nexus, Artifactory, GitLab Package Registry) holding internal packages
- a dependency catalog / SBOM database your team already maintains
- a package metadata proxy that answers "which version satisfies this constraint" and "what are the transitive requirements"
- an on-prem DB or wiki describing internal microservices and their protocol versions
This keeps the model grounded: instead of hallucinating a dependency name, it queries your actual sources through the MCP server.
Configuration
MCP servers are declared under an [ai.mcp] layer and named like any other
daedalus key. As with every setting, environment variables override the file.
# daedalus.toml
[ai]
provider = "ollama" # any AI provider (see Ollama / Edge LLM)
model = "qwen2.5-coder:14b"
[ai.mcp]
registry_server = { url = "http://nexus.internal:8081", transport = "http" }
[secrets]
mcp_token = "registry-auth-token"
Environment overrides follow a flat, underscore-joined name:
export DAEDALUS_AI_MCP_REGISTRY_SERVER_URL=http://nexus.internal:8081
export DAEDALUS_AI_MCP_REGISTRY_SERVER_TRANSPORT=http
export DAEDALUS_AI_MCP_TOKEN=registry-auth-token
| Layer | Key | Purpose |
|---|---|---|
| env | DAEDALUS_AI_MCP_<NAME>_URL |
Endpoint of the MCP server |
| env | DAEDALUS_AI_MCP_<NAME>_TRANSPORT |
http, stdio, or sse |
| secret | secrets.mcp_token |
Auth token handed to the MCP server |
The token is read through the secret store and never baked into the output artifact.
detect_secret_keysflags any value shaped like a token before it could leak.
Using MCP servers during the build
export DAEDALUS_AI_PROVIDER=ollama
export DAEDALUS_AI_MCP_REGISTRY_SERVER_URL=http://nexus.internal:8081
daedalus build --ai-assist
During --ai-assist, the model can call the registered MCP tools to look up
real packages, then propose a concrete dependency set that still gets verified
against the local filesystem.
Troubleshooting
- Server not reached — confirm the URL is reachable from the build host.
- Tool calls fail — check the token in
[secrets]is accepted by the registry. - Empty proposals — make sure the MCP server exposes discovery tools the model can call.