mcp-onprem-starter
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-onprem-startershow me the list of records"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-onprem-starter
A starter template for building single-client MCP servers that expose an existing REST API through MCP. The primary deployment profile runs as a stdio subprocess in a customer-controlled environment, including private cloud, data-center, and air-gapped infrastructure.
Architecture
MCP client / agent
│
│ stdio
▼
MCP server
├── tool handlers
├── write authorization
├── typed errors
└── HTTP client
│
▼
Configured upstream APIDevelopment note: When
UPSTREAM_BASE_URLis unset, the server uses the bundled mock upstream so the request path can run locally without an external API.
Related MCP server: mcp-server-template
Quick start
npm install
npm run devFor a reproducible development environment, use the optional Nix flake:
nix develop
npm ci
just verifyThe development shell provides Node.js, just, and the Docker CLI. Nix is a developer-environment option; the server's
runtime and package installation remain based on Node.js and npm.
This starts the server over stdio with a bundled mock upstream and the development defaults. Point an MCP client (Claude
Code, an agent runtime, or the SDK's own test client) at it and call list_records or
create_record.
Template note:
list_records,create_record, and the bundled mock are illustrative examples. Replace them with tools and upstream mappings derived from the operator's business request.
To verify the whole deployable chain — build, container boot, a real protocol round trip, and a rollback drill — run:
just verifyDocker is the default container runtime. Podman is also supported:
CONTAINER=podman just verifyWhat's included
Path | What |
| Entry point. |
| Zod-validated config. Structural settings are validated at startup with the variable named; capability settings (secrets) isolate the tool that requires them. |
| A closed error-code taxonomy, one error class, and the four rules that keep it from drifting (see the file's header comment). |
| stderr-only structured logging with automatic secret redaction and a separate audit stream for writes. |
| REST client with host-named timeout errors, a single guarded re-auth retry, normalized failure surfaces, retryable reads, and explicit write-outcome handling. |
| The tool-module shape ( |
| A tiny in-memory upstream so the template runs with zero configuration. |
| The three current distribution paths, configuration reference, operational notes, and coverage roadmap. |
| The separate shared HTTP deployment profile and its requirements. |
| Everything else considered and deferred, with the trigger for building each. |
Implementing an operator request
Agents implementing a business request should first identify the required workflows, upstream API contract, tool
behavior, security requirements, and acceptance criteria. See AGENTS.md for the complete implementation workflow and
repository rules.
Adapting this template
Use this sequence to build the business-specific server:
Understand the structure. Read
src/index.ts,src/config.ts,src/http/client.ts,src/tools/shared.ts, andsrc/errors.ts.Define the upstream contract. Identify the API base URL, authentication method, endpoints, request and response schemas, and error behavior.
Design the MCP tools. Map business operations to tools with clear names, descriptions, input schemas, annotations, and result shapes.
Implement the tool handlers. Add one module per tool under
src/tools/, use the shared HTTP client, applycheckWriteGate()to writes, and register each tool insrc/tools/index.ts.Add configuration. Extend
ConfigSchemafor required URLs, credentials, timeouts, or capability settings. Keep environment access insidesrc/config.ts.Add tests. Cover tool inputs, upstream responses, error mapping, write authorization, and the MCP initialize/tool-listing round trip.
Verify the deployment. Run
npm run ci, thenjust verifyfor the container, non-root boot, stdio, and rollback checks.
Template cleanup
After the business tools are implemented:
Replace
src/tools/_example-read.tsandsrc/tools/_example-write.ts.Update the bundled mock and its tests to represent the business domain, or retain them as a local contract-test harness.
Remove placeholder endpoint definitions and example terminology.
Update
.env.example,README.md, andDEPLOYMENT.md.Keep the shared configuration, HTTP client, error taxonomy, write gate, logging, and verification structure when they still match the deployment.
Design principles
stdio by default. The server exposes the MCP connection through stdio. The agent runtime spawns this as a child process inside its own trust boundary.
Validate at startup, isolate optional capabilities. A malformed required setting stops startup with the variable name in the message. A missing optional credential disables just the tool that needs it — the server still starts, and the disabled tool stays listed rather than silently vanishing.
Writes require deliberate authorization. A write tool needs both an environment- level flag and a per-call confirmation, and the underlying HTTP client surfaces an ambiguous write outcome for operator review rather than retrying automatically.
Every error is actionable. Error details are sanitized before they reach the caller, and every error names what to do next.
Patterns have production provenance. Every pattern in this template is ported from a pattern already shipped in a working server — see the doc comments for provenance.
License
MIT.
Available Tools
2 toolscreate_recordCreate a recordADestructive
Create a new record in the upstream system. Defaults to a dry run: confirm=true is required to execute, while the default returns a preview of the exact payload that would be sent. Set confirm=true to execute — this also requires the deployment to have ALLOW_WRITES enabled, independent of this flag.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name for the new record. | |
| reason | Yes | Why this record is being created — required so the audit log carries intent, not just the payload. | |
| confirm | No | Set true to execute. Default false returns a dry-run preview only. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses critical behaviors beyond annotations: dry-run default, the need for confirm=true, and the ALLOW_WRITES deployment flag. This adds substantial context that annotations (readOnlyHint false, destructiveHint true) do not fully cover.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no fluff, front-loaded with purpose then key behavioral caveats. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers the essential invocation behavior (dry-run, confirm, ALLOW_WRITES) and gives a hint about return ('preview of exact payload'). It lacks details on error responses or execute-mode return, but is sufficient for a simple create tool with no output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers 100% of parameters with descriptions, but the description adds the crucial ALLOW_WRITES dependency and reinforces confirm flag semantics, going slightly beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Create a new record in the upstream system', using a specific verb and resource. It distinguishes from the sibling 'list_records' by its create action and mentions the upstream system.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides clear usage context: creation requires confirm=true to execute, defaults to dry-run, and requires ALLOW_WRITES enabled. However, it does not explicitly mention using the sibling tool for reading, so it's not a full 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_recordsList recordsARead-onlyIdempotent
List records from the upstream system, optionally filtered by a search query. Returns a bounded page of results with a total-matched count and a truncated flag — call again with a narrower query if truncated is true rather than assuming this is the full set. Use get_record to fetch one record in full.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max records to return. Hard cap 100. | |
| query | No | Free-text filter. Omit to list all records (subject to the limit). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false, so the safety profile is clear. The description adds significant behavioral context beyond annotations: the result is a 'bounded page' with a total-matched count and a truncated flag, explaining how to interpret and act on truncation, which is valuable for using the tool correctly.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: a single sentence stating purpose, followed by a sentence covering paging behavior and an alternative tool. Every word earns its place, with no redundant or filler content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (pagination, filtering, total count, truncation) and the lack of an output schema, the description explains the return shape and expected behavior thoroughly. It also provides a pointer to get_record for full details, making the description functionally complete for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for both limit and query, so the schema carries the parameter semantics. The description adds minimal extra parameter meaning—it mentions 'optionally filtered by a search query' and 'bounded page' which aligns with existing schema fields but doesn't provide new details beyond what's already documented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'List records from the upstream system, optionally filtered by a search query.' It distinguishes from the sibling tool create_record by focusing on read-only listing, and also contrasts with get_record for fetching a single record.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit guidance on when to use this tool vs. alternatives: 'Use get_record to fetch one record in full.' Also gives actionable advice on handling truncation ('call again with a narrower query if truncated is true') and clarifies the meaning of the truncated flag.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v0.1.0- First observed
create_record - First observed
list_records
TDQS
The two tools have clearly distinct purposes: list_records for querying/searching with pagination, and create_record for inserting new records. No overlap or ambiguity exists.
Both tools follow a consistent verb_noun pattern (list_records, create_record), making the API predictable and easy to navigate.
At 2 tools, the set is on the thin side, but for a 'starter' server it could be intentionally minimal. However, the reference to get_record suggests at least one more expected tool.
The set is missing get_record, update_record, and delete_record. list_records explicitly instructs agents to use get_record, but that tool does not exist, creating a clear dead end and significant coverage gap.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
REST-to-MCP for UK hospitality. Safety proxy: circuit-breakers, rate limits, whitelists. Apache 2.0.
The official MCP Server from Mia-Platform to interact with Mia-Platform Console
An MCP server that provides Javelin Standalone Guardrails
MCP server for Modern Treasury — payment orders, transactions, counterparties and ledgers.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA starter template for building MCP servers in Python using the streamable HTTP transport protocol. Provides a foundation with the MCP Python SDK and example configuration to quickly develop custom MCP servers.2-
- AlicenseNot gradedqualityDmaintenanceA production-ready FastMCP server template supporting local development with stdio and secure web deployment with HTTPS and OAuth.4MIT
- FlicenseBqualityBmaintenanceA starter template for building an MCP server with Vault-based secret management and Postgres-backed configuration, featuring tool-level authorization and redacted output.11-
- -licenseNot gradedqualityNot gradedmaintenanceA corporate MCP server template in Python, built with FastMCP for stateless, scalable deployment behind a load balancer with health/readiness endpoints and JSON structured logging.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ricoledan/mcp-onprem-starter'
If you have feedback or need assistance with the MCP directory API, please join our Discord server