DEV Community

Lovanaut
Lovanaut

Posted on • Originally published at formlova.com

Gemini CLI and Remote MCP: Running Form Operations From the Terminal

Gemini CLI connected to a remote MCP form server through HTTP transport and OAuth.

Gemini CLI becomes more interesting when it can reach the systems where work actually happens.

Code generation and research are useful. But if the CLI can also call a remote MCP server, it can create a draft form, inspect submissions, configure response handling, or review a workflow without leaving the terminal.

This post uses FORMLOVA as the example remote MCP form server. The goal is narrow: connect Gemini CLI to a remote HTTP MCP server, authenticate with OAuth, create a draft form, and keep write operations bounded.

The full FORMLOVA guide covers the broader product flow. This post focuses on the Gemini CLI setup path.

Reference:

The Remote MCP URL

FORMLOVA's MCP server URL is:

https://formlova.com/api/mcp
Enter fullscreen mode Exit fullscreen mode

For Gemini CLI, this is a remote HTTP MCP server.

The official Gemini CLI docs describe the HTTP transport shape like this:

gemini mcp add --transport http <name> <url>
Enter fullscreen mode Exit fullscreen mode

So the FORMLOVA version is:

gemini mcp add --transport http formlova https://formlova.com/api/mcp
Enter fullscreen mode Exit fullscreen mode

That adds a server named formlova.

Project Scope Or User Scope

Before adding it, decide where you want the config to live.

For a project-specific setup:

gemini mcp add --transport http formlova https://formlova.com/api/mcp
Enter fullscreen mode Exit fullscreen mode

For a user-level setup:

gemini mcp add -s user --transport http formlova https://formlova.com/api/mcp
Enter fullscreen mode Exit fullscreen mode

I prefer project scope for a first test because it limits the blast radius. Move to user scope when you know you want the tool available across projects.

The settings.json Shape

If you manage the config directly, use mcpServers.

For a remote HTTP server, the key is httpUrl:

