Skip to content

Commit ca7d1d8

Browse files
committed
feat: Implement modular YAML-based registry system for ToolHive MCP servers
- Created modular registry structure with individual YAML files per server - Built registry-builder tool for validation and JSON compilation - Built import-from-toolhive tool to migrate existing entries - Added comprehensive test coverage (69.4%) - Implemented Taskfile for developer workflow automation - Added documentation for users and LLMs on adding entries - Successfully imported all 36 existing MCP servers - Generated registry.json compatible with upstream format - Added field to match upstream JSON structure - Created issue #1346 in ToolHive for JSON serialization improvements The new system allows for: - Better version control with individual entry files - Easier contribution process for new servers - Automated validation and building - Future migration to upstream MCP Registry format
0 parents  commit ca7d1d8

File tree

74 files changed

+6272
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+6272
-0
lines changed

.gitignore

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Test binary, built with `go test -c`
9+
*.test
10+
11+
# Output of the go coverage tool
12+
*.out
13+
coverage.html
14+
15+
# Dependency directories
16+
vendor/
17+
18+
# Build directories
19+
build/
20+
dist/
21+
22+
# IDE specific files
23+
.idea/
24+
*.swp
25+
*.swo
26+
*~
27+
.vscode/
28+
*.iml
29+
30+
# OS specific files
31+
.DS_Store
32+
Thumbs.db
33+
34+
# Environment files
35+
.env
36+
.env.local
37+
38+
# Temporary files
39+
*.tmp
40+
*.bak
41+
*.backup
42+
43+
# Log files
44+
*.log
45+
46+
# Registry build output (but not the source)
47+
/registry.json
48+
49+
# Go workspace file
50+
go.work
51+
go.work.sum

.golangci.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
version: "2"
2+
run:
3+
issues-exit-code: 1
4+
output:
5+
formats:
6+
text:
7+
path: stdout
8+
print-linter-name: true
9+
print-issued-lines: true
10+
linters:
11+
default: none
12+
enable:
13+
- depguard
14+
- exhaustive
15+
- goconst
16+
- gocyclo
17+
- gosec
18+
- govet
19+
- ineffassign
20+
- lll
21+
- paralleltest
22+
- promlinter
23+
- revive
24+
- staticcheck
25+
- thelper
26+
- tparallel
27+
- unparam
28+
- unused
29+
settings:
30+
depguard:
31+
rules:
32+
prevent_unmaintained_packages:
33+
list-mode: lax
34+
files:
35+
- $all
36+
- '!$test'
37+
deny:
38+
- pkg: io/ioutil
39+
desc: this is deprecated
40+
gocyclo:
41+
min-complexity: 15
42+
gosec:
43+
excludes:
44+
- G601
45+
lll:
46+
line-length: 130
47+
revive:
48+
severity: warning
49+
rules:
50+
- name: blank-imports
51+
severity: warning
52+
- name: context-as-argument
53+
- name: context-keys-type
54+
- name: duplicated-imports
55+
- name: error-naming
56+
- name: error-return
57+
- name: exported
58+
severity: error
59+
- name: if-return
60+
- name: identical-branches
61+
- name: indent-error-flow
62+
- name: import-shadowing
63+
- name: package-comments
64+
- name: redefines-builtin-id
65+
- name: struct-tag
66+
- name: unconditional-recursion
67+
- name: unnecessary-stmt
68+
- name: unreachable-code
69+
- name: unused-parameter
70+
- name: unused-receiver
71+
- name: unhandled-error
72+
disabled: true
73+
exclusions:
74+
generated: lax
75+
rules:
76+
- linters:
77+
- lll
78+
- gocyclo
79+
- errcheck
80+
- dupl
81+
- gosec
82+
path: (.+)_test\.go
83+
- linters:
84+
- lll
85+
path: .golangci.yml
86+
paths:
87+
- third_party$
88+
- builtin$
89+
- examples$
90+
formatters:
91+
enable:
92+
- gci
93+
- gofmt
94+
settings:
95+
gci:
96+
sections:
97+
- standard
98+
- default
99+
- prefix(github.com/stacklok/toolhive-registry)
100+
exclusions:
101+
generated: lax
102+
paths:
103+
- third_party$
104+
- builtin$
105+
- examples$

.task/checksum/build-import-tool

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
509fdb808f60922f64eaa617337317bd

