thelastapi
Get started free

What is MCP, and how do you give Claude Code real tools?

MCP connects Claude Code to external tools; with thelastapi, run one command to give it hosting, databases, email, payments, and AI APIs.

On this page 8 sections

Model Context Protocol (MCP) is an open standard that allows AI tools like Claude Code to safely read data and call external functions outside their local environment. Instead of keeping Claude Code locked inside your terminal with only basic shell and file access, MCP connects it to real infrastructure. With thelastapi, you can connect an MCP server in one command to give Claude Code tools for serverless Postgres, hosting, payments, custom email domains, web scraping, and AI model routing.

Giving Claude Code real tools transforms it from an assistant that only edits local files into an operator capable of provisioning and running software.

What is an MCP server, and how does Claude Code use it?

An MCP server exposes structured tools, prompts, and resources to an MCP client like Claude Code. Think of it like a standardized API contract tailored for language models:

  1. Tool discovery: When Claude Code starts up, it queries connected MCP servers to see which tools exist, what parameters they accept, and what they do.
  2. Contextual tool calling: As you describe goals in plain text, Claude chooses the right tool from the catalog, prepares the input arguments, and requests execution.
  3. Execution and return: The MCP server executes the command—such as querying a database, deploying a site, or creating a checkout link—and returns structured JSON or text back to Claude's context window.

Claude Code supports two types of MCP server transports: local stdio servers (running locally via Node or another binary) and remote HTTP servers (connecting to a web endpoint over HTTP with OAuth).

Connecting thelastapi to Claude Code: Local vs. remote

thelastapi provides both connection styles depending on your workflow. You can manage everything through our npm package @vibiz/cli or use our hosted remote endpoint directly.

Option 1: Remote MCP server (Zero install, browser sign-in)

The remote MCP server requires no local package installations. You register the remote endpoint directly inside Claude Code:

Terminal
claude mcp add --transport http vibiz https://thelastapi.dev/mcp

Or target the user configuration explicitly:

Terminal
claude mcp add --transport http vibiz --scope user https://thelastapi.dev/mcp

When Claude Code first executes a tool, it initiates an OAuth 2.1 authentication flow with PKCE, opening your browser to an Authorize screen. You sign in with your thelastapi account and choose an access level (Full access or Limited). Tokens refresh automatically, and the key appears in your API keys dashboard under the client name.

Option 2: Local MCP server (Terminal & CLI)

If you already use the vibiz CLI or want Claude Code to launch the server as a local sub-process, run:

Terminal
claude mcp add vibiz -- npx -y @vibiz/cli mcp

Alternatively, you can define a project-level .mcp.json file in your repository:

JSON
{
  "mcpServers": {
    "vibiz": {
      "command": "npx",
      "args": ["-y", "@vibiz/cli", "mcp"],
      "env": { "VIBIZ_API_KEY": "${VIBIZ_API_KEY}" }
    }
  }
}

The local server picks up your login credentials from vibiz login or reads the VIBIZ_API_KEY environment variable. To learn more about configuring keys for background agents, read about one API key for an AI agent.

Automated setup: The one-line agent command

If you want Claude Code to configure itself, install needed workflows, and verify everything automatically, you do not need to wire configurations by hand. Run the CLI helper:

Terminal
vibiz mcp add --clients "Claude Code"

This merges the vibiz MCP server directly into Claude Code's configuration without overwriting existing entries.

You can also paste our setup playbook link directly into Claude Code's prompt:

Text
Set up thelastapi for me: follow https://thelastapi.dev/get-started.md

Claude Code follows the steps in the playbook:

  1. Installs the CLI globally (npm install --global @vibiz/cli).
  2. Runs vibiz login and presents an authorization URL in the terminal.
  3. Installs global agent workflows using vibiz skills add --global.
  4. Connects the MCP server via vibiz mcp add --clients "Claude Code".
  5. Verifies connectivity using the vibiz_docs and vibiz_project_status tools.

Claude pauses only for you to open the link, review permissions, and click Authorize. While new sign-ups are closed, anyone who lacks an account will see signup_closed with a link to follow instead.

The tools Claude Code receives

Once connected, Claude Code gains access to a complete operational stack. It does not need custom integration code for every separate vendor:

