Niel Thiart
fd2a2d6299
fix: Fix InitializeResult schema mismatch in Context7 server response
...
The response from the server was not matching the expected `InitializeResult` schema [^1].
1. The `serverInfo` field contained a `description` that was not part of the schema.
2. The `capabilities` field was incorrectly nested in `serverInfo`.
3. The `capabilities` field in the response included `resources`, even though this server does not support resources.
This change also adds an `instructions` field to the response, which provides guidance on how to use the server.
The SDK takes care of registering capabilities [^2], so we don't need to add this when instantiating the `server` object.
Response does not match `InitializeResult` schema:
```json
{
"capabilities": {
"tools": {
"listChanged": true
}
},
"serverInfo": {
"name": "Context7",
"version": "1.0.13",
"description": "Retrieves up-to-date documentation and code examples for any library.",
"capabilities": {
"resources": {},
"tools": {}
}
}
}
```
Response matches `InitializeResult` schema:
```json
{
"capabilities": {
"tools": {
"listChanged": true
}
},
"serverInfo": {
"name": "Context7",
"version": "1.0.13"
},
"instructions": "Use this server to retrieve up-to-date documentation and code examples for any library."
}
```
[^1]: https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/2025-03-26/schema.ts#L179-L193
[^2]: 2cf4f0ca86/src/server/mcp.ts (L101)
Fixes https://github.com/upstash/context7/issues/282
2025-06-12 12:06:35 +02:00
Abdusshh
4f04e02851
refactor: replace url.parse with URL API for session ID extraction and validate transports
2025-06-11 14:58:26 +03:00
Abdusshh
2e6c9a6c6b
feat: replace env vars with CLI arguments, remove dotenv and add commander
2025-06-11 14:49:50 +03:00
Abdusshh
a7b11bbee7
feat: improve error handling and response types for library search and documentation fetch
2025-06-07 00:20:52 +03:00
Abdusshh
d513d1a59f
feat: add port fallback mechanism when initial port is in use
2025-05-28 14:37:30 +03:00
Abdusshh
16d64493f3
chore: bump version to 1.0.13 and run formatter
2025-05-28 12:31:03 +03:00
buggyhunter
c2f695d377
added sse http support
2025-05-28 00:34:49 +03:00
Abdusshh
e7047b4f16
refactor: remove userQuery parameter and header from library documentation fetch
2025-05-26 18:55:16 +03:00
Abdusshh
da11fccf75
feat: add user query parameter to documentation fetch requests
2025-05-24 19:33:15 +03:00
Abdusshh
e50ee0dfd3
refactor: remove folders parameter support from library documentation fetching
2025-05-24 17:59:10 +03:00
Abdusshh
ce2a63a37a
feat: add version support in search results and update descriptions
2025-05-24 17:57:46 +03:00
enesakar
d29a9457f3
version support in mcp
2025-05-22 11:41:03 -07:00
enesakar
5fc52df93c
fix: allow user to set libraryid in prompt
2025-05-19 11:18:42 -07:00
Abdusshh
5326cc3890
refactor: replace GitHub stars with trust score in search results and API types
2025-05-17 02:49:46 +03:00
Abdusshh
459e63d771
feat: improve search result formatting to handle missing data gracefully
2025-05-08 02:47:30 +03:00
Abdusshh
515b8e200b
feat: improve library search results with stars and snippets info, update descriptions
2025-05-02 00:09:19 +03:00
Abdusshh
99a74eb5ee
feat: increase default minimum tokens from 5000 to 10000 and update documentation
2025-05-01 22:50:40 +03:00
akbxr
ea2d82abab
feat: Add environment variable support for minimum token configuration
2025-05-01 20:30:32 +07:00
Abdusshh
58e4d18503
chore: update repository URLs and bump version to 1.0.6
2025-04-23 20:02:57 +03:00
Abdusshh
b199a1645e
feat: enforce minimum token limit of 5000 for library docs retrieval
2025-04-23 00:18:15 +03:00
Abdusshh
ae1a7c44fa
feat: string-to-number conversion for tokens parameter
2025-04-19 16:14:24 +03:00
Abdusshh
11c5daf82d
feat: make libraryName parameter required
2025-04-19 14:50:49 +03:00
Abdusshh
f97c5a004b
feat: add description field to SearchResult and update formatting to include description
2025-04-19 14:38:31 +03:00
Abdusshh
eaa077c0a5
feat: add separator line between search results for better readability
2025-04-19 12:56:39 +03:00
Abdusshh
23e3c8ab16
feat: migrate to v1 API, remove reranking on client, bump version
2025-04-17 01:03:45 +03:00
Abdusshh
500d19349d
Update API endpoint from /projects to /libraries for project fetching
2025-04-13 19:42:23 +03:00
Abdusshh
2429b67e7a
update API endpoint from /libraries to /projects for project fetching until the new api is available
2025-04-13 19:41:29 +03:00
Abdusshh
8f59071ba1
feat: update API endpoint and fix URL parameter handling, add a custom header for requests to specify the source as "mcp-server"
2025-04-13 19:26:58 +03:00
Kent C. Dodds
a83042c6bc
refactor(api): make param handling more terse
2025-04-12 10:21:05 +02:00
Josh
30ab52ae79
fix: rephrase use-case
2025-04-11 15:11:28 +02:00
Josh
2afbce023b
fix: force id resolve before getting docs
2025-04-11 10:01:28 +02:00
Abdusshh
ddfa40b4f4
update README with libraryName param
2025-04-09 04:02:56 +03:00
Abdusshh
dd3b1661c1
fix: folder search parameter
2025-04-08 20:29:04 +03:00
Abdusshh
52c384a2a0
feat: improve project mathing with new ids
2025-04-08 13:50:44 +03:00
Abdusshh
75cc60a674
fix: update endpoint to use llms.txt format
2025-04-06 00:44:43 +03:00
Abdusshh
45062a2e37
feat: rerank libraries while listing
2025-04-04 20:29:10 +03:00
Abdusshh
39a43d5b1d
refactor: use library instead of package
2025-04-04 18:20:07 +03:00
Abdusshh
f2db8d4be0
feat: change package name and update readme
2025-04-03 12:32:03 +03:00
Abdusshh
aad7f06a05
feat: update tool names and descriptions
2025-04-03 11:51:17 +03:00
Abdusshh
27d5887a1b
feat: create seperate files for helper functions and api calls
2025-04-03 11:50:02 +03:00
Abdusshh
22d6e5ef59
feat: create MCP server and tools to see available packages and retrieve specific package context
2025-03-31 15:19:29 +03:00