What Is the Model Context Protocol?
The Model Context Protocol (MCP) is an open-source standard for connecting AI applications to external systems like data sources, tools, and workflows. The AI agent incorporates MCP tool responses into the LLM's context window, allowing the model to reason over new information. Think of it as a standardized way for your AI applications to talk to virtually any service or dataset, eliminating the need for everyone to build custom connections their own way. The Science Cloud Research and Innovation team has been developing proof-of-concept MCP implementations for the past 4 to 5 months, building expertise in deployment, testing, and real-world applications.
Key benefits for Science Cloud users:
- Standardized approach that replaces repetitive custom API work
- Connect LLMs to your internal systems and data
- Better scalability and cost-effectiveness compared to direct tool calling
Getting Started with MCP on Science Cloud
Access through Science Cloud services:
- Research Platform (Jupyter Hub with AI Jupyter lab extension)
- Notebook Intelligence extension for natural language interaction
- Built-in agents that can edit notebooks, execute code, and write Python
- Integration with existing Science Cloud authentication
The Science Cloud maintains a repository with multiple proof-of-concept implementations, including servers for HIS archive and other specialized applications. The team has also developed tutorials for FastMCP version 2, the new SDK that explains how to build MCP servers from scratch.
Building Your First MCP Server
Multiple official SDKs are available for building MCP servers, with FastMCP for Python being particularly popular for development. All SDKs build servers that listen on specific ports using STDIO or Streamable HTTP protocols.
Development approaches:
- Use official SDKs like FastMCP for Python
- Convert OpenAPI Spec V3 documents into MCP servers automatically
- Leverage tools and services that handle most of the conversion work
- Ensure your OpenAPI v3 document has clear descriptions for operations, parameters, and responses
Authentication and authorization: MCP includes built-in support for authentication and authorization, integrating with standard identity providers and security frameworks used in enterprise environments.
Deployment Options
The Science Cloud offers multiple deployment strategies based on your needs:
Local deployment:
- Containers or command-line tools (UVX, NPX, Python)
- Container Orchestration Services like ECS or EKS (Kubernetes)
- Observability and security through CloudWatch and similar services
Cloud-native options:
- Serverless services like AWS Bedrock AgentCore Gateway
- AWS provides out-of-the-box identity and observability
- Converts agent MCP client requests into API requests and Lambda invocations
Open-source solutions:
- AgentGateway for AI-native protocols
- Connects, secures, and observes agent-to-agent and agent-to-tool communication
- Works across any agent framework and environment
Testing and Development Tools
For development and testing, the Science Cloud provides access to several key tools:
MCP Inspector for debugging:
- JavaScript-based application for testing servers
- Command:
npx @modelcontextprotocol/inspector - Essential for troubleshooting code during development
Research Platform integration: The Science Cloud's Research Platform has been the preferred testing environment, offering Jupyter hub with an AI extension that allows you to connect to MCP servers and interact with built-in agents using natural language. This platform has proven invaluable for experimenting with multiple MCP servers and agents simultaneously.
Real-World Applications and Use Cases
The Science Cloud team has implemented several practical examples, including a USGS real-time flood impact API server. These implementations demonstrate how MCP can connect AI agents to live data sources and specialized scientific tools.
Common patterns emerging from implementation:
- Converting existing APIs to MCP format for rapid prototyping
- Connecting AI agents to scientific databases and repositories
- Integrating with specialized research instruments and data feeds
- Enabling automated workflows for data processing and analysis
Performance Optimization and Lessons Learned
Through months of testing and implementation, several critical insights have emerged:
Key performance considerations:
- Too many MCP tools overload the LLM's context, increasing cost and latency
- Multiple tools reduce the agent's ability to choose the correct tool reliably
- Agents scale better by writing code to call tools instead of calling tools directly
The "code mode" approach: Instead of having content go back and forth to the LLM (consuming tokens and costing money), agents can write and execute code that calls tools directly. For example, rather than calling a database tool, getting content, sending it back to the LLM, then calling a website tool, the agent writes code that connects to the database and dumps content to the website in one operation.
Additional optimization features:
- AWS AgentCore Gateway semantic search helps agents with proper tool selection
- Converting OpenAPI to MCP is ideal for proof of concepts
- Proper error handling within APIs should be reflected in specifications
Security Considerations
Important security note: An untrusted MCP server becomes an untrusted plugin for your AI agent, with all the risks of installing unknown software. The Science Cloud team emphasizes careful evaluation and proper security protocols when deploying MCP servers.
Best practices:
- Implement proper error handling within your API
- Use Science Cloud's established authentication and authorization frameworks
- Follow NASA guidelines for data classification and access controls
- Leverage Science Cloud's encrypted storage and transmission capabilities
Getting Help and Support
Science Cloud resources:
- MCP proof-of-concept repository with examples and documentation
- Direct support from the Science Cloud team
Important links:
MCP Server Development
- OpenAPI to MCP Server Code Generator https://github.com/cnoe-io/openapi-mcp-codegen
- MCP Official SDK https://modelcontextprotocol.io/docs/sdk
- Context7, Up to Date Code Documentation for Coding Assistants and coding agents https://github.com/upstash/context7
Code Mode, MCP Servers at Scale
- https://www.anthropic.com/engineering/code-execution-with-mcp
- https://blog.cloudflare.com/code-mode/
- Semantic Search https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-using-mcp-semantic-search.html
MCP Deployment
- Open Source for Agent and MCP deployment https://agentgateway.dev/
- AWS Bedrock AgentCore services https://aws.amazon.com/bedrock/agentcore/
- AWS Bedrock AgentCore examples https://github.com/awslabs/amazon-bedrock-agentcore-samples
The Science Cloud team continues to develop new MCP implementations and is available to assist with your specific use cases and deployment needs.
Next Steps
While MCP in the Science Cloud is currently in the proof-of-concept stage and not yet ready for use, there are several steps you can take to prepare your workflows for future MCP integration. Start by exploring the proof-of-concept repository to understand existing implementations and see how other researchers have approached similar challenges. Next, identify APIs or data sources in your current research workflows that could benefit from MCP integration—look for repetitive data access patterns or systems that would benefit from AI-powered automation. If you have existing well-documented APIs, consider improving your OpenAPI documentation as this will provide the fastest path to a working MCP server when the capability becomes available. Finally, use the Research Platform for testing and development, taking advantage of its Jupyter environment to experiment with concepts that will later integrate with MCP.
For additional support or questions about MCP on Science Cloud, contact the Science Cloud Help Desk at support@sciencecloud.nasa.gov.



