init.go 957 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package context7
  2. import (
  3. _ "embed"
  4. "github.com/labring/aiproxy/core/model"
  5. mcpservers "github.com/labring/aiproxy/mcp-servers"
  6. )
  7. //go:embed README.md
  8. var readme string
  9. //go:embed README.cn.md
  10. var readmeCN string
  11. // need import in mcpregister/init.go
  12. func init() {
  13. mcpservers.Register(
  14. mcpservers.NewMcp(
  15. "context7",
  16. "Context7",
  17. model.PublicMCPTypeProxyStreamable,
  18. mcpservers.WithNameCN("Context7"),
  19. mcpservers.WithGitHubURL("https://github.com/upstash/context7"),
  20. mcpservers.WithProxyConfigTemplates(configTemplates),
  21. mcpservers.WithTags([]string{"context7", "document", "code", "copilot"}),
  22. mcpservers.WithDescription(
  23. "Context7 is a tool that can help you find the latest documents and fight against code hallucinations.",
  24. ),
  25. mcpservers.WithDescriptionCN(
  26. "Context7 可以获取最新文档,对抗代码幻觉。",
  27. ),
  28. mcpservers.WithReadme(readme),
  29. mcpservers.WithReadmeCN(readmeCN),
  30. ),
  31. )
  32. }