Skip to content

Commit f12be29

Browse files
committed
Improve documentations
1 parent b8db119 commit f12be29

File tree

8 files changed

+354
-322
lines changed

8 files changed

+354
-322
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -3,96 +3,11 @@
33
Thank you for considering contributing to mcpm.sh! This document outlines the process for adding or updating MCP servers in the registry.
44

55
## Adding a New Server
6-
7-
1. Fork this repository
8-
2. Create a new JSON file named after your server under `mcp-registry/servers/` (use kebab-case, e.g., `github.json` or `time-converter.json`)
9-
3. Ensure your server JSON file adheres to the [server schema](/mcp-registry/schema/server-schema.json)
10-
11-
### Server JSON Requirements
12-
13-
Your server JSON file must include the following required fields:
14-
15-
```json
16-
{
17-
"name": "your-server-name",
18-
"display_name": "Your Server Display Name",
19-
"description": "Brief description of the server's functionality",
20-
"repository": {
21-
"type": "git",
22-
"url": "https://github.com/your-username/your-repo"
23-
},
24-
"author": {
25-
"name": "Your Name"
26-
},
27-
"license": "MIT",
28-
"categories": ["category1", "category2"],
29-
"tags": ["tag1", "tag2"],
30-
"arguments": {
31-
"EXAMPLE_ARG": {
32-
"description": "Description of this argument",
33-
"required": false
34-
}
35-
},
36-
"installations": {
37-
"npm": {
38-
"type": "npm",
39-
"command": "npx",
40-
"args": ["your-server-package"],
41-
"env": {
42-
"EXAMPLE_ARG": "${EXAMPLE_ARG}"
43-
}
44-
}
45-
},
46-
"examples": [
47-
{
48-
"title": "Example usage",
49-
"description": "Brief description of example",
50-
"prompt": "Example prompt to demonstrate server functionality"
51-
}
52-
]
53-
}
54-
```
55-
56-
For a complete reference of all available fields, see the [server schema](/mcp-registry/schema/server-schema.json).
57-
58-
## Schema Validation
59-
60-
All server JSON files are automatically validated against the schema during the CI process. You can also validate your server JSON locally using the prepare.py script:
61-
62-
```bash
63-
# From the repository root
64-
python scripts/prepare.py mcp-registry pages --validate-only
65-
```
66-
67-
## Updating an Existing Server
68-
69-
1. Fork this repository
70-
2. Update the relevant server JSON file in the `mcp-registry/servers/` directory
71-
3. Submit a pull request with a clear description of your changes
6+
Please follow the instructions in the [mcp-registry/README.md](mcp-registry/README.md) file.
727

738
## Website Development
749

75-
If you want to contribute to the mcpm.sh website itself:
76-
77-
1. Fork and clone the repository
78-
2. Run the development server:
79-
80-
```bash
81-
./dev.sh
82-
```
83-
84-
3. Access the site at http://localhost:4000
85-
4. Make your changes to the files in the `pages/` directory
86-
5. Submit a pull request with a clear description of your changes
87-
88-
## Design Guidelines
89-
90-
mcpm.sh follows a minimal, clean design philosophy:
91-
92-
- Stick to a minimal black and white color scheme
93-
- Focus on functionality and readability
94-
- Follow modern web design patterns
95-
- Keep UI elements simple and focused on content
10+
Please follow the instructions in the [docs/dev_guide.md](docs/dev_guide.md) file.
9611

9712
## Code of Conduct
9813

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Built with ❤️ by Path Integral Institute
1616

1717
# 🌟 MCPM - Model Context Protocol Manager
1818

19-
MCPM is a Homebrew-like service and command-line interface for managing Model Context Protocol (MCP) servers. It simplifies managing server configurations across various supported clients, allows grouping servers into profiles, and helps discover new servers via a registry.
19+
MCPM is a Homebrew-like service and command-line interface for managing Model Context Protocol (MCP) servers. It simplifies managing server configurations across various supported clients, allows grouping servers into profiles, helps discover new servers via a registry, and includes a powerful router that aggregates multiple MCP servers behind a single endpoint with shared sessions.
2020

2121
## 🤝 Community Contributions
2222

@@ -57,9 +57,10 @@ MCPM simplifies the installation, configuration, and management of Model Context
5757
- ✨ Easy addition and removal of MCP server configurations for supported clients.
5858
- 📋 Centralized management using profiles: group server configurations together and activate/deactivate them easily.
5959
- 🔍 Discovery of available MCP servers through a central registry.
60-
- 🖥️ Detection of installed MCP clients on your system.
60+
- 🔌 MCPM Router for aggregating multiple MCP servers behind a single endpoint with shared sessions.
6161
- 💻 A command-line interface (CLI) for all management tasks.
62-
- 🔧 Utilities like a configuration inspector.
62+
63+
See [Advanced Features](docs/advanced_features.md) for more capabilities like shared server sessions and the MCPM Router.
6364

6465
## 🖥️ Supported MCP Clients
6566

@@ -143,7 +144,9 @@ The MCPM Router runs as a background daemon process, acting as a stable endpoint
143144

144145
This allows you to change the underlying servers (by switching profiles with `mcpm activate`) without reconfiguring your client applications. They can always point to the MCPM Router's address.
145146