.task/checksum/build-registry

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e56ad4cd5ccd28cb4dab57a8ada0accc
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
451c060aceae9cd62ed86d8099ee0ac2

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at <[email protected]>. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Contributing to ToolHive <!-- omit from toc -->
2+
3+
First off, thank you for taking the time to contribute to ToolHive! :+1: :tada:
4+
ToolHive is released under the Apache 2.0 license. If you would like to
5+
contribute something or want to hack on the code, this document should help you
6+
get started. You can find some hints for starting development in ToolHive's
7+
[README](https://github.com/stacklok/toolhive/blob/main/README.md).
8+
9+
## Table of contents <!-- omit from toc -->
10+
11+
- [Code of conduct](#code-of-conduct)
12+
- [Reporting security vulnerabilities](#reporting-security-vulnerabilities)
13+
- [How to contribute](#how-to-contribute)
14+
- [Using GitHub Issues](#using-github-issues)
15+
- [Not sure how to start contributing?](#not-sure-how-to-start-contributing)
16+
- [Pull request process](#pull-request-process)
17+
- [Contributing to docs](#contributing-to-docs)
18+
- [Commit message guidelines](#commit-message-guidelines)
19+
20+
## Code of conduct
21+
22+
This project adheres to the
23+
[Contributor Covenant](https://github.com/stacklok/toolhive/blob/main/CODE_OF_CONDUCT.md)
24+
code of conduct. By participating, you are expected to uphold this code. Please
25+
report unacceptable behavior to
26+
27+
28+
## Reporting security vulnerabilities
29+
30+
If you think you have found a security vulnerability in ToolHive please DO NOT
31+
disclose it publicly until we've had a chance to fix it. Please don't report
32+
security vulnerabilities using GitHub issues; instead, please follow this
33+
[process](https://github.com/stacklok/toolhive/blob/main/SECURITY.MD)
34+
35+
## How to contribute
36+
37+
### Using GitHub Issues
38+
39+
We use GitHub issues to track bugs and enhancements. If you have a general usage
40+
question, please ask in
41+
[ToolHive's discussion forum](https://discord.gg/stacklok).
42+
43+
If you are reporting a bug, please help to speed up problem diagnosis by
44+
providing as much information as possible. Ideally, that would include a small
45+
sample project that reproduces the problem.
46+
47+
### Not sure how to start contributing?
48+
49+
PRs to resolve existing issues are greatly appreciated, and issues labeled as
50+
["good first issue"](https://github.com/stacklok/toolhive/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
51+
are a great place to start!
52+
53+
### Pull request process
54+
55+
- -All commits must include a Signed-off-by trailer at the end of each commit
56+
message to indicate that the contributor agrees to the Developer Certificate
57+
of Origin. For additional details, check out the [DCO instructions](dco.md).
58+
- Create an issue outlining the fix or feature.
59+
- Fork the ToolHive repository to your own GitHub account and clone it locally.
60+
- Hack on your changes.
61+
- Correctly format your commit messages, see
62+
[Commit message guidelines](#commit-message-guidelines) below.
63+
- Open a PR by ensuring the title and its description reflect the content of the
64+
PR.
65+
- Ensure that CI passes, if it fails, fix the failures.
66+
- Every pull request requires a review from the core ToolHive team before
67+
merging.
68+
- Once approved, all of your commits will be squashed into a single commit with
69+
your PR title.
70+
71+
### Contributing to docs
72+
73+
The ToolHive user documentation website is maintained in the
74+
[docs-website](https://github.com/stacklok/docs-website) repository. If you want
75+
to contribute to the documentation, please open a PR in that repo.
76+
77+
Please review the README and
78+
[STYLE-GUIDE](https://github.com/stacklok/docs-website/blob/main/STYLE-GUIDE.md)
79+
in the docs-website repository for more information on how to contribute to the
80+
documentation.
81+
82+
### Commit message guidelines
83+
84+
We follow the commit formatting recommendations found on
85+
[Chris Beams' How to Write a Git Commit Message article](https://chris.beams.io/posts/git-commit/):
86+
87+
1. Separate subject from body with a blank line
88+
1. Limit the subject line to 50 characters
89+
1. Capitalize the subject line
90+
1. Do not end the subject line with a period
91+
1. Use the imperative mood in the subject line
92+
1. Use the body to explain what and why vs. how

0 commit comments

Comments
 (0)