MCP
MCP Quickstart
Token creation, client configuration, and secure usage basics.
MCP Quickstart
Use MCP to let AI agents such as Claude, Codex, OpenCode, Cursor and VS Code work with Faker Forge for generation and mocking tasks.
Prerequisites
- Active Faker Forge account
- An MCP-capable AI agent
Server URL
https://fakerforge.com/mcp/fakerforge
Choose How to Sign In
Faker Forge supports two ways to authenticate an AI agent:
- Sign in with Faker Forge (OAuth): add the server URL to your agent without any token. When the agent connects, it opens a Faker Forge page in your browser. Log in if asked, check the app name and return address, then select Authorize. There is nothing to copy or store, and the agent refreshes access automatically.
- API token: create a token on the MCP token page and add it to the agent's config as an
Authorization: Bearerheader. Use this for agents without OAuth support, or for scripts and CI.
Both give the same access to the same tools. The MCP token page shows ready-to-copy config for each agent and sign-in method.
What the Approval Page Shows
- App name: the agent asking for access, as it named itself.
- Return address: where Faker Forge sends you after approval. Web apps show their domain, such as
claude.ai. Agents running on your computer, such as Claude Code, Codex or OpenCode, showlocalhostor127.0.0.1; approve those only if you just started the connection yourself. Desktop editors may show an app address such ascursor://anysphere.cursor-mcp.
Connect Your Agent With OAuth
Claude (web, desktop, mobile)
- Open Settings → Connectors and choose Add custom connector.
- Name it
FakerForge, paste the server URL, and select Add. - Select Connect and approve access on the Faker Forge page.
Claude Code
claude mcp add --transport http fakerforge https://fakerforge.com/mcp/fakerforge
Then run /mcp in Claude Code, select fakerforge, and choose Authenticate.
Codex
codex mcp add fakerforge --url https://fakerforge.com/mcp/fakerforge
codex mcp login fakerforge
The login command opens your browser to approve access.
OpenCode
Add the server to opencode.json:
{
"mcp": {
"fakerforge": {
"type": "remote",
"url": "https://fakerforge.com/mcp/fakerforge",
"enabled": true
}
}
}
OpenCode asks you to sign in the first time it uses Faker Forge. To start sign-in yourself:
opencode mcp auth fakerforge
Cursor, VS Code, Windsurf and Other Agents
Add the server URL to the agent's MCP config without a headers block, for example in .cursor/mcp.json:
{
"mcpServers": {
"fakerforge": {
"url": "https://fakerforge.com/mcp/fakerforge"
}
}
}
VS Code uses "servers" with "type": "http", and Windsurf and Antigravity use "serverUrl" instead of "url". The agent opens the Faker Forge approval page when it first connects. If your agent never opens a sign-in page, it doesn't support MCP OAuth; use a token instead.
Connect With an API Token
Create Token
- Open the MCP token page.
- Create a token.
- Copy it immediately. It is shown only once.
- Store it securely in your agent's config.
Minimal Config Pattern
{
"mcpServers": {
"fakerforge": {
"url": "https://fakerforge.com/mcp/fakerforge",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}
Command-line agents:
claude mcp add --transport http fakerforge https://fakerforge.com/mcp/fakerforge --header "Authorization: Bearer YOUR_TOKEN"
For Codex, add bearer_token_env_var = "FAKERFORGE_TOKEN" under [mcp_servers.fakerforge] in ~/.codex/config.toml and set FAKERFORGE_TOKEN in your shell. For OpenCode, add "oauth": false and a headers block to the server in opencode.json.
Revoking Access
- Signed-in agents: open the MCP token page and revoke the agent under Connected apps. Removing the server from the agent alone does not revoke Faker Forge's access.
- Tokens: revoke the token under Active tokens. Any agent using it stops working immediately.
Getting Help
For help connecting an agent or using the MCP tools, email [email protected]. See Troubleshooting for common sign-in and token issues.
Security Guidelines
- Prefer signing in with OAuth where your agent supports it, so no long-lived token is stored in config files.
- Never commit MCP tokens.
- Rotate tokens on team/member changes.
- Use least privilege and environment separation.
First MCP Calls
- list-schemas
- get-codebase-schema
- list-mocks
These verify auth and connectivity before mutation tools.
Example Prompts
- "Generate 200 users and 1,000 orders from my
database/migrationsfolder, with order statuses weighted mostly to delivered." - "Create a mock API for a todo app with list, create and delete endpoints, and add a 500 error scenario for create."
- "Export the data you just generated for my shop schema as a PostgreSQL SQL file."