@alesya_h/jsmcp
MCP server that allows agents to work with other MCP tools programmatically by writing JavaScript
Versions
1.6.1latest1.6.01.5.01.4.01.3.2+ show 7 moreshow less
1.3.11.3.01.2.21.2.01.1.01.0.11.0.0Tools 11
list_servers Required first step. You MUST call this to discover which tool server namespaces are available before using any tools. It lists the available servers, what they are for, and whether they started successfully. User assumes you called it and know what groups of tools are available to you. Once you have the list of servers you may use list_tools to learn more about tools in each group whenever your work might need any of the tools from it.
list_tools List the allowed tools for a server, including preferred aliases and schemas. You MUST call this before using that server in execute_code so you know the exact tool names, aliases, and arguments.
execute_code Execute JavaScript against started MCP server namespaces. You MUST call list_tools for a server before using its tools here. After calling list_servers, each started server is available as a global object and each allowed tool is a function on it. Optional input data is an object exposed as the global variable data, it might be useful to avoid having to escape strings inside the code string. Session-scoped in-memory JSON storage is available as jsmcp.memory with get/set/has/delete/keys/entries/clear/update methods. Prefer underscore aliases when available, for example return await math.add({ a: 2, b: 5 }) or return await browser.open_tab({ url: \"https://example.com\" }). Original tool names still work with bracket access such as obj[\"tool-name\"], but prefer obj.tool_name for readability. Prefer writing JavaScript here whenever the work would require more than a single tool call, because code makes multi-step tool use easier and less error-prone. console.log/info/warn/error write to fetch_logs, not the return value. Connected tool calls automatically resolve to structuredContent when present, otherwise to a string for text-only results or an object with text/content/meta for mixed content. Successful execute_code results always use structuredContent { value, executionMs }; errors use { error, executionMs }. executionMs is elapsed wall-clock time including awaited tool calls. Returned strings appear as raw text by default; pass rawText: false for a JSON-formatted envelope in content.
fetch_logs Fetch and clear logs emitted by execute_code via console methods
clear_logs Clear stored execute_code logs
tool__read-value Read a test value
tool__repeat-text Repeat text
add Add two numbers
repeat Repeat text a number of times
repeat-text Repeat text with a dashed tool name (text-only result)
read-env Read an environment variable
Permissions 3
network medium shell high env_vars low