IP Library Granted Patent US 12,739,264
Granted Patent B1
US 12,739,264 · App. 19/530,312 · Granted Sep 15, 2026

Policy enforcement gateway for secure access to model context protocol servers

Inventors: Andrew Morgan (Dublin, IE); Rahul Parwani (Atlanta, GA)
Assignee: Airia LLC
H04L63/1416G06F21/53H04L41/40H04L63/102H04L63/105H04L63/1441H04L63/20H04L67/02
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,739,264
App. No.
19/530,312
Granted
Sep 15, 2026
Kind
B1
Abstract

A gateway securely executes model context protocol (“MCP”) processes for artificial intelligence (“AI”) agents by creating nano sandboxes in which the MCP processes execute. A server-sent events (“SSE”) bridge identifies a request to initialize an SSE channel with an MCP server, the request being sent from an MCP client that generates MCP-compliant commands in association with an AI agent. The SSE bridge instantiates a nano sandbox based on a definition extracted from the request, creating a custom and dynamic isolated execution environment. An MCP process is launched within the nano sandbox. The SSE bridge returns a session identifier, and receives a command and the session identifier. The SSE bridge authorizes the command and response by applying security rules, blocking either for non-compliance.

Claims (56)

1 . A method for secure model context protocol (“MCP”) access for artificial intelligence (“AI”) agents, comprising:

receiving, at an AI tool gateway, a request from an MCP client to access an MCP server, wherein the request comprises a nano sandbox definition in a hypertext transfer protocol (“HTTP”) header;

authenticating the MCP client using a credential retrieved from a credential store;

verifying that the nano sandbox definition complies with security rules;

instantiating a nano sandbox as an isolated execution environment for the MCP server;

receiving a resource command from the MCP client;

verifying the resource command complies with the security rules;

transmitting the resource command to the MCP server within the nano sandbox;

verifying an output of the MCP server complies with the security rules; and

transmitting the output to the MCP client,

wherein transmitting the resource command to the MCP server comprises writing the resource command to a standard input (“STDIN”) pipe of the MCP server, and wherein verifying the output comprises reading from a standard output (“STDOUT”) pipe of the MCP server.

2 . The method of claim 1 , wherein the credential is at least one of an application programming interface (“API”) key, an OAuth token, or a JSON Web Token (“JWT”).

3 . The method of claim 1 , wherein the credential store encrypts credentials at rest.

4 . The method of claim 1 , wherein the credential store is integrated with an external credential management system.

5 . The method of claim 1 , further comprising automated rotation of the credential based on an expiration policy.

6 . The method of claim 1 , wherein verifying that the nano sandbox definition complies with security rules comprises verifying that system resources and permissions indicated by the nano sandbox definition meet the security rules.

7 . The method of claim 1 , wherein verifying the resource command against the security rules comprises:

checking the resource command for prompt injection;

checking the resource command for code injection; and

comparing the resource command against a whitelist of allowed commands or a blacklist of disallowed commands.

8 . The method of claim 1 , wherein verifying the output of the MCP server complies with the security rules comprises:

checking the output for scripts; and

checking the output for personally identifiable information (“PII”).

9 . The method of claim 1 , further comprising logging the resource command and the output for auditing access.

10 . The method of claim 9 , further comprising monitoring a standard error (“STDERR”) pipe of the MCP server and logging errors from the STDERR pipe.

11 . The method of claim 10 , further comprising detecting a nano sandbox escape attempt based on the errors from the STDERR pipe.

12 . The method of claim 1 , wherein instantiating the nano sandbox comprises executing a bubblewrap command that restricts file system access of the nano sandbox to one or more specified directories.

13 . The method of claim 1 , further comprising injecting the credential into the nano sandbox as an environment variable, wherein the MCP server uses the credential to access an external resource.

14 . The method of claim 1 , wherein the AI tool gateway receives requests from a plurality of MCP clients, and wherein the gateway instantiates a separate nano sandbox for each MCP client of the plurality of MCP clients.

15 . The method of claim 14 , wherein the plurality of MCP clients are associated with different tenants, and wherein each nano sandbox enforces tenant isolation.