{
  "mcpServers": {
    "formlova": {
      "httpUrl": "https://formlova.com/api/mcp"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Do not use command; that is for stdio servers that run as local processes.

Do not use url for this server; url is for SSE endpoints.

For remote HTTP streaming, use httpUrl.

OAuth Authentication

FORMLOVA needs to know which user is operating forms, so the MCP server uses OAuth.

Gemini CLI supports OAuth for remote MCP servers over SSE or HTTP transports. For servers that support discovery, the CLI can detect the OAuth requirement, discover endpoints, open a browser for authentication, store tokens, and retry the connection.

In Gemini CLI, run:

/mcp auth formlova
Enter fullscreen mode Exit fullscreen mode

If you want to list servers that need auth:

/mcp auth
Enter fullscreen mode Exit fullscreen mode

The authentication flow requires a local browser and a localhost callback. If you are inside a headless container or remote SSH session without browser access, do the first auth pass locally before debugging deeper.

Confirm The Server

After authentication, run:

/mcp
Enter fullscreen mode Exit fullscreen mode

You should see the formlova server and its tools.

Do not worry about learning every tool on the first run. A form system can expose tools for draft creation, preview checks, response management, emails, reminders, analytics, and workflows. For the first session, stay small.

Create A Draft Form

Use a prompt that explicitly keeps the operation unpublished:

Use FORMLOVA to create a draft registration form for an internal engineering meetup.
Ask for name, email, team, attendance type, dietary restrictions, and one question for the speaker.
Keep it unpublished and return the preview URL.
Enter fullscreen mode Exit fullscreen mode

That prompt tests three things:

Gemini CLI can discover the MCP tool
OAuth is working
The remote server can create a draft and return a preview
Enter fullscreen mode Exit fullscreen mode

It does not immediately publish anything.

A More Realistic Prompt

For a real workflow, give the model more than a field list.

Example:

Use FORMLOVA to create a draft contact form for a developer tools startup.

Required fields:
- name
- work email
- company
- inquiry type
- message

Optional fields:
- company size
- current workflow tool
- expected timeline

Operational requirements:
- pricing inquiries should be easy to find
- obvious sales pitches should be easy to exclude
- confirmation email should mention that replies usually take 1-2 business days
- the form should be comfortable on mobile

Keep the form unpublished.
Return the preview URL.
Then review the draft for mobile friction and response-management gaps.
Enter fullscreen mode Exit fullscreen mode

This is a better test because it checks whether Gemini CLI can coordinate an actual product operation, not just generate a form-shaped text response.

The prompt contains:

Part Purpose
Required fields Defines the minimum schema
Optional fields Avoids overblocking submission
Operational requirements Connects the form to response handling
Safety boundary Keeps the first write action unpublished
Review request Forces a quality pass before publish

If the output is only a checklist, the MCP loop did not prove much. If the output includes a preview URL and concrete review findings, you have a stronger signal.

Review Before Publishing

Once the draft exists, ask for a review:

Review the draft before publishing.
Check mobile input friction, required fields, confirmation copy, and whether the response workflow is clear.
Enter fullscreen mode Exit fullscreen mode

For forms, this matters. The first generated field list is rarely the hard part. The hard part is whether the form is safe to publish and whether the workflow after submission is clear.

What The Review Should Surface

A useful review should catch operational mistakes, not only wording issues.

Examples:

The inquiry type is free text, so routing will be messy.
The phone field is optional, but the follow-up process assumes calls.
The form asks for company size before explaining why it matters.
The confirmation message does not tell the submitter when to expect a reply.
The long message field appears too early on mobile.
The form has no clear way to separate sales pitches from real inquiries.
Enter fullscreen mode Exit fullscreen mode

For a form operations tool, review is not a cosmetic step. It is where the system connects field design to the work that happens after submission.

You can ask Gemini CLI to make that connection explicit:

List the response-management assumptions created by this form.
For each assumption, say which field supports it and what would break if the field were missing.
Enter fullscreen mode Exit fullscreen mode

That kind of review is much more useful than "the form looks clear."

Keep The Safety Boundary

CLI workflows are fast. That is their strength and their risk.

I use this progression:

Step Operation Why
1 Connect server Prove discovery works
2 Authenticate Prove user identity
3 Create draft Prove write tools work without public impact
4 Preview Inspect output
5 Review Catch mobile, copy, and workflow issues
6 Publish Only after human inspection
7 Emails and workflows Only after confirming recipients and side effects

Do not start by sending emails, publishing public forms, or updating production workflows.

Remote MCP is an operating surface. Treat it like one.

Why This Is Useful From The Terminal

The terminal is a good place for this workflow when the form is part of a larger technical or operational task.

Examples:

You are preparing a launch checklist and need a beta signup form.
You are writing release notes and need a feedback form.
You are debugging onboarding and need to inspect recent submissions.
You are running a small developer event and need registration plus reminders.
You are working in a repo and want the intake form to match the product language.
Enter fullscreen mode Exit fullscreen mode

In those cases, switching to a separate dashboard interrupts the flow. Gemini CLI plus remote MCP lets the form operation sit next to the work that caused it.

That does not mean every user should operate forms from a terminal. It means technical operators can keep the workflow close to the rest of their work.

Common Failures

If the server does not connect, check whether you used httpUrl in config or --transport http in the command.

If OAuth fails, check browser access and localhost callback behavior.

If tools do not appear, run:

/mcp
/mcp auth
/mcp auth formlova
Enter fullscreen mode Exit fullscreen mode

If Gemini answers with a static checklist instead of using the tool, make the operation explicit:

Use the FORMLOVA MCP server to create the draft form and return the preview URL.
Enter fullscreen mode Exit fullscreen mode

If the form appears in the wrong account, check which browser account completed OAuth. Disconnect and re-authenticate if needed.

If the server is visible in one directory but not another, check whether you added it at project scope or user scope.

What This Post Is Not

This is not a guide to building an MCP server. It is not a ChatGPT developer mode tutorial. It does not cover Claude, Cursor, or deep Google Cloud authentication.

It is the Gemini CLI path for connecting a remote MCP form server and safely testing the first operational loop from the terminal.

Read the full FORMLOVA Gemini CLI guide

Top comments (0)