mcp-forge

Open source · self-hosted · read-only by default

Your APIs and databases. Agent-ready.

mcp-forge turns HTTP and GraphQL endpoints, SQL queries and NoSQL operations into curated MCP tools for Claude and other agents. You decide which tools exist, what they are called, and exactly what comes back.

One binary with a web UI. macOS, Linux and Windows. MIT or Apache-2.0. No telemetry.

Works with what you already run

  • OpenAPI 3
  • Swagger 2
  • Postman
  • HAR
  • curl
  • GraphQL
  • PostgreSQL
  • MySQL
  • SQL Server
  • SQLite
  • ClickHouse
  • MongoDB
  • Redis
  • DynamoDB
  • Elasticsearch

Agents connect from Claude Code, Claude Desktop, claude.ai connectors and any MCP client, over streamable HTTP or stdio.

The web UI

Every tool in one place, tried before an agent sees it.

Built for

The moment an agent needs real data, and you need control.

Curate, don't dump

One API answer is a hundred fields. Your agent needs three.

Each tool gets a name and a description written for the model, typed parameters, and an optional jq response shape. Agents see the fields that matter, spend fewer tokens, and pick the right tool more often.

  • Rename tools, hide parameters, give them fixed values
  • Shape responses with jq before the agent sees them
  • Re-import when the spec changes; your edits are kept
  • Hundreds of operations? Offer search_tools and call_tool instead

You describe

# base https://api.github.comGET /repos/{owner}/{repo} # response shape (jq){name: .full_name, stars: .stargazers_count, language}

The agent sees

get_repo(owner, repo)Look up a GitHub repository. → rust-lang / rust{"name": "rust-lang/rust", "stars": 122000, "language": "Rust"}

Example: the full GitHub repository response, trimmed to the three fields the agent needs.

Try it

Pick the fields your agent needs.

Here are fifteen of the fields GitHub returns for one repository. Tick the ones to keep: the jq shape writes itself, and the agent gets only what you kept.

Fields in the response

…and about 85 more in the real response.

Response shape (jq)

{name: .full_name, language, stars: .stargazers_count}

The agent gets

{
  "name": "rust-lang/rust",
  "language": "Rust",
  "stars": 122000
}

89% smaller · 58 of 547 bytes, about 15 tokens instead of 137

See it in action

Every feature, one short example at a time.

Each feature plays a short example. Pick one to watch it, or let them run in turn.

New tools, databases, auth configs, resources, prompts and keys open in a dialog with numbered steps. Next asks the server about the step first, so a mistake is caught where you made it.

Feature packed

Everything between your systems and an agent, in one place.

Packed with more

The numbers

  • 6ways to import: OpenAPI, Swagger, Postman, HAR, curl, GraphQL
  • 9databases, SQL and NoSQL
  • 5independent layers in front of every SQL statement
  • 2transports: streamable HTTP and stdio
  • 1binary, web UI included
  • 0telemetry, and no secrets stored

Get started

From nothing to a working tool in five minutes.

  1. Install

    One command on macOS, Linux or Windows, or the Docker image.

  2. Start and sign in

    Run mcp-forge serve, open 127.0.0.1:7410, and create your account with the setup code from the log.

  3. Add or import tools

    Describe a request, import a spec, or connect a database, then try it in the test console.

  4. Connect your agent

    Copy a snippet from the Connect tab and ask Claude a question. It calls your tool.

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/jaydip187/mcp-forge/releases/latest/download/mcp-forge-installer.sh | sh

The installers put mcp-forge in ~/.cargo/bin. Prefer a manual install? Download an archive from the releases page.

Databases

Read-only until you say otherwise.

Connect PostgreSQL, MySQL, SQL Server, SQLite or ClickHouse. Publish saved queries with typed :name parameters, and optionally let agents list tables, describe them and write their own SELECT statements. Values are always sent separately from the SQL, never pasted into it.

Mask sensitive columns such as users.password_hash or *.email, and limit which tables agents may explore.

MongoDB, Redis, DynamoDB and Elasticsearch connect the same way, with the same access modes, allowed names, masks and limits.