ToolPurpose
vibiz_docsReference guides and rules for checkout logic, webhooks, and company formation.
vibiz_create_project, vibiz_project_statusProvision projects with database, sign-in, and hosting resources.
vibiz_databaseInspect database schema, check tables, and run read-only development queries.
vibiz_deploy, vibiz_rollbackDeploy website files or local paths, with version rollbacks.
vibiz_paymentsManage product catalogs, add prices, create checkout links, or inspect ledger balances.
vibiz_send_email, vibiz_inbox_threadsSend emails, configure custom inboxes, read message threads, and reply.
vibiz_run_actionRun web scraping, web search, site crawling, and competitor ad extraction.
vibiz_ai_chat, vibiz_image_generateAccess OpenAI-compatible language, voice, and image models.
vibiz_domains, vibiz_buy_domainSearch and buy domains, manage DNS records, and assign domains to projects.

Tools default to the development environment. For instance, vibiz_database operates on a development branch containing your schema without live production data. Learn more in our guide on how to connect a remote MCP server to Claude, ChatGPT, Cursor and Codex.

Securing Claude Code: Full access vs. Limited keys

Giving an autonomous agent real-world tools requires boundaries. When approving Claude Code's access—either in the CLI or through the browser authorization screen—you choose between two access tiers:

  • Full access (Pre-selected): The agent can perform any owner action: provision infrastructure, create deployments, read the production environment, manage DNS, and run live financial transactions like refunds or withdrawals.
  • Limited: The agent works safely in development. It can build, deploy preview code, use AI models, query test databases, and create draft products. It cannot read production environment secrets or move real money.

If a Limited agent attempts an action that requires owner privileges, the MCP tool returns a structured error:

JSON
{
  "status": 403,
  "error": "forbidden",
  "details": {
    "reason": "owner_only",
    "permission": "payments.live:write",
    "grant_url": "https://thelastapi.dev/keys/key_123/allow?permission=payments.live:write",
    "console_url": "https://thelastapi.dev/keys"
  }
}

Instead of crashing, Claude Code reads the grant_url and prints it to the terminal. You open the link, approve the single permission (or upgrade the key to Full access), and tell Claude to retry. Read our keys and environments documentation for a list of permission flags.

Similarly, Claude Code never needs to read your production environment secrets or ask you to paste credentials into the terminal. Calling vibiz_request_secret generates a private console URL where you paste values directly into our vault.

Installing workflow skills for Claude Code

Tools tell Claude Code what it can call; skills teach it how to build. Agent skills are structured folders containing a SKILL.md file and reference documentation. Claude Code loads skills automatically when your prompt matches the skill's purpose.

Install all skills globally across projects:

Terminal
vibiz skills add --global --agent claude

Skills are stored in ~/.claude/skills/<name>/SKILL.md (or .claude/skills/ for local repositories). They share the exact same technical guides found in /docs and the /llms-full.txt index. Claude Code picks up updated skills without restarting your session. Review the available guides in our agent skills documentation.

Next step

To get started, follow our quickstart guide or launch Claude Code and run:

Terminal
claude mcp add --transport http vibiz https://thelastapi.dev/mcp

From there, ask Claude Code to provision a project, build a landing page, connect an authentication flow, or set up a database branch. If you want to run Claude Code with other model providers behind an OpenAI-compatible interface, read our guide on using Claude Code with other models. If you don't have an account yet, create one at thelastapi.dev/start.

Frequently asked questions

Does Claude Code store my thelastapi API key in plaintext?

If you connect using the remote HTTP transport (`https://thelastapi.dev/mcp`), authentication happens via OAuth 2.1 with PKCE, and Claude Code stores scoped tokens managed by the client. For local stdio setups, the MCP server automatically reads your session from `vibiz login` or from a `${VIBIZ_API_KEY}` shell variable.

Can Claude Code accidentally spend real money or delete production databases?

Not if you authorize it with a Limited key. Limited keys can only run actions against development database branches, execute sandbox payments, and create draft resources, returning a 403 `owner_only` error if an action requires owner permissions.

What happens if Claude Code hits an action requiring an owner permission?

The MCP server returns a 403 error containing a `grant_url`. Claude Code presents this URL in the terminal so you can approve just that specific permission in your browser before letting the agent retry.

How do I test the MCP server connection in Claude Code?

After adding the server, ask Claude Code to run `vibiz_docs` or `vibiz_project_status`. If the client has not logged in yet, it will open the browser authorization page or direct you to run `vibiz login`.