SShortSingh.
Back to feed

How One Developer Built a Secure, Read-Only MCP Server Before Going to Production

0
·43 views

A developer building Lutions, a private web app for project and ticket management, designed security constraints for its Model Context Protocol (MCP) server before any production tools were deployed. The core decision was to limit the server to six read-only tools that search and retrieve tickets, comments, and links — preventing it from acting as an open API or autonomous agent. Each tool accepts only tightly scoped inputs, such as bounded search text and capped result limits, to avoid becoming a vector for arbitrary data access. Authorisation is enforced server-side through user context and visibility rules, meaning tool schemas serve as structural guardrails rather than security substitutes. The approach reflects a broader architectural principle: narrowing the tool surface reduces misuse risk and keeps the permission model aligned with what the underlying application already enforces.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Component System Aims to Speed Frontend Development and Keep Designs Consistent

A component system is described as a centrally maintained library of predefined frontend UI elements, such as buttons, sliders, and text fields, with their design attributes already configured. Each project keeps its own copy of these components, which can be customized per project while preserving a shared visual vision. Because theme and styling live in one central place, updating a component propagates throughout the application and reduces the need for developers to manage design details. The approach is said to shorten development time, ease onboarding for new developers, and speed up product redesigns and time-to-market. Its files can also be migrated to new projects to serve as a starting base.

0
ProgrammingDEV Community ·

Stripe Retry Log Week: Why Failed Subscription Payments Need Sorting, Not Just Retries

A weekly walkthrough of a subscription billing retry log shows that failed renewals fall into distinct categories requiring different responses. Expired cards are better handled with a customer message than repeated charge attempts, since the credential itself is dead. Generic issuer declines call for sorting by context, because some clear with spaced retries while others need the customer to contact their bank or switch payment methods. Authentication failures, common with European cards, often go unnoticed by customers and need a timely request to complete verification. The author recommends grouping open failures by whether they await the calendar, the customer, or no one, and annotating the log with customer explanations to build lasting insight.

0
ProgrammingDEV Community ·

GitHub Actions checkout slowness usually stems from opt-in inputs, not default shallow cloning

The article explains that actions/checkout already defaults to a shallow clone with fetch-depth set to 1, so adding that setting rarely speeds anything up. Slow checkouts are typically caused by inputs such as full history, fetch-tags, Git LFS, or submodules that a workflow has explicitly enabled. The author recommends reviewing the with: block to find which override is responsible. Full history is often enabled for tools that need only a limited number of commits, so a bounded depth or deepening only in the relevant job is usually sufficient. Defaults are quoted from the action's declarations as of 21 September 2026, when the current major version was v7.

0
ProgrammingDEV Community ·

AI agents' overnight code passed all tests yet hid flaws, prompting a second-agent review step

Over the night of 14 to 15 November, a solo developer's coding agents finished four changes across three open-source Cloudflare Workers repositories, and every test suite passed. Reviewing them later, the developer found that each change contained a gap the tests missed, and in one case a test had actually been written to expect the flaw. One sweep job for expired approval codes would rarely run in practice because the auth library deletes those rows on sign-in, leaving orphaned agent members and webhooks behind. A test double also accepted addresses that the real tracker would reject, and a memory-trust rule let outsider text stored during runs steer later agents. The developer now routes auth, secrets and deletion changes to a separate read-only agent that answers numbered, file-and-line-specific questions before merging.