Stop tracking .mcp.json; it carries a real API key

.mcp.json needs NOVELLY_API_KEY to match the API's Auth:ServiceApiKey
user secret, so it can't be a checked-in file — gitignore it and keep
.mcp.json.example (with the key blanked out) as the template. README
walks through copying the example and setting the matching user secret.
This commit is contained in:
James Wampler
2026-08-17 18:39:56 -07:00
parent c879d9bfce
commit eb1efcf9f8
4 changed files with 13 additions and 16 deletions
+1
View File
@@ -436,6 +436,7 @@ dist/
*.db-shm *.db-shm
*.db-wal *.db-wal
mcp-server/ mcp-server/
.mcp.json
# Toolchains installed locally by scripts/ci/lib.sh # Toolchains installed locally by scripts/ci/lib.sh
.dotnet/ .dotnet/
-11
View File
@@ -1,11 +0,0 @@
{
"mcpServers": {
"novelly": {
"command": "/home/james/src/novelly/mcp-server/Novelly.Mcp",
"env": {
"NOVELLY_API_URL": "http://localhost:5080",
"DOTNET_ROOT": "/home/james/.dotnet"
}
}
}
}
+2 -1
View File
@@ -3,7 +3,8 @@
"novelly": { "novelly": {
"command": "./mcp-server/Novelly.Mcp", "command": "./mcp-server/Novelly.Mcp",
"env": { "env": {
"NOVELLY_API_URL": "http://localhost:5080" "NOVELLY_API_URL": "http://localhost:5080",
"NOVELLY_API_KEY": "<matches the API's Auth:ServiceApiKey user secret>"
} }
} }
} }
+10 -4
View File
@@ -193,21 +193,27 @@ client spawns directly, so nothing rebuilds it automatically. Re-run the script
reconnect your MCP client) after pulling changes that touch `src/Novelly.Mcp`, or it keeps reconnect your MCP client) after pulling changes that touch `src/Novelly.Mcp`, or it keeps
serving whatever was published last, including against a stale auth contract. serving whatever was published last, including against a stale auth contract.
`.mcp.json` (or Claude Desktop's config): Copy `.mcp.json.example` to `.mcp.json` (gitignored, since it carries your API key) and
fill in the key:
```jsonc ```jsonc
{ {
"mcpServers": { "mcpServers": {
"novelly": { "novelly": {
"command": "/absolute/path/to/mcp-server/Novelly.Mcp", "command": "/absolute/path/to/mcp-server/Novelly.Mcp",
"env": { "NOVELLY_API_URL": "http://localhost:5080" } "env": {
"NOVELLY_API_URL": "http://localhost:5080",
"NOVELLY_API_KEY": "<matches the API's Auth:ServiceApiKey user secret>"
}
} }
} }
} }
``` ```
The API must be running. If it is not, the tools say so in a message the model can act on The API must be running, with `Auth:ServiceApiKey` set (e.g. via
rather than failing opaquely. `dotnet user-secrets set Auth:ServiceApiKey <key> -p src/Novelly.Api`) to the same value
as `NOVELLY_API_KEY` above. If the API is not running, or the key is missing or mismatched,
the tools say so in a message the model can act on rather than failing opaquely.
### Importing an existing outline ### Importing an existing outline