modelcontextprotocol / modelcontextprotocol/go-sdk
Support Schema Cycles
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.1k
- Forks
- 543
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 37
Description
Is your feature request related to a problem? Please describe.
I am writing a custom MCP server that integrates with JIRA. The go-jira go project contains nice JIRA API data structures, such as jira.Issue. However, I cannot use jira.Issue with this library because cycles are not allowed for some reason:
output schema: ForType(jira.Issue): computing element schema: cycle detected for type jira.Issue
This is because JIRA Issues can reference other issues, hence the data structure can have references (pointers) to other Issues.
Describe the solution you'd like
Unless this is a fundamental constraint of MCP, I don't see why cycles are disallowed seeing as both golang and JSON support cyclic (self-referencing) schemas.
Describe alternatives you've considered
For now I've had to create a custom struct that replicates much of jira.Issue but without the cycles
Additional context
Add any other context or screenshots about the feature request here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the schema generation path around the reported ForType(jira.Issue) cycle-detected error. Use the go-jira jira.Issue structure as a reproduction and add coverage showing that self-referencing schemas can be generated without the cycle error; done means the issue type is accepted while existing schema behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100