16 . The method of claim 1 , wherein the nano sandbox is ephemeral, and further comprising terminating the nano sandbox after transmitting the output to the MCP client.

17 . The method of claim 1 , wherein the security rules are received from an AI platform and stored at the AI tool gateway.

18 . A non-transitory, computer-readable medium containing instructions for secure model context protocol (“MCP”) server access for artificial intelligence (“AI”) agents, wherein the instructions are executed by at least one processor to perform stages comprising:

receiving, at an AI tool gateway, a request from an MCP client to access an MCP server, wherein the request comprises a nano sandbox definition in a hypertext transfer protocol (“HTTP”) header;

authenticating the MCP client using a credential retrieved from a credential store;

verifying that the nano sandbox definition complies with security rules;

instantiating a nano sandbox as an isolated execution environment for the MCP server;

receiving a resource command from the MCP client;

verifying the resource command complies with the security rules;

transmitting the resource command to the MCP server within the nano sandbox;

verifying an output of the MCP server complies with the security rules; and

transmitting the output to the MCP client,

wherein transmitting the resource command to the MCP server comprises writing the resource command to a standard input (“STDIN”) pipe of the MCP server, and wherein verifying the output comprises reading from a standard output (“STDOUT”) pipe of the MCP server.

19 . A system for secure model context protocol (“MCP”) server access for artificial intelligence (“AI”) agents, the system comprising:

at least one physical non-transitory, computer-readable medium comprising instructions; and

an AI tool gateway with at least one processor that executes the instructions to perform stages comprising:

receiving a request from an MCP client to access an MCP server, wherein the request comprises a nano sandbox definition in a hypertext transfer protocol (“HTTP”) header;

authenticating the MCP client using a credential retrieved from a credential store;

verifying that the nano sandbox definition complies with security rules;

instantiating a nano sandbox as an isolated execution environment for the MCP server;

receiving a resource command from the MCP client;

verifying the resource command complies with the security rules;

transmitting the resource command to the MCP server within the nano sandbox;

verifying an output of the MCP server complies with the security rules; and

transmitting the output to the MCP client,

wherein transmitting the resource command to the MCP server comprises writing the resource command to a standard input (“STDIN”) pipe of the MCP server, and wherein verifying the output comprises reading from a standard output (“STDOUT”) pipe of the MCP server.

