Skip to content

Documentation: Define 1st vs 3rd party MCP servers #613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ttripp
Copy link

@ttripp ttripp commented May 31, 2025

This pull request adds definitions for "First-Party Hosted MCP Server" and "MCP Proxy Server", along with a clarifying architecture diagram, to the security best practices documentation. Adding this terminology helps to set the basis for further discussions on best practices.

Motivation and Context

The operational context of an MCP Server significantly impacts its security considerations. An MCP Server can either directly manage access to resources owned and controlled by the same entity operating the server ("First-Party Hosted") or act as an intermediary to connect MCP clients to third-party APIs ("MCP Proxy").

Understanding this distinction is critical for applying relevant security best practices. For example:

  • Authentication and Authorization: While MCP leverages OAuth 2.1 for interactions between the Host/Client and the Server, the nature of the backend resource affects the overall authorization chain. A First-Party Hosted server is acting as the host of its own resources based on the authenticated identity, while an MCP Proxy server might delegate operations to a third-party API, requiring it to manage credentials (potentially Non-Human Identities - NHIs) for that third-party system . This introduces complexities in delegated authority and trust management
  • Threat Modeling: Different deployment models are susceptible to different risks. A First-Party Hosted model primarily focuses on securing the direct interactions and access controls to owned resources. A Proxy model, however, introduces supply chain risks related to the third-party API and specific threats related to the proxy's management and use of credentials for that third party. Mitigations discussed in sources like the OWASP Agentic AI Threats document, such as securing tool execution and managing NHIs, need to be applied considering these specific architectural patterns.
  • Principle of Least Privilege: Applying least privilege requires understanding the full chain of access. For a First-Party server, this means restricting the client's access to the server's capabilities. For a Proxy, it additionally means ensuring the proxy itself has only the minimum necessary permissions on the third-party system it interacts with.

Adding these definitions and the diagram provides essential common terminology and context, making the security considerations discussed further in the document clearer and helping implementers understand which best practices apply to their specific MCP deployment scenario.

How Has This Been Tested?

This change is purely documentation to provide clarity on architectural patterns. It does not involve code changes or require technical testing scenarios.

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • [x ] I have read the MCP Documentation
  • [x ] My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • [x ] I have added or updated documentation as needed

Additional context

Adding this terminology helps to set the basis for further discussions on best practices.

Define security best practices with
1st party vs 3rd party terminology and
architecture diagram
@localden localden added security enhancement New feature or request labels Jun 3, 2025

**MCP Proxy Server**
: An MCP server that connects MCP clients to third-party APIs, offering MCP features while delegating operations and acting as a single OAuth client to the third-party API server.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also bring in other terms here that are lower in the doc, like authorization servers (for consistency)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


The following diagram illustrates the architecture of MCP implementations, highlighting the roles of MCP Proxy Servers and First-Party Hosted MCP Servers.

```mermaid
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we add diagrams for two distinct scenarios, this needs to be broken up into two distinct diagrams for clarity

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@localden I've broken the diagram up into two diagrams. Does this address your comments?

@localden localden added the documentation Improvements or additions to documentation label Jun 3, 2025
ttripp and others added 5 commits June 4, 2025 16:12
Sounds good.  It does make it easier to consume!

Co-authored-by: Den Delimarsky 🌺 <53200638+localden@users.noreply.github.com>
… align with localden review request.

"You should also bring in other terms here that are lower in the doc, like authorization servers (for consistency)"

https://github.com/modelcontextprotocol/modelcontextprotocol/pull/613/files#r2124945313
…nd consistencyz

Addresses @localden comment: https://github.com/modelcontextprotocol/modelcontextprotocol/pull/613/files#r2124946228

"If we add diagrams for two distinct scenarios, this needs to be broken up into two distinct diagrams for clarity"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants