PromptisePromptise
PlatformSoonEnterprise
DocsGitHub
Talk to usGet started
framework
[part 02/03]> The Interface

Give AI agents safe access to your systems.

Agents are only as useful as the systems they reach. Build MCP servers with authentication, permissions and an audit trail from the first request, or generate one from the API spec you already have.

GitHub
clientmcp serverauthscopesmiddlewarelist_ordersget_orderrefunddenied
Every call passes authentication, scope checks and your middleware before it reaches a tool. A caller without the right scope is stopped before the tool runs.
  1. 01Tools
  2. 02Security
  3. 03Operations
  4. 04MCPcast
  5. 05Safety profiles
  6. 06Questions
[n.01/10]> tools

Turn a function you already have into an agent tool.

The schema comes from your type hints. The agent sees a name, a description and typed parameters, never your code.

you write · tools.pypython
@server.tool()async def search_users(    name: str,    department: str = "all",) -> list[dict]:    """Find employees by name."""    return await db.search(name, department)
the agent receiveswaiting
{
  "name": "search_users",
  "description": "Find employees by name.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "name": { "type": "string" },
      "department": { "type": "string", "default": "all" }
    },
    "required": ["name"]
  }
}
MCPRouter(prefix=...)Depends()tool versionssession statestdio · HTTP · SSE
[n.02/10]> security

Every call authenticated, authorized and on the record.

Authentication plugs into the infrastructure you already run. Each call passes the same four steps.

MCP server docs
[01] Authenticate
middleware.pypython
from promptise.mcp.server import (    AuthMiddleware, JWTAuth,    RateLimitMiddleware,) auth = AuthMiddleware(JWTAuth("secret"))limit = RateLimitMiddleware(rate_per_minute=100)server.add_middleware(auth)server.add_middleware(limit)

JWT, OAuth or API keys identify the caller.

JWTAuth for HS256, AsymmetricJWTAuth for RS256 or ES256 with JWKS, OAuth client credentials, and API keys compared in constant time.

[02] Authorize
secure_tool.pypython
from promptise.mcp.server import (    HasRole, HasScope, RequestContext,) @server.tool(    auth=True,    guards=[HasRole("analyst"), HasScope("read")],    rate_limit="60/min",)async def revenue_report(    ctx: RequestContext, quarter: str, year: int,) -> dict:    """Get quarterly revenue data."""    return await db.query(quarter, year)

Role and scope guards decide, per tool.

Guards on the decorator say who may call this tool. Every handler can receive a typed RequestContext with the caller and their claims.

[03] Execute
auditapprovallimitsauthtoolagentaudit log, hash-chained

Only then does your tool run.

Rate limits, timeouts and circuit breakers sit in front of your logic as middleware. Your tool stays a plain function.

[04] Audit
audit log · hmac-chained#001prev 000…#002prev a3f…#003prev 91c…#004prev 7e0…#005prev c42…who called · which tool · what was decided

Every call lands in a log that shows tampering.

The audit middleware writes an HMAC-chained entry for each call. Change an old entry and the chain breaks.

MCP server docs
[n.03/10]> guarantees

A mistake in one layer does not become an incident.

Beyond your own guards, the HTTP transport holds a few lines for you.

  1. 01

    Identity per request

    Headers, claims and request id come from the call being handled, so reusing a session id never borrows someone else’s identity.

    per request
  2. 02

    Sessions bound to a credential

    With authentication on, a session belongs to the credential that opened it. A different one does not get in.

    sessions
  3. 03

    Host and Origin checked

    A server bound to loopback rejects foreign Host or Origin headers, so a web page cannot reach it through DNS rebinding.

    loopback
  4. 04

    Approval gates

    Gate any tool with requires_approval. The client’s user is asked, or a second person of the same tenant decides.

    requires_approval
[n.04/10]> operations

Built to run in production, not just in a demo.

observability
promptise serve · dashboard live
revenue_reportanalyst38 ms
search_userssupport12 ms
refund_ordersupportdenied
revenue_reportfinance41 ms
export_csvanalystqueued

See every call without instrumenting by hand.

Metrics, logs and traces come from middleware. Export to OpenTelemetry or Prometheus, or watch the live terminal dashboard.

promptise serve my_tools:server --transport http --port 8080 --dashboard
resilience
servercrmbillingsearch

Fail in one place, not everywhere.

Circuit breakers, timeouts, rate limits and response caching.

job queue
queueworkers · 4the agent starts it, checks back later

Long work does not block the call.

The agent starts a job and checks back later.

MCPQueue(server, max_workers=4)
openapi import
openapi.jsontools

Already have a REST API? Each operation becomes a tool.

OpenAPIProvider keeps every schema intact. MCPcast goes further, from a spec URL with no code at all.

OpenAPIProvider("openapi.json")
testing
test clientcall_tool(...)serverin memoryassert result

Test tools without a network.

TestClient runs the server in memory. Call a tool by name, assert on the result.

[n.05/10]> mcpcast

Make your API usable by every AI assistant.

MCPcast turns the OpenAPI document you already have into a reviewed MCP server in one command: a small set of tools an agent can use, human approval on anything that changes data, and a score that says it works.

$pip install promptise && promptise mcpcast
  1. 01parsecode
  2. 02classifycode
  3. 03curatemodel
  4. 04reviewyou
  5. 05emitcode
  6. 06measurecode + model
Claude DesktopClaude CodeCursoryour own build_agent()
[n.06/10]> the pipeline

Automation where it is safe, your judgement where it counts.

Code does the deterministic work. A model designs the surface under rules code enforces. You review before a file is written.

[01] Parsecode

Every operation, and where each value travels.

A file, a URL, or an API running on your machine. OpenAPI 3.x and Swagger 2. A hostile document fails with one clear error.

promptise mcpcast https://api.acme.com/openapi.json
promptise mcpcast ./openapi.yaml
promptise mcpcast   # detects an API running locally
[02] Classifycode

Four risk classes, from fixed rules.

Read, write, destructive or financial, decided by an ordered rule set with no model involved. A plan can raise a risk, never lower it.

GET    /tickets/{id}         →  read
POST   /tickets              →  write
DELETE /tickets/{id}         →  destructive
POST   /tickets/{id}/refund  →  financial
[03] Curatemodel

A model designs the surface. Code enforces the rules.

Redundant routes merge into one intent tool, renamed in domain language, with one worked example each. Prefer it deterministic? --no-curate skips the model.

find_ticket  ← GET /tickets/{id}
             ← POST /tickets/search
             ← GET /tickets
[04] Reviewyou

You read every tool before anything is written.

Every tool, every dropped operation with its reason, and warnings computed from the plan. mcpcast.plan.yaml is the file you own.

! find_ticket: the description names
  delete_ticket, not exposed by this plan
! open_ticket: hides priority (sent as
  a default)
[05] Emitcode

A project, not a script.

An installable package with its own tests, a Dockerfile and a README. Regeneration never overwrites a file you wrote by hand.

helpdesk-mcp/
├── mcpcast.plan.yaml   ← the file you edit
├── helpdesk_mcp/
└── tests/  Dockerfile  README.md
[06] Measurecode + model

A grade, and the exact fixes.

Run it with --eval. A real agent drives the server over tasks written from your plan, and the run is graded A to F.

Agent Readiness: B  (6/8 tasks succeeded)
  ✗ get_customer called the API with an
    identifier it does not recognise
[n.07/10]> safety profiles

What an agent may do is your decision.

The profile decides which risk classes become tools at all. Pick one to see the server it builds.

read
read
read
read
read
writenot built
writenot built
writenot built
destructivenot built
financialnot built
destructivenot built
The default5 tools · reads only

Only reads are generated. An agent cannot call what does not exist.

Counts from an example helpdesk API

A gate inside the server.

The approval gate is middleware in the generated server, so it holds for every MCP client. A client that cannot ask, a reviewer who declines and a decision that never comes all end the same way: nothing reaches your API.

approvaltext
agent → close_ticket(ticket_id=2)
         │
gate → "Approve close_ticket(ticket_id=2)?"
         │
declined → APPROVAL_DENIED · 0 requests upstream
approved → POST /tickets/2/close · 200
[n.08/10]> authentication

Control whose credentials reach your API.

Four deployments, one flag. A credential is never echoed back, not even when the upstream quotes it in an error.

  1. 01

    Personal

    One credential from the environment, sent where your spec’s security scheme puts it. Desktop clients launch it over stdio. It binds loopback only, unless you pass --public behind a gateway.

    --auth env-token
  2. 02

    Shared

    The caller’s own Authorization header is relayed, so each agent acts with its user’s permissions. It belongs behind your authenticating gateway.

    --auth passthrough
  3. 03

    Multi-tenant

    Each API key names a tenant with its own upstream credential, which clients never see. A second person of the same tenant approves.

    --auth api-key
  4. 04

    Local demo

    No credentials sent or accepted, and the server refuses to bind anywhere but loopback.

    --auth none
[n.09/10]> what lands on disk

A project you could have written by hand.

It depends on promptise and httpx, nothing else. ruff, mypy and its own tests pass on the generated tree.

helpdesk-mcp/tree
helpdesk-mcp/
├── mcpcast.plan.yaml
├── server.py
├── helpdesk_mcp/
│   ├── __init__.py
│   ├── __main__.py
│   ├── config.py
│   ├── upstream.py
│   ├── approval.py
│   ├── server.py
│   └── tools/
│       ├── tickets.py
│       └── customers.py
├── tests/
├── pyproject.toml
├── Dockerfile
├── .env.example
└── README.md
12345

The plan

The only file you edit. The server is generated from it.

The approval gate

Every non-read tool waits here for a person.

Tests that mean something

Every tool listed, routed and, if gated, denied.

One module per resource

Plain @server.tool functions you can read.

Ship it anywhere

A slim non-root Dockerfile, or promptise serve.

  1. 1The planThe only file you edit. The server is generated from it.
  2. 2The approval gateEvery non-read tool waits here for a person.
  3. 3Tests that mean somethingEvery tool listed, routed and, if gated, denied.
  4. 4One module per resourcePlain @server.tool functions you can read.
  5. 5Ship it anywhereA slim non-root Dockerfile, or promptise serve.
Read the MCPcast walkthrough
[n.10/10]> faqs

MCPcast, answered.

MCPcast reads an OpenAPI 3.x or Swagger 2 document — a file, a URL, or an API running on your machine — classifies every operation by risk, has a model design a small tool surface under rules code enforces, and writes an installable MCP server project: an editable plan file, a Python package, tests, a Dockerfile and a README.

> the framework

One framework, three parts.

Framework overview →
part 01 · The Agent

Smart and reliable, on any model.

part 03 · The Harness

Autonomous agents, under your control.

Build with the framework. Run it on the platform. Launch it with our engineers.

The Interface is open source under Apache 2.0. Build a server today. The platform and our engineers are there when you need more.

Get startedJoin early accessBook a call
Promptise - AI Framework LogoPromptise

The full-stack framework for agentic systems. Build with the framework. Run it on the platform. Launch it with our engineers.

pip install promptise

[01] Product

  • Framework
  • Platform (coming soon)
  • Enterprise
  • How it works
  • Contact

[02] Framework

  • The Agent
  • The Interface
  • The Harness

[03] Resources

  • Documentation
  • GitHub
  • Why Promptise
  • Use cases
  • Roadmap
  • Guides
  • Learning Paths
  • Questions

[04] Company

  • About
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Subprocessors

© 2026 Promptise by Manser Ventures. All rights reserved.

hello@promptise.com