146-
For more technical details on the router's implementation and namespacing, see [`src/mcpm/router/README.md`](src/mcpm/router/README.md).
147+
The Router also maintains persistent connections to MCP servers, enabling multiple clients to share these server sessions. This eliminates the need to start separate server instances for each client, significantly reducing resource usage and startup time. Learn more about these advanced capabilities in [Advanced Features](docs/advanced_features.md).
148+
149+
For more technical details on the router's implementation and namespacing, see [`docs/router_tech_design.md`](docs/router_tech_design.md).
147150

148151
```bash
149152
mcpm router status # Check if the router daemon is running

docs/advanced_features.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# MCPM Router
2+
3+
The MCPM Router is a module that allows you to aggregate multiple MCP servers (both SSE and STDIO) and expose them as a single SSE server. The router acts in a dual role:
4+
5+
1. **As an MCP Client**: Connects to multiple downstream MCP servers
6+
2. **As an MCP Server**: Provides a unified interface to upstream MCP clients
7+
8+
This design allows for aggregation of capabilities from multiple MCP servers while providing a single, stable connection point for clients. The router also supports profile management to control which servers are available to specific clients.
9+
10+
A key benefit of the MCPM Router is that it maintains persistent connections to MCP servers, allowing multiple clients to share these server sessions. This eliminates the need to start separate server instances for each client, significantly reducing resource usage and startup time.
11+
12+
## How It Works
13+
14+
The MCPM Router sits between your clients and multiple MCP servers, acting as a central hub:
15+
16+
```mermaid
17+
flowchart TD
18+
%% Clients
19+
client1[Claude Desktop<br>Profile: Study]
20+
client2[Cursor<br>Profile: Development]
21+
client3[Goose<br>Profile: Creativity]
22+
23+
%% Router with profiles inside
24+
subgraph router[MCPM Router]
25+
subgraph profiles[Profiles]
26+
studyProfile[Study Profile]
27+
devProfile[Development Profile]
28+
creativeProfile[Creativity Profile]
29+
end
30+
end
31+
32+
%% Servers - concrete examples
33+
server1[Notion MCP Server]
34+
server2[Python Interpreter MCP Server]
35+
server3[Image Generation MCP Server]
36+
server4[Web Search MCP Server]
37+
server5[Web Fetch MCP Server]
38+
server6[Blender MCP Server]
39+
server7[Slack MCP Server]
40+
41+
%% Client to profile connections directly
42+
client1 --> studyProfile
43+
client2 --> devProfile
44+
client3 --> creativeProfile
45+
46+
%% Profile to server access
47+
studyProfile --> server1
48+
studyProfile --> server4
49+
studyProfile --> server5
50+
51+
devProfile --> server1
52+
devProfile --> server2
53+
devProfile --> server4
54+
devProfile --> server5
55+
devProfile --> server7
56+
57+
creativeProfile --> server1
58+
creativeProfile --> server3
59+
creativeProfile --> server6
60+
61+
%% Styling
62+
classDef client fill:#d4f1f9,stroke:#333,stroke-width:1px;
63+
classDef router fill:#ffcc99,stroke:#333,stroke-width:1px;
64+
classDef server fill:#d5e8d4,stroke:#333,stroke-width:1px;
65+
classDef profile fill:#e1d5e7,stroke:#333,stroke-width:1px;
66+
67+
class client1,client2,client3 client;
68+
class router router;
69+
class server1,server2,server3,server4,server5,server6,server7 server;
70+
class studyProfile,devProfile,creativeProfile,profiles profile;
71+
```
72+
73+
### Key Concepts
74+
75+
#### 1. Unified Access
76+
Clients connect only to the router, not directly to servers. The router provides a single endpoint for accessing capabilities from all connected servers.
77+
78+
#### 2. Profiles
79+
Profiles are configurations within the router that determine which servers' capabilities are exposed to each client:
80+
81+
| Client | Profile | Available Servers |
82+
| -------------- | ----------- | -------------------------------------------------------- |
83+
| Claude Desktop | Study | Notion, Web Search, Web Fetch |
84+
| Cursor | Development | Notion, Python Interpreter, Web Search, Web Fetch, Slack |
85+
| Goose | Creativity | Notion, Image Generation, Blender |
86+
87+
#### 3. Namespacing
88+
The router prefixes capabilities from different servers to avoid conflicts:
89+
- Tools: `notion_t_pageSearch` or `python_t_executeCode`
90+
- Prompts: `image_p_generatePortrait`
91+
- Resources: `webfetch:https://example.com`
92+
93+
#### 4. Server Connections
94+
The router supports both STDIO (command-line) and SSE (HTTP) server connections. For example:
95+
- STDIO: Python Interpreter, Blender
96+
- SSE: Web Search, Notion, Slack
97+
98+
#### 5. Shared Server Sessions
99+
The router maintains persistent connections to all configured servers, allowing multiple clients to share the same server sessions. This means:
100+
- Only one instance of each server is needed regardless of client count
101+
- Server initialization happens only once
102+
- State can be shared across clients when appropriate
103+
- Resources like memory and CPU usage are significantly reduced
104+
105+
## Features
106+
107+
- Aggregate multiple MCP servers as a single server
108+
- Support both SSE and STDIO connections to underlying servers
109+
- Namespace capabilities from different servers
110+
- Expose a unified SSE server interface
111+
- Profile-based server access control
112+
- Dynamic configuration reloading
113+
- Share server connections among multiple clients (no need for separate server instances per client)
114+
- Reduce resource usage through connection pooling
File renamed without changes.

0 commit comments

Comments
 (0)