Continuity (2)
Continuation 19267469 · Jul 11, 2025
Provisional Application 63815410 · May 30, 2025
References Cited (190)
US 7206805B1 · McLaughlin, Jr. · 2007 [cited by examiner]
US 7290056B1 · McLaughlin, Jr. · 2007 [cited by examiner]
US 7640540B2 · Snover · 2009 [cited by examiner]
US 9280677B1 · Perry · 2016 [cited by examiner]
US 10073970B2 · Kraemer · 2018 [cited by examiner]
US 10192170B2 · Bates · 2019 [cited by examiner]
US 10389592B2 · Lui · 2019 [cited by examiner]
US 11240128B2 · Chitalia · 2022 [cited by examiner]
US 11243751B1 · Beale · 2022 [cited by examiner]
US 11323327B1 · Chitalia · 2022 [cited by examiner]
US 11392894B2 · Tatituri · 2022 [cited by examiner]
US 11508371B2 · Kothari · 2022 [cited by examiner]
US 11770398B1 · Erlingsson · 2023 [cited by examiner]
US 11792284B1 · Nanduri · 2023 [cited by examiner]
US 11818156B1 · Parikh · 2023 [cited by examiner]
US 11922220B2 · Haghighat · 2024 [cited by examiner]
US 11973784B1 · Erlingsson · 2024 [cited by examiner]
US 11977471B2 · Casati · 2024 [cited by examiner]
US 12021693B1 · Chitalia et al. · 2024 [cited by applicant]
US 12021888B1 · Reed · 2024 [cited by examiner]
US 12058160B1 · Erlingsson · 2024 [cited by examiner]
US 12095794B1 · Karaje · 2024 [cited by examiner]
US 12095796B1 · Godefroid · 2024 [cited by examiner]
US 12126643B1 · Skarphedinsson · 2024 [cited by examiner]
US 12130878B1 · Nanduri · 2024 [cited by examiner]
US 12141726B2 · Cook · 2024 [cited by examiner]
US 12242521B2 · Zarokian · 2025 [cited by examiner]
US 12261866B1 · Yen · 2025 [cited by examiner]
US 12267345B1 · Erlingsson · 2025 [cited by examiner]
US 12282557B2 · Shear · 2025 [cited by examiner]
US 12284197B1 · Martin · 2025 [cited by examiner]
US 12309182B1 · McAleer · 2025 [cited by examiner]
US 12309185B1 · Skarphedinsson · 2025 [cited by examiner]
US 12309236B1 · Frazier, Jr. · 2025 [cited by examiner]
US 12323449B1 · Graves · 2025 [cited by examiner]
US 12335286B1 · Erlingsson · 2025 [cited by examiner]
US 12335348B1 · Martin · 2025 [cited by examiner]
US 12341797B1 · Adamson · 2025 [cited by examiner]
US 12348545B1 · Parikh · 2025 [cited by examiner]
US 12355626B1 · Varakantam · 2025 [cited by examiner]
US 12355787B1 · Reed · 2025 [cited by examiner]
US 12355793B1 · Erlingsson · 2025 [cited by examiner]
US 12363148B1 · Nanduri · 2025 [cited by examiner]
US 12368745B1 · Guo · 2025 [cited by examiner]
US 12368746B1 · Reed · 2025 [cited by examiner]
US 12375573B1 · Nanduri · 2025 [cited by examiner]
US 12381901B1 · Golden · 2025 [cited by examiner]
US 12393676B1 · Morgan · 2025 [cited by applicant]
US 12401669B1 · Varakantam · 2025 [cited by examiner]
US 12405849B1 · Reed · 2025 [cited by examiner]
US 12407701B1 · Varakantam · 2025 [cited by examiner]
US 12407702B1 · de Wet · 2025 [cited by examiner]
US 12418552B1 · Karaje · 2025 [cited by examiner]
US 12418555B1 · Skarphedinsson · 2025 [cited by examiner]
US 12425428B1 · Sobrier · 2025 [cited by examiner]
US 12425430B1 · Reed · 2025 [cited by examiner]
US 12445474B1 · Reed · 2025 [cited by examiner]
US 12452272B1 · Subramanian · 2025 [cited by examiner]
US 12457231B1 · Erlingsson · 2025 [cited by examiner]
US 12463994B1 · Tock · 2025 [cited by examiner]
US 12463995B1 · Welsh · 2025 [cited by examiner]
US 12463996B1 · Welsh · 2025 [cited by examiner]
US 12463997B1 · Guo · 2025 [cited by examiner]
US 12464003B1 · Pandya · 2025 [cited by examiner]
US 12468770B2 · Crabtree · 2025 [cited by examiner]
US 12470577B1 · Patil · 2025 [cited by examiner]
US 12470578B1 · Patil · 2025 [cited by examiner]
US 12483576B1 · Guo · 2025 [cited by examiner]
US 12489770B1 · Fechner · 2025 [cited by examiner]
US 12489771B1 · Erlingsson · 2025 [cited by examiner]
US 12495052B1 · Godefroid · 2025 [cited by examiner]
US 12500910B1 · Adamson · 2025 [cited by examiner]
US 12500911B1 · Nicholson · 2025 [cited by examiner]
US 12500912B1 · Erlingsson · 2025 [cited by examiner]
US 12511110B1 · Maya · 2025 [cited by examiner]
US 12513221B1 · Nanduri · 2025 [cited by examiner]
US 12537836B1 · Singh · 2026 [cited by examiner]
US 12537839B1 · Reed · 2026 [cited by examiner]
US 12537840B1 · Sakhadeo · 2026 [cited by examiner]
US 12537884B1 · Hall · 2026 [cited by examiner]
US 12541517B2 · Schieferstein · 2026 [cited by examiner]
US 12541797B2 · Kloeppel · 2026 [cited by examiner]
US 12549574B1 · Morgan · 2026 [cited by examiner]
US 12549575B1 · Singh · 2026 [cited by examiner]
US 12549577B1 · Rioux · 2026 [cited by examiner]
US 12556548B1 · Vanninen · 2026 [cited by examiner]
US 12556559B1 · Bhattacharya · 2026 [cited by examiner]
US 12561683B2 · Bansal · 2026 [cited by examiner]
US 12562968B1 · Morgan · 2026 [cited by examiner]
US 12563060B1 · Sobrier · 2026 [cited by examiner]
US 12563071B1 · Skarphedinsson · 2026 [cited by examiner]
US 12568091B1 · Morgan et al. · 2026 [cited by applicant]
US 12574336B1 · Morgan et al. · 2026 [cited by applicant]
US 12580932B1 · McAleer · 2026 [cited by examiner]
US 12580934B1 · Adamson · 2026 [cited by examiner]
US 12580935B1 · Singh · 2026 [cited by examiner]
US 12580936B1 · Palmer · 2026 [cited by examiner]
US 12587553B1 · Nanduri · 2026 [cited by examiner]
US 12598205B1 · Hayes · 2026 [cited by examiner]
US 12602470B1 · Morgan · 2026 [cited by examiner]
US 20100070546A1 · Meyer · 2010 [cited by examiner]
US 20100070552A1 · Parker · 2010 [cited by examiner]
US 20100070560A1 · Hale · 2010 [cited by examiner]
US 20100287618A1 · Howell · 2010 [cited by examiner]
US 20120233668A1 · Leafe · 2012 [cited by examiner]
US 20150317490A1 · Carey · 2015 [cited by examiner]
US 20190294779A1 · Suneja · 2019 [cited by examiner]
US 20200195531A1 · Mercian · 2020 [cited by examiner]
US 20210243180A1 · Beale · 2021 [cited by examiner]
US 20220027178A1 · Caldarale · 2022 [cited by examiner]
US 20220027179A1 · Caldarale · 2022 [cited by examiner]
US 20220027220A1 · Caldarale · 2022 [cited by examiner]
US 20220027454A1 · Caldarale · 2022 [cited by examiner]
US 20220027457A1 · Caldarale · 2022 [cited by examiner]
US 20220027458A1 · Caldarale · 2022 [cited by examiner]
US 20220027485A1 · Caldarale · 2022 [cited by examiner]
US 20220121432A1 · Beale · 2022 [cited by examiner]
US 20220200869A1 · Erlingsson · 2022 [cited by examiner]
US 20220215101A1 · Rioux · 2022 [cited by examiner]
US 20220224707A1 · Kapoor · 2022 [cited by examiner]
US 20220232024A1 · Kapoor · 2022 [cited by examiner]
US 20220232025A1 · Kapoor · 2022 [cited by examiner]
US 20220247769A1 · Erlingsson · 2022 [cited by examiner]
US 20220279004A1 · Erlingsson · 2022 [cited by examiner]
US 20220294816A1 · Martin · 2022 [cited by examiner]
US 20220303295A1 · Erlingsson · 2022 [cited by examiner]
US 20220311794A1 · Maya · 2022 [cited by examiner]
US 20220329616A1 · O'Hearn · 2022 [cited by examiner]
US 20220360600A1 · Reed · 2022 [cited by examiner]
US 20220400130A1 · Kapoor · 2022 [cited by examiner]
US 20230032686A1 · Williams · 2023 [cited by examiner]
US 20230075355A1 · Twigg · 2023 [cited by examiner]
US 20230254330A1 · Singh · 2023 [cited by examiner]
US 20230275917A1 · Karmali · 2023 [cited by examiner]
US 20230319092A1 · Zeng · 2023 [cited by examiner]
US 20230328086A1 · Kapoor · 2023 [cited by examiner]
US 20230393888A1 · Remahl · 2023 [cited by examiner]
US 20240080277A1 · Lee · 2024 [cited by examiner]
US 20240080329A1 · Reed · 2024 [cited by examiner]
US 20240106846A1 · Kapoor · 2024 [cited by examiner]
US 20240256423A1 · Zhang · 2024 [cited by examiner]
US 20240348649A1 · Schwartz · 2024 [cited by examiner]
US 20250005836A1 · Chu · 2025 [cited by examiner]
US 20250021365A1 · Atanasov · 2025 [cited by examiner]
US 20250106307A1 · Wang · 2025 [cited by examiner]
US 20250139446A1 · Li · 2025 [cited by examiner]
US 20250156828A1 · Sliwka · 2025 [cited by examiner]
US 20250190966A1 · Gutierrez-Sheris · 2025 [cited by examiner]
US 20250202973A1 · Chao · 2025 [cited by examiner]
US 20250225253A1 · Godefroid · 2025 [cited by examiner]
US 20250244970A1 · Sundaram · 2025 [cited by examiner]
US 20250278753A1 · Lovett · 2025 [cited by examiner]
US 20250292250A1 · Makeig · 2025 [cited by examiner]
US 20250298905A1 · Godefroid · 2025 [cited by examiner]
US 20250306740A1 · Xie · 2025 [cited by examiner]
US 20250322969A1 · Brilliant · 2025 [cited by examiner]
US 20250328560A1 · Madisetti · 2025 [cited by examiner]
US 20250328781A1 · Brilliant · 2025 [cited by examiner]
US 20250328818A1 · Brilliant · 2025 [cited by examiner]
US 20250328974A1 · Brilliant · 2025 [cited by examiner]
US 20250330528A1 · Xie · 2025 [cited by examiner]
US 20250345005A1 · Simmons · 2025 [cited by examiner]
US 20250356978A1 · Withrow · 2025 [cited by examiner]
US 20250371225A1 · Lesnik · 2025 [cited by examiner]
US 20250373451A1 · Jungerman · 2025 [cited by examiner]
US 20250373630A1 · Adamson · 2025 [cited by examiner]
US 20250373639A1 · Emery · 2025 [cited by examiner]
US 20250373645A1 · Kumar · 2025 [cited by examiner]
US 20250390352A1 · Crabtree · 2025 [cited by examiner]
US 20250391285A1 · Jayakeerthi · 2025 [cited by examiner]
US 20260003586A1 · Abrahami · 2026 [cited by examiner]
US 20260004166A1 · Turan · 2026 [cited by examiner]
US 20260010623A1 · Kerkar · 2026 [cited by examiner]
US 20260017498A1 · Jayakeerthi · 2026 [cited by examiner]
US 20260017655A1 · Vadhri · 2026 [cited by examiner]
US 20260019292A1 · Mishelevich · 2026 [cited by examiner]
US 20260024038A1 · Iyer · 2026 [cited by examiner]
US 20260030706A1 · Blankenship · 2026 [cited by examiner]
US 20260039670A1 · Shah · 2026 [cited by examiner]
US 20260058997A1 · Qureshi · 2026 [cited by examiner]
US 20260065353A1 · Wenkoff · 2026 [cited by examiner]
US 20260075067A1 · Cong · 2026 [cited by examiner]
US 20260081010A1 · Ausin · 2026 [cited by examiner]
US 20260086773A1 · Donuru · 2026 [cited by examiner]
US 20260094017A1 · Jayakeerthi · 2026 [cited by examiner]
CN 120029517A · 2025 [cited by applicant]
CN 120547240A · 2025 [cited by applicant]
CN 120560800A · 2025 [cited by applicant]
Ivo Brett, Simplified and Secure MCP Gateways for Enterprise AI Integration, 2025, CISSP, B .Eng, MSc Solution Architect/Educator independent.academia.edu/ivobrett, pp. 1-4 (Year: 2025). [cited by applicant]
Wen et al; From stdio to HTTP SSE: Host Your MCP Server with APISIX API Gateway; Apr. 21, 2025; The Apache Software Foundation; pp. 1-10. (Year: 2025). [cited by applicant]