This skill should be used when the user asks to "add an MCP server", "install an MCP tool", "add a capability to Jarvis", "integrate an MCP server", "set up meme generation", "add web search to...
This skill guides the process of adding new MCP (Model Context Protocol) server capabilities to the Jarvis Signal AI assistant.
Jarvis loads MCP servers from data/mcp.json. MCP servers are installed as npm packages in data/node_modules/ and configured to run when the agent starts. The agent then has access to the tools provided by those MCP servers.
data/mcp.json defines which MCP servers to loaddata/node_modules/data/ directory is mounted in both local dev and Docker${VAR_NAME} syntax for secretsBefore installing, understand what the MCP server provides:
Install into the data/ directory:
cd data
npm install <package-name>
Important for Docker compatibility: If installing from a local path, use npm pack first:
# From the local package directory
npm pack
# Then install the tarball in data/
cd /path/to/signal-ai-assistant/data
npm install /path/to/package-name-1.0.0.tgz
Direct local path installs (npm install /path/to/local) create symlinks that don't work across Docker mount boundaries.
Add the server to data/mcp.json:
{
"servers": {
"server-name": {
"type": "stdio",
"command": "${DATA_DIR}/node_modules/.bin/server-binary",
"args": ["--optional-flag"],
"env": {
"API_KEY": "${API_KEY_ENV_VAR}"
},
"enabled": true
}
}
}
Key fields:
"stdio" for npm packages${DATA_DIR} prefix${VAR} substitution)false to disable without removingAdd any required credentials to .env:
echo "API_KEY_ENV_VAR=your_api_key" >> .env
For Docker, also add to docker-compose.yml environment section:
environment:
- API_KEY_ENV_VAR
For local development:
npm run dev
For Docker:
docker compose restart
Check the logs to verify the MCP server loaded:
[mcp] Loaded 1 MCP server(s) from /path/to/data/mcp.json
[mcp] - server-name: /path/to/data/node_modules/.bin/server-binary
Problem: Claude can see MCP image responses visually but cannot extract raw bytes to save to disk.
Solution: Fork the MCP server and modify it to:
/tmp/)See references/meme-mcp-fix.md for a detailed example.
Problem: Error: No such tool available: mcp__server__toolName
Causes:
npm pack + install from tarballProblem: Server gets empty credentials
Check:
.env filedocker-compose.yml environment sectionmcp.json matches exactly (case-sensitive)Most npm MCP packages use stdio transport:
{
"type": "stdio",
"command": "${DATA_DIR}/node_modules/.bin/mcp-server",
"args": []
}
For remote MCP servers:
{
"type": "sse",
"url": "https://mcp-server.example.com/sse"
}
For HTTP-based MCP servers:
{
"type": "http",
"url": "http://localhost:3000"
}
${DATA_DIR} for portability between environments.env and reference via ${VAR} syntaxenabled: false to temporarily disable servers without removing configreferences/meme-mcp-fix.md - Detailed walkthrough of fixing an MCP server to return file pathsreferences/mcp-json-schema.md - Full schema documentation for mcp.jsonexamples/mcp.json - Example configuration with multiple serversscripts/test-mcp-server.sh - Test an MCP server standalone