This API provides access to the Model Context Protocol (MCP) Registry.
- Install dependencies:
npm install- Run the server:
# Development mode with auto-reload
npm run dev
# Production mode
npm start- Build the Docker image:
docker build -t mcp-registry .- Run the container:
# Run in detached mode
docker run -d -p 3000:3000 --name mcp-registry mcp-registry
# Run with interactive output
docker run -it -p 3000:3000 --name mcp-registry mcp-registry- Stop the container:
docker stop mcp-registryThe server will start at http://localhost:3000
curl http://localhost:3000/Response:
{
"message": "Welcome to MCP Registry API"
}curl http://localhost:3000/registryResponse:
{
"fetch": {
"description": "HTTP request server for making external API calls",
"command": "uvx",
"args": ["mcp-server-fetch"],
"type": "stdio",
"parameters": {}
},
"memory": {
"description": "Memory management server for conversation history",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"],
"type": "stdio",
"parameters": {}
}
// ... other items
}# Get fetch configuration
curl http://localhost:3000/registry/fetchResponse:
{
"name": "fetch",
"config": {
"description": "HTTP request server for making external API calls",
"command": "uvx",
"args": ["mcp-server-fetch"],
"type": "stdio",
"parameters": {}
}
}# Search for memory-related servers
curl "http://localhost:3000/search?q=memory"
# Search by server type
curl "http://localhost:3000/search?q=server"Response example:
{
"memory": {
"description": "Memory management server for conversation history",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"],
"type": "stdio",
"parameters": {}
}
}Here's a complete test script:
# Test welcome endpoint
echo "Testing welcome endpoint:"
curl http://localhost:3000/
echo -e "\n\nTesting full registry:"
curl http://localhost:3000/registry
echo -e "\n\nTesting specific item (fetch):"
curl http://localhost:3000/registry/fetch
echo -e "\n\nTesting search (memory):"
curl "http://localhost:3000/search?q=memory"