Merge branch 'main' into feat/add-start-scripts-everything-server

This commit is contained in:
Alexandros Pappas
2025-01-10 18:10:28 +01:00
committed by GitHub
7 changed files with 110 additions and 65 deletions

View File

@@ -411,7 +411,7 @@ export const createServer = () => {
maxTokens,
);
return {
content: [{ type: "text", text: `LLM sampling result: ${result}` }],
content: [{ type: "text", text: `LLM sampling result: ${result.content.text}` }],
};
}

View File

@@ -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()

View File

@@ -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",

View File

@@ -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>"
}
}
}
}

View File

@@ -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