Quick Reference
Stdio Transport
Stdio is the most common transport for MCP servers. The client spawns your server as a child process and communicates via stdin/stdout using JSON-RPC 2.0. No network setup required.In stdio mode, stdout is reserved for MCP protocol messages. All logs are automatically redirected to stderr and
~/.frontmcp/logs/. You don’t need to configure anything — FrontMCP handles this automatically when --stdio is passed.Using npx (npm package)
The simplest way to distribute your MCP server. Publish to npm, then users can run it withnpx:
Using a Local Binary
If you built your server withfrontmcp build --target cli, point directly to the binary:
Using Node.js Directly
Run the JS bundle directly with Node.js:With Environment Variables
Pass configuration via environment variables:Using the serve Subcommand
The --stdio flag also works with the serve subcommand:
Development with AI Coding Agents
When building a FrontMCP server with an AI coding agent (Claude Code, Cursor, Windsurf, etc.), use HTTP transport withfrontmcp dev for the best experience. The dev server watches your source files and auto-reloads on every change — your agent edits code, the server restarts instantly, and the MCP client reconnects automatically.
This is the recommended workflow for “vibe coding” with FrontMCP. The agent has live access to the tools it’s building — it can edit code, test the result immediately, and iterate without any manual restart.
Step 1: Start the Dev Server
tsx --watch— runs your server and auto-reloads on file changestsc --watch— async type-checker running in the background
http://localhost:3000).
Step 2: Register as HTTP in Your MCP Client
Add your dev server to.mcp.json so the coding agent can use it while building:
Step 3: Code and Iterate
The workflow is now fully live:- Agent edits a tool, resource, or prompt in
src/ tsx --watchdetects the change and restarts the server (~200ms)- MCP client reconnects and sees the updated capabilities
- Agent tests the change by calling the tool directly
- Repeat — no manual restart needed
Stdio bridge: frontmcp dev --stdio (issue #399)
When a client must speak stdio (Claude Code’s stdio mode, MCPB-installed bundles, etc.) and you still want the dev hot-reload loop, run the bridge:
mcp-remote needed:
- Stdout is 100% JSON-RPC frames. Every diagnostic goes to
./.frontmcp/dev.log(override with--log-file <path>). - The session id survives reload. The bridge pins a uuid via
FRONTMCP_DEV_FORCE_SESSION_ID; the child re-uses it on every restart so in-flight session state (auth, subscriptions) carries over. - Buffered RPCs during reload drain in FIFO order when the new child reports ready (sentinel
__FRONTMCP_BOOTSTRAP_COMPLETE__on stderr, or TCP probe in HTTP mode). - Structured errors instead of hangs. When the reload exceeds
--reload-deadline-ms(default 30 000) or the buffer exceeds--buffer-size(default 8), the bridge synthesisesdev_server_unreachable/dev_buffer_full/dev_reload_deadline(codes -32099 / -32098 / -32097) so the client spinner clears immediately.
Why HTTP (Not Stdio) for Development
HTTP Transport
Connect to a FrontMCP server running as an HTTP server. Use this for remote deployments, cloud servers, or when you need the server to persist independently.Local Development
Start your server, then point the client at it:Production Deployment
For servers deployed to a public URL:With Authentication Headers
For servers that require authentication:Background Daemon on Port
Run your server as a background daemon on a TCP port:Unix Socket Transport
Connect via Unix socket for the lowest-latency local connections. The server runs as a background daemon.The
url field is required even for Unix sockets — the hostname is ignored, but the path (/mcp) is used for HTTP routing.Publishing to npm
Make your FrontMCP server installable vianpx:
1. Build the CLI Bundle
2. Configure package.json
3. Publish
Transport Comparison
Client Configuration File Locations
One-shot install for Claude Code (<bin> install -p claude)
Every server built with frontmcp build --target cli inherits an
install subcommand that emits a full Claude Code plugin — MCP
server entry, slash commands, and @Skill-decorated skills — in one
step. End users don’t need to hand-edit .mcp.json or place SKILL.md
files manually:
--no-skills, --no-commands,
and --only-mcp (just register the MCP server, skip the plugin
folder). --dry-run prints the file plan without writing.
Compared to the manual .mcp.json flow above, the plugin install
also:
- composes proper
SKILL.mdfrontmatter from each@Skill’s decorator metadata (name,description,tags,license) so Claude Code’s filesystem loader can index the skill; - copies bundled
references/,examples/,scripts/,assets/resource directories alongside eachSKILL.md; - writes a
.claude-plugin/plugin.jsonmanifest that registers the MCP server, slash commands, and skill list in one file; - tracks framework-managed files via the manifest’s
managedFilesarray so re-runninginstallis idempotent and user-added files are never deleted onuninstall.
frontmcp plugin install --claude from a
project root) and the full flag reference, see the
CLI Reference.