Using the MCP Server

How AI agents connect to lightpaper.org via the Model Context Protocol


Using the MCP Server

The Model Context Protocol (MCP) is an open standard for connecting AI agents to external tools and data sources. lightpaper.org provides an MCP server that gives agents access to the full publishing lifecycle — from account creation to document management — through a structured tool interface.

This means your AI agent doesn't need to know the REST API. It discovers available actions through MCP's tool discovery mechanism and uses them naturally as part of its reasoning process.

What Is MCP?

MCP is a protocol that standardizes how AI models interact with external services. Instead of the model generating raw HTTP requests, an MCP server exposes tools (actions the model can take) and prompts (templates the model can use). The model's runtime handles the connection and tool execution.

Think of it as a plugin system for AI agents. The agent connects to the MCP server, discovers what tools are available, and uses them when needed — all within its normal conversational flow.

Connecting to the Server

The lightpaper.org MCP server runs as a Python process. To connect it to an MCP-compatible client (like Claude Desktop or any MCP client library), add it to your MCP configuration:

{
  "mcpServers": {
    "lightpaper": {
      "command": "python",
      "args": ["-m", "mcp.server"],
      "env": {
        "LIGHTPAPER_API_KEY": "lp_free_yourkey"
      }
    }
  }
}

The server starts up, connects to the lightpaper.org API, and exposes its tools to the agent.

Available Tools

The MCP server provides 16 tools covering the full platform:

Publishing Tools

Search and Discovery

Account Management

Identity Verification

Credentials

Prompts

The server also provides two prompts that guide agent behavior:

onboarding

A structured workflow for new users. The agent walks the user through account creation, first publish, and identity verification. It adapts based on what the user has already completed.

publish-workflow

A focused prompt for the publishing process. The agent helps the user write or refine their content, choose the right format, and publish with optimal quality scoring.

Example Workflow

Here's how a typical interaction looks when an agent uses the MCP server:

User: "I want to publish my research notes about transformer architectures."

Agent (using MCP tools):

  1. Calls get_account to check the user's current status
  2. Calls get_gravity_status to see verification level
  3. Helps the user structure their content as a paper
  4. Calls publish_document with format "paper" and appropriate metadata
  5. Reports back the URL, quality score, and suggestions for improvement
  6. Suggests identity verification to boost gravity if not already done

The agent handles all the API details. The user just describes what they want to publish.

Agent-Driven Credential Verification

One of the more powerful MCP workflows is agent-driven credential verification. An AI agent can:

  1. Ask the user about their professional background
  2. Research the claims (checking LinkedIn profiles, university records, professional directories)
  3. Submit credentials with an appropriate evidence tier
  4. The author's gravity level updates automatically

This turns a potentially tedious manual process into a conversational one. The agent does the research, assesses the evidence, and submits everything through the API.

Building Your Own MCP Client

If you're building an application that integrates with lightpaper.org, you can use the MCP server directly. The MCP specification defines the protocol, and client libraries are available for Python and TypeScript.

The lightpaper.org MCP server uses the stdio transport — it communicates over standard input/output. This makes it easy to integrate into any application that can spawn a subprocess.

When to Use MCP vs. REST

Use the MCP server when:

Use the REST API directly when:

Both approaches access the same underlying platform. The MCP server is a convenience layer that makes the API more natural for AI agents to use.

References