federated-mcp
The federated-mcp is an implementation that adheres to the official MCP specification, including message framing, transport layer implementation, and complete protocol lifecycle management. This tool provides a foundation for building federated MCP systems that can scale across multiple servers while maintaining security and standardization requirements. It enables federated connections between AI systems and various data sources, functioning as a distributed runtime system with edge computing capabilities.
GitHub Stars
52
User Rating
Not Rated
Favorites
0
Views
17
Forks
10
Issues
0
Node.js: 18.0.0以上npm: 8.0.0以上Installation
Installation
Prerequisites
Please specify required software and versions:Installation Steps
1. Clone Repository
bash
git clone https://github.com/ruvnet/federated-mcp
cd federated-mcp
2. Install Dependencies
bash
npm install
3. Configure Claude Desktop
Editclaude_desktop_config.json to add the MCP server:
json
{
"mcpServers": {
"server-name": {
"command": "node",
"args": ["path/to/server.js"]
}
}
}
4. Start Server
bash
npm start
Troubleshooting
Common Issues
Issue: Server won't start Solution: Check Node.js version and reinstall dependencies. Issue: Not recognized by Claude Desktop Solution: Verify configuration file path and syntax.Configuration
Configuration
Basic Configuration
Claude Desktop Setup
Edit~/.config/claude-desktop/claude_desktop_config.json (macOS/Linux) or
%APPDATA%\Claude\claude_desktop_config.json (Windows):
json
{
"mcpServers": {
"tool-name": {
"command": "npx",
"args": ["-y", "package-name"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
Environment Variables
Set the following environment variables as needed:bash
export API_KEY="your-api-key"
export DEBUG="true"
Advanced Configuration
Security Settings
Performance Tuning
Configuration Examples
Basic Configuration
json
{
"mcpServers": {
"example-mcp": {
"command": "node",
"args": ["server.js"],
"env": {
"PORT": "3000",
"LOG_LEVEL": "info"
}
}
}
}
Advanced Configuration
json
{
"mcpServers": {
"advanced-mcp": {
"command": "python",
"args": ["-m", "server"],
"cwd": "/path/to/server",
"env": {
"PYTHONPATH": "/path/to/modules",
"CONFIG_FILE": "/path/to/config.json"
}
}
}
}
Examples
Examples
Basic Usage
Here are basic usage examples for the MCP server:Using with Claude Desktop
Available tools from this MCP server:
- tool1: Description of tool1
- tool2: Description of tool2
Programmatic Usage
javascript
// JavaScript example (Node.js)
const { MCPClient } = require('@modelcontextprotocol/client');
const client = new MCPClient();
await client.connect();
// Execute tool
const result = await client.callTool('toolName', {
parameter1: 'value1',
parameter2: 'value2'
});
console.log(result);
Advanced Examples
Automation Script
bash
#!/bin/bash
Batch processing example
for file in *.txt; do
mcp-tool process "$file"
done
API Integration
python
Python example
import requests
import json
def call_mcp_tool(tool_name, params):
response = requests.post(
'http://localhost:3000/mcp/call',
json={
'tool': tool_name,
'parameters': params
}
)
return response.json()
Usage example
result = call_mcp_tool('analyze', {
'input': 'sample data',
'options': {'format': 'json'}
})
Use Cases
Additional Resources
Enhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active.