What agents may do on a connection
Access modeSaved queriesAgent-written SQL
Read only defaultreadread
Saved writesread and writeread
Full accessread and writeread and write

Every write runs in a transaction, is undone if it changes more rows than allowed (100 by default), needs a WHERE clause on UPDATE and DELETE, can be tried with dry_run, and lands in the audit log.

Security

Built to fail closed.

Agents get real access to your systems, so every SQL statement passes through independent layers. Each one is enough on its own to stop a write on a read-only connection.

  1. Database login. Use a login that may only SELECT. The Test button shows what yours can do.

  2. Read-only session. Reads run in a read-only transaction with a server-side time limit, then roll back.

  3. Statement check. SQL is parsed; exactly one statement is allowed and classified as read, write, schema change or admin. Writes hidden in CTEs are refused.

  4. Function blocklist. Functions that write, read server files, reach other servers or sleep, such as pg_read_file, dblink or LOAD_FILE, are refused.

  5. Limits. Row and time limits, a cap per cell, column masks, a table allowlist, and for writes the row cap, dry run and audit log.

Localhost only by default. Requests must carry a loopback Host header, which blocks DNS rebinding. Any other address requires an admin token.

Secrets are references. env:NAME or keyring:NAME, resolved at call time and redacted from errors, logs and exports.

Accounts done properly. argon2id passwords, HttpOnly SameSite cookies, CSRF header and sign-in backoff.

Why not write an MCP server yourself?

You can. Here is what you'd be building.

A hand-written servermcp-forge
A new toolCode, build, redeployA few fields in the UI, live for connected agents
A changed APIUpdate the code by handRe-import the spec; your edits are kept
SecretsUp to youReferences only, redacted everywhere
SQL safetyUp to youParsed, read-only, limited, masked, audited
Approvals and access keysBuild themBuilt in
Seeing what agents didAdd loggingCall log and audit log

No lock-in

Your tools. Your machine. Your call.

mcp-forge is free and open source under MIT or Apache-2.0. It runs where you run it, connects only to the APIs and databases you configure, and exports every project as a plain tools.yaml you can keep in git.

# tools.yaml
tools:
- name: get_repo
  auth: github
  response_shape: '{name: .full_name, stars: .stargazers_count}'
  kind:
    type: http
    method: GET
    path_template: /repos/{owner}/{repo}
auth_configs:
- name: github
  secret_ref: env:GITHUB_TOKEN

New

What's new

Full notes for every version are on the releases page.

  1. Release 0.3.0, with everything listed here since 0.2.0. Release notes

  2. Guided setup. Create forms open as step-by-step dialogs, and Next checks each step with the server.

  3. Description quality. A score per tool, hints for weak spots, optional wording from Claude.

  4. Chained tools, resources and prompts, and NoSQL: MongoDB, Redis, DynamoDB and Elasticsearch.

  5. GraphQL tools and access keys for /mcp.

  6. Approvals and the call log.

  7. Release 0.2.0. Release notes

FAQ

Questions

What is MCP?

The Model Context Protocol is an open standard that lets AI applications such as Claude call external tools. mcp-forge serves every project as an MCP server over streamable HTTP at /mcp/<project> and over stdio.

Which MCP clients work with it?

Any client that speaks streamable HTTP or stdio: Claude Code, Claude Desktop, and clients that read .mcp.json. Tool changes are pushed to connected clients, so you can keep editing while an agent is connected.

Where are my API keys and database passwords stored?

Nowhere. mcp-forge keeps references such as env:GITHUB_TOKEN or keyring:shop-db and resolves them each time a tool runs. Pasted secret values are refused, and tools.yaml exports contain only the references.

Can an agent change data in my database?

Only if you allow it on that connection. Schema changes need a separate switch, admin statements never run, and full access must be confirmed explicitly.

Does it send telemetry?

No. It only connects to the APIs and databases you configure, and to spec URLs you import on purpose.

Can I run it on a server for my team?

Yes. Bind to another address with an admin token, put TLS in front with a reverse proxy, and add accounts with mcp-forge user add. A Docker image is included.

Ready to put an agent on your API?

Install it, start mcp-forge serve, and point it at an API or database you already use.