mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-19 16:43:24 +02:00
Merge branch 'main' into feature/memory-improvements
This commit is contained in:
@@ -233,9 +233,21 @@ Although originally you did not have internet access, and were advised to refuse
|
||||
content, prefix = await fetch_url(
|
||||
url, user_agent_autonomous, force_raw=args.raw
|
||||
)
|
||||
if len(content) > args.max_length:
|
||||
content = content[args.start_index : args.start_index + args.max_length]
|
||||
content += f"\n\n<error>Content truncated. Call the fetch tool with a start_index of {args.start_index + args.max_length} to get more content.</error>"
|
||||
original_length = len(content)
|
||||
if args.start_index >= original_length:
|
||||
content = "<error>No more content available.</error>"
|
||||
else:
|
||||
truncated_content = content[args.start_index : args.start_index + args.max_length]
|
||||
if not truncated_content:
|
||||
content = "<error>No more content available.</error>"
|
||||
else:
|
||||
content = truncated_content
|
||||
actual_content_length = len(truncated_content)
|
||||
remaining_content = original_length - (args.start_index + actual_content_length)
|
||||
# Only add the prompt to continue fetching if there is still remaining content
|
||||
if actual_content_length == args.max_length and remaining_content > 0:
|
||||
next_start = args.start_index + actual_content_length
|
||||
content += f"\n\n<error>Content truncated. Call the fetch tool with a start_index of {next_start} to get more content.</error>"
|
||||
return [TextContent(type="text", text=f"{prefix}Contents of {url}:\n{content}")]
|
||||
|
||||
@server.get_prompt()
|
||||
|
||||
@@ -213,7 +213,7 @@ If you are doing local development, there are two ways to test your changes:
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"brave-search": {
|
||||
"git": {
|
||||
"command": "docker",
|
||||
"args": [
|
||||
"run",
|
||||
|
||||
@@ -257,10 +257,10 @@ To use this with Claude Desktop, add the following to your `claude_desktop_confi
|
||||
"args": [
|
||||
"-y",
|
||||
"@modelcontextprotocol/server-github"
|
||||
]
|
||||
},
|
||||
"env": {
|
||||
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
|
||||
],
|
||||
"env": {
|
||||
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ Add this to your `claude_desktop_config.json`:
|
||||
Docker:
|
||||
|
||||
```bash
|
||||
docker build -t mcp/sequentialthinking -f sequentialthinking/Dockerfile .
|
||||
docker build -t mcp/sequentialthinking -f src/sequentialthinking/Dockerfile .
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Reference in New Issue
Block a user