How it works
Local Code has no MCP settings screen. A built-in skill, use-mcp-with-mcporter, teaches the agent to do everything through MCPorter:
- It installs MCPorter in the project folder with npm, pinned to the version the skill was checked against. This needs a connection, and it adds MCPorter to the project's
package.jsonand npm lockfile. - It saves servers you'll use again in
config/mcporter.jsonin the project. - Before calling anything, it lists the server's tools and reads their schemas, so it doesn't guess argument names.
- It calls the tool and reports which server and tool it used, what it sent, and what came back.
Each project has its own MCPorter and its own server list. To use a server in another project, ask there too.
Which servers work
Local Code runs everything inside the app's sandbox and can't launch programs installed on your computer. That decides which servers you can use:
| Server | Works? | Notes |
|---|---|---|
| HTTPS endpoint (Streamable HTTP) | Yes, and preferred | Needs no local process, only a connection to the server. |
| HTTP with server-sent events | Yes | For servers that only offer the older transport. |
| Plain HTTP | Only when you ask | For an endpoint you trust, such as one on your own network. |
| JavaScript npm package (stdio) | Often | It must be pure JavaScript, pinned to an exact version and run with node or npx. |
| Python, Docker, Bun or native binaries (stdio) | No | The sandbox can't start them. |
A stdio server also can't rely on install scripts that download or compile code, or on a background process that keeps running after the call. If a server needs any of these, look for an HTTPS endpoint for it instead.
Example
Ask in plain words. Give the server's address and a name to save it under:
Connect to the MCP server at https://mcp.example.com/mcp and save it as docs. List its tools, then search it for the React hooks documentation.
The agent runs commands like these in the project folder:
npm install --save-dev mcporter@0.12.3
npm exec -- mcporter config add --config config/mcporter.json docs https://mcp.example.com/mcp
npm exec -- mcporter --config config/mcporter.json list docs --schema --json --no-oauth
npm exec -- mcporter --config config/mcporter.json call docs.search query="React hooks" limit=5 --output json
For a JavaScript server from npm, it saves npx as the command with the package's exact version:
npm exec -- mcporter config add --config config/mcporter.json local-tools --command npx --arg '-y' --arg 'example-mcp-server@1.2.3'
For a one-off request, the agent can use the server's address directly without saving it.
Signing in
Prefer servers that take an API token. The agent keeps tokens, client secrets and authorization headers out of config/mcporter.json, and refers to them through environment variables instead.
If a server needs an OAuth sign-in, the agent saves the server first, then starts MCPorter's sign-in and gives you a link to open. The command has to keep running until you finish in the browser. If it can't, the agent tells you rather than trying another way around.
What the agent asks first
The agent treats an MCP tool like any other outside service:
- It looks things up and reads freely when that's part of what you asked.
- It asks before a tool sends a message, publishes, deploys, deletes, spends money or changes permissions.
- It treats what a server returns as untrusted input, and won't follow instructions in it that conflict with your request.
Limits
- MCPorter's long-running
daemonandservemodes aren't used, because the app doesn't keep a child process or listening server alive between calls. - MCPorter's
generate-clifeature isn't used in the app. - When a call fails, the agent reports what kind of failure it was, such as configuration, sign-in, connection, schema or timeout, instead of switching to another MCP client.
Calls to a remote server need a connection, and the server sees what the agent sends it. With a cloud model, tool results also go to the model provider. See offline use and privacy.