Description
ftk init must configure .claude/settings.json to enable project-scoped MCP servers from .mcp.json. Without this configuration, Claude Code will not recognize or load the MCP servers defined in the project's .mcp.json file.
Problem
By default, Claude Code does not automatically load MCP servers from project .mcp.json files for security reasons. Users must explicitly enable project-scoped MCP servers in their .claude/settings.json file.
Result if not configured: MCP servers defined in .mcp.json will be ignored by Claude Code, causing confusion when servers appear configured but don't work.
Solution
During ftk init, create or update .claude/settings.json to enable project MCP servers.
Configuration Options
Three approaches for enabling project MCP servers (from ClaudeLog configuration docs):
Option 1: Enable All (Recommended for ftk)
{
"enableAllProjectMcpServers": true
}
✅ Automatically approves ALL MCP servers defined in project .mcp.json files
✅ Simplest for users
✅ Best for trusted development environments
⚠️ Requires user trust in project configuration
Option 2: Whitelist Specific Servers
{
"enabledMcpjsonServers": ["memory", "sequential", "notion"]
}
✅ Whitelist specific servers from .mcp.json files
✅ More granular control
⚠️ Requires maintenance as new servers are added
Option 3: Blacklist Specific Servers
{
"disabledMcpjsonServers": ["filesystem"]
}
✅ Blacklist risky servers while allowing others
⚠️ Less explicit about what's allowed
Implementation Requirements
1. Create/Update .claude/settings.json
2. User Prompt for Security Choice
3. Settings File Location
Primary location: .claude/settings.json (project-specific, should be gitignored)
Alternative locations (for reference, not recommended):
~/.claude/settings.json (user-global)
~/.claude/settings.local.json (user-local)
.claude/settings.local.json (project-local)
Example Implementation
import { ensureDir } from "@std/fs";
import { join } from "@std/path";
async function enableProjectMcpServers(
projectRoot: string,
approach: "all" | "whitelist" | "blacklist",
servers?: string[]
) {
const settingsDir = join(projectRoot, ".claude");
const settingsPath = join(settingsDir, "settings.json");
// Ensure .claude directory exists
await ensureDir(settingsDir);
// Read existing settings or start fresh
let settings: Record<string, unknown> = {};
try {
const existing = await Deno.readTextFile(settingsPath);
settings = JSON.parse(existing);
} catch {
// File doesn't exist, start fresh
}
// Apply chosen approach
if (approach === "all") {
settings.enableAllProjectMcpServers = true;
} else if (approach === "whitelist" && servers) {
settings.enabledMcpjsonServers = servers;
} else if (approach === "blacklist" && servers) {
settings.disabledMcpjsonServers = servers;
}
// Write settings
await Deno.writeTextFile(
settingsPath,
JSON.stringify(settings, null, 2) + "\n"
);
console.log("✓ Enabled project MCP servers in .claude/settings.json");
}
User Experience Flow
$ ftk init
...
[After MCP server selection]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Project MCP Server Configuration
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Claude Code requires explicit permission to load MCP servers
from project .mcp.json files for security.
Choose how to enable project MCP servers:
1. ✓ Enable all servers (recommended for trusted projects)
Automatically loads all servers in .mcp.json
2. Whitelist specific servers
Only load selected servers: sequential, memory, notion
3. Blacklist risky servers
Load all except specified servers
Your choice: [1]: _
.gitignore Consideration
The .claude/settings.json file should be added to .gitignore as it contains user-specific preferences:
# Claude Code user settings
.claude/settings.json
.claude/settings.local.json
However, ftk init should document this in its setup instructions.
Acceptance Criteria
Documentation Updates
Validation
After ftk init, verify:
# Check settings file was created
cat .claude/settings.json
# Verify Claude Code recognizes MCP servers
claude mcp list
Related Issues
Reference
Description
ftk initmust configure.claude/settings.jsonto enable project-scoped MCP servers from.mcp.json. Without this configuration, Claude Code will not recognize or load the MCP servers defined in the project's.mcp.jsonfile.Problem
By default, Claude Code does not automatically load MCP servers from project
.mcp.jsonfiles for security reasons. Users must explicitly enable project-scoped MCP servers in their.claude/settings.jsonfile.Result if not configured: MCP servers defined in
.mcp.jsonwill be ignored by Claude Code, causing confusion when servers appear configured but don't work.Solution
During
ftk init, create or update.claude/settings.jsonto enable project MCP servers.Configuration Options
Three approaches for enabling project MCP servers (from ClaudeLog configuration docs):
Option 1: Enable All (Recommended for ftk)
{ "enableAllProjectMcpServers": true }✅ Automatically approves ALL MCP servers defined in project
⚠️ Requires user trust in project configuration
.mcp.jsonfiles✅ Simplest for users
✅ Best for trusted development environments
Option 2: Whitelist Specific Servers
{ "enabledMcpjsonServers": ["memory", "sequential", "notion"] }✅ Whitelist specific servers from
⚠️ Requires maintenance as new servers are added
.mcp.jsonfiles✅ More granular control
Option 3: Blacklist Specific Servers
{ "disabledMcpjsonServers": ["filesystem"] }✅ Blacklist risky servers while allowing others
⚠️ Less explicit about what's allowed
Implementation Requirements
1. Create/Update
.claude/settings.json.claude/settings.jsonexists.claude/directory if it doesn't exist2. User Prompt for Security Choice
3. Settings File Location
Primary location:
.claude/settings.json(project-specific, should be gitignored)Alternative locations (for reference, not recommended):
~/.claude/settings.json(user-global)~/.claude/settings.local.json(user-local).claude/settings.local.json(project-local)Example Implementation
User Experience Flow
.gitignoreConsiderationThe
.claude/settings.jsonfile should be added to.gitignoreas it contains user-specific preferences:However,
ftk initshould document this in its setup instructions.Acceptance Criteria
ftk initcreates.claude/settings.jsonif it doesn't exist.claude/settings.jsonare preserved.mcp.jsonare recognized by Claude Code after initDocumentation Updates
docs/quickstart.mdto mention.claude/settings.jsonrequirement.gitignorerecommendation for.claude/settings.jsonValidation
After
ftk init, verify:Related Issues
ftk configcommand for MCP server management #3 -ftk configcommand (should also respect these settings)Reference