Build a Custom Agent with the Paprel-Hosted MCP Server

Paprel already hosts the MCP server. ChatGPT, Claude, Cursor, and other compatible clients can connect directly using the company-specific URL available at Settings > App Connect > MCP Server.

You need custom code only when you are building your own agent application. That application connects to the same Paprel-hosted Streamable HTTP endpoint and receives only the tools allowed by the company's connection scope.

Choose the path that matches your use case

GoalWhat to do
Use Paprel from ChatGPT, Claude, Cursor, or another MCP clientAdd the company-specific Paprel connection URL in that client's MCP connection flow. No server repository or deployment is needed.
Build a custom finance copilot or workflow agentUse an agent SDK as the MCP client and connect it to the Paprel URL with a scoped token.
Allow an agent to prepare accounting workCreate a separate least-privilege connection, keep supported actions in draft, and add explicit human approval.

TypeScript example

The runnable example is maintained in examples/paprel-mcp-agent in the Paprel website repository. It uses the OpenAI Agents SDK as one example client; Paprel's endpoint is standard Streamable HTTP MCP and is not tied to that SDK.

TypeScript
import { Agent, MCPServerStreamableHttp, run } from "@openai/agents";

const paprel = new MCPServerStreamableHttp({
  name: "Paprel Accounting",
  url: process.env.PAPREL_MCP_URL!,
  requestInit: {
    headers: { Authorization: `Bearer ${process.env.PAPREL_MCP_TOKEN}` },
  },
});

const agent = new Agent({
  name: "Paprel finance analyst",
  instructions: "Use Paprel reports as the system of record. Do not change accounting records.",
  mcpServers: [paprel],
});

await paprel.connect();
try {
  const result = await run(agent, "Summarize the current financial position.");
  console.log(result.finalOutput);
} finally {
  await paprel.close();
}

Authorization is the real safety boundary

A prompt saying “read only” is useful but is not access control. Start with a Paprel token whose scope permits only the reports and records the custom agent needs to inspect.

If a workflow later needs draft creation:

  1. issue a separate connection with the smallest required scope;
  2. expose only the relevant draft tools;
  3. require a person to approve the tool call or review the resulting draft;
  4. keep posting, sending, matching, and irreversible transitions outside autonomous execution;
  5. retain Paprel's actor attribution and activity history.

Connection values

  • Copy the MCP URL from the connected company's Paprel settings. Do not construct or probe connection URLs.
  • Treat the scoped token as a secret and keep it server-side.
  • Use a distinct connection per environment and permission profile.
  • Rotate the token when an agent, operator, or deployment no longer needs access.

For the current product surface and screenshots, read Paprel MCP for AI agents. For the broader authorization model, read Authentication and tenant-scoped tokens.

Evaluate Paprel

Build in sandbox, launch with a production trial

Use sandbox for developer testing with no billing. When you are ready for real workflows, start production on a monthly plan with a 14-day free trial.

API-First Delivery
Audit-Ready Controls
Sandbox And Guided Rollout
We use cookies to improve your experience.