docs: update README with new import and discussion
This commit is contained in:
parent
a81d5a5bb0
commit
073555ba04
2 changed files with 29 additions and 83 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -3,3 +3,5 @@ data
|
||||||
.env
|
.env
|
||||||
.mcpregistry*
|
.mcpregistry*
|
||||||
**/bin
|
**/bin
|
||||||
|
cmd/registry/registry
|
||||||
|
registry
|
||||||
|
|
|
||||||
106
README.md
106
README.md
|
|
@ -1,8 +1,10 @@
|
||||||
# MCP Registry
|
# MCP Registry
|
||||||
|
|
||||||
A reference implementation of a registry service for Model Context Protocol (MCP) servers.
|
A community driven registry service for Model Context Protocol (MCP) servers.
|
||||||
|
|
||||||
> **Note:** This project is currently a work in progress.
|
## Development Status
|
||||||
|
|
||||||
|
This project is being built in the open and is currently in the early stages of development. Please see the [overview discussion](https://github.com/modelcontextprotocol/registry/discussions/11) for the project scope and goals. If you would like to contribute, please check out the [contributing guidelines](CONTRIBUTING.md).
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
|
|
@ -18,55 +20,17 @@ The MCP Registry service provides a centralized repository for MCP server entrie
|
||||||
- Comprehensive API documentation
|
- Comprehensive API documentation
|
||||||
- Pagination support for listing registry entries
|
- Pagination support for listing registry entries
|
||||||
|
|
||||||
## Project Structure
|
|
||||||
|
|
||||||
```
|
|
||||||
├── cmd/ # Application entry points
|
|
||||||
├── config/ # Configuration files
|
|
||||||
├── internal/ # Private application code
|
|
||||||
│ ├── api/ # HTTP server and request handlers
|
|
||||||
│ ├── config/ # Configuration management
|
|
||||||
│ ├── model/ # Data models
|
|
||||||
│ └── service/ # Business logic
|
|
||||||
├── pkg/ # Public libraries
|
|
||||||
├── scripts/ # Utility scripts
|
|
||||||
├── tools/ # Command line tools
|
|
||||||
│ └── importer/ # MongoDB data importer tool
|
|
||||||
└── build/ # Build artifacts
|
|
||||||
```
|
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
- Go 1.18 or later
|
- Go 1.18 or later
|
||||||
- MongoDB (optional, for production use)
|
- MongoDB
|
||||||
- Docker (optional, for containerized deployment)
|
- Docker (optional, but recommended for development)
|
||||||
|
|
||||||
### Building
|
## Running
|
||||||
|
|
||||||
```bash
|
The easiest way to get the registry running is to use `docker compose`. This will setup the MCP Registry service, import the seed data and run MongoDB in a local Docker environment.
|
||||||
make build
|
|
||||||
```
|
|
||||||
|
|
||||||
This will create the `registry` binary in the `build/` directory.
|
|
||||||
|
|
||||||
### Running
|
|
||||||
|
|
||||||
```bash
|
|
||||||
./build/mcp-registry
|
|
||||||
```
|
|
||||||
|
|
||||||
Alternatively, run
|
|
||||||
```bash
|
|
||||||
MCP_REGISTRY_DATABASE_URL="mongodb://localhost:27017" ./build/registry
|
|
||||||
```
|
|
||||||
|
|
||||||
By default, the service will run on `http://localhost:8080`.
|
|
||||||
|
|
||||||
### Docker Deployment
|
|
||||||
|
|
||||||
You can build and run the service using Docker:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Build the Docker image
|
# Build the Docker image
|
||||||
|
|
@ -78,52 +42,32 @@ docker compose up
|
||||||
|
|
||||||
This will start the MCP Registry service and MongoDB with Docker, exposing it on port 8080.
|
This will start the MCP Registry service and MongoDB with Docker, exposing it on port 8080.
|
||||||
|
|
||||||
### Using the Fake Service
|
## Building
|
||||||
|
|
||||||
For development and testing purposes, the application includes a fake service with pre-populated registry entries. To use the fake service:
|
If you prefer to run the service locally without Docker, you can build and run it directly using Go.
|
||||||
|
|
||||||
1. Set the environment to "test":
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export MCP_REGISTRY_ENVIRONMENT=test
|
# Build a registry executable
|
||||||
./build/registry
|
go build ./cmd/registry
|
||||||
```
|
```
|
||||||
|
This will create the `registry` binary in the current directory. You'll need to have MongoDB running locally or with Docker.
|
||||||
|
|
||||||
Alternatively, run
|
By default, the service will run on `http://localhost:8080`.
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
|
||||||
```bash
|
|
||||||
make run-test
|
|
||||||
```
|
```
|
||||||
|
├── cmd/ # Application entry points
|
||||||
The fake service provides three sample MCP registry entries with the following capabilities:
|
├── config/ # Configuration files
|
||||||
|
├── internal/ # Private application code
|
||||||
- Registry 1: Code generation and completion capabilities
|
│ ├── api/ # HTTP server and request handlers
|
||||||
- Registry 2: Chat and knowledge base capabilities
|
│ ├── config/ # Configuration management
|
||||||
- Registry 3: Data visualization and analysis capabilities
|
│ ├── model/ # Data models
|
||||||
|
│ └── service/ # Business logic
|
||||||
You can interact with the fake data through the API endpoints:
|
├── pkg/ # Public libraries
|
||||||
|
└── scripts/ # Utility scripts
|
||||||
- List all entries: `GET /servers`
|
|
||||||
|
|
||||||
|
|
||||||
The fake service is useful for:
|
|
||||||
- Frontend development without a real backend
|
|
||||||
- Testing API integrations
|
|
||||||
- Example data structure reference
|
|
||||||
|
|
||||||
## Tools
|
|
||||||
|
|
||||||
### Data Importer
|
|
||||||
|
|
||||||
A command-line tool for importing server data from a JSON file into a MongoDB database:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd tools/importer
|
|
||||||
go run main.go -uri mongodb://localhost:27017 -db mcp_registry -collection servers -seed ../../data/seed.json
|
|
||||||
```
|
```
|
||||||
|
|
||||||
For more details on the importer tool, see the [importer README](./tools/importer/README.md).
|
|
||||||
|
|
||||||
## API Documentation
|
## API Documentation
|
||||||
|
|
||||||
The API is documented using Swagger/OpenAPI. You can access the interactive Swagger UI at:
|
The API is documented using Swagger/OpenAPI. You can access the interactive Swagger UI at:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue