alesya-h/jsmcp
MCP server allowing LLMs to write code interacting with MCP servers.
Platform-specific configuration:
{
"mcpServers": {
"jsmcp": {
"command": "npx",
"args": [
"-y",
"jsmcp"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
A meta MCP server that:
execute_code() as JavaScript librariesconsole output separately through log toolsConfig is read from $XDG_CONFIG_HOME/jsmcp/config.json. If XDG_CONFIG_HOME is not set, it falls back to ~/.config/jsmcp/config.json.
node src/index.js
node src/index.js my-presetThe only optional argument is the preset name. If omitted, default is used.
servers uses the same local or remote format as OpenCode MCP config.
presets decides which servers are visible and which tools from each server are allowed.
Each server may also define an optional description. This is surfaced by list_servers() so agents can understand when to use that server.
Server names must be valid JavaScript identifiers because execute_code() exposes them directly as globals.
Example:
{
"servers": {
"math": {
"type": "local",
"description": "Basic arithmetic tools",
"command": ["node", "/absolute/path/to/math-server.js"]
},
"docs": {
"type": "remote",
"description": "Documentation search and retrieval",
"url": "https://example.com/mcp",
"headers": {
"Authorization": "Bearer {env:DOCS_TOKEN}"
}
}
},
"presets": {
"default": {
"servers": {
"math": {
"tools": ["add", "multiply"]
},
"docs": {
"tools": ["search", "fetch_page"]
}
}
},
"math-only": ["math"]
}
}Accepted preset forms:
"preset": ["server-a", "server-b"]"preset": { "servers": { "server-a": true } }"preset": { "servers": { "server-a": { "tools": ["tool1"] } } }Tool rules:
true, omitted tools, or "*" means all tools from that servertools: ["name"] restricts access to the listed toolsfalse or enabled: false removes that server from the prLoading reviews...