MCP server

Connect an AI coding agent to your Voidhash paywall workspace.

The Voidhash MCP server connects an AI coding agent to your paywall workspace. A compatible agent can inspect and edit paywalls, write components, and render previews. This page shows how to create credentials, point your client at the server, and confirm that it works.

Server

The server runs at one URL:

https://api.voidhash.com/api/mcp

It uses streamable HTTP as its transport and bearer authentication, so the client sends a key in the Authorization header on every request.

Create credentials

For a single project, use the project's secret key and keep it out of source control. Send it as a bearer token:

Authorization: Bearer vh_sk_...

A user key can access several projects, so the server also needs to know which one you mean. Send the project ID or slug in a second header:

Authorization: Bearer vh_...
X-Voidhash-Project: my-project

The CLI can print these headers for the current login. This keeps the key out of a command argument:

npx voidhash-cli auth token --project my-project

Configure your client

In your MCP client, add a remote or streamable HTTP server named voidhash, then set the URL and headers from above. Clients that use JSON configuration commonly accept this shape:

{
  "mcpServers": {
    "voidhash": {
      "type": "http",
      "url": "https://api.voidhash.com/api/mcp",
      "headers": {
        "Authorization": "Bearer vh_sk_..."
      }
    }
  }
}

Configuration keys differ between clients. Some expect servers instead of mcpServers, or serverUrl instead of url. In those cases, follow your client's own remote MCP instructions.

Verify the connection

Ask the agent a question that needs the server:

What paywalls do I have in Voidhash?

The agent should call list_paywalls and return the current project's paywalls. If it receives a 401, replace the key. If a user key authenticates but no project is selected, add the X-Voidhash-Project header.

Treat MCP credentials as secrets

The MCP server can modify project content. Prefer a project-scoped key, store it in your client's secret storage, and rotate it whenever a device or configuration is shared.