Skip to main content
Glama
raptor7197

MCP LLM Integration Server

by raptor7197

MCP LLM Integration Server

This is a Model Context Protocol (MCP) server that allows you to integrate local LLM capabilities with MCP-compatible clients.

Features

  • llm_predict: Process text prompts through a local LLM

  • echo: Echo back text for testing purposes

Related MCP server: MCP Starter

Setup

  1. Install dependencies:

    source .venv/bin/activate
    uv pip install mcp
  2. Test the server:

    python -c "
    import asyncio
    from main import server, list_tools, call_tool
    
    async def test():
        tools = await list_tools()
        print(f'Available tools: {[t.name for t in tools]}')
        result = await call_tool('echo', {'text': 'Hello!'})
        print(f'Result: {result[0].text}')
    
    asyncio.run(test())
    "

Integration with LLM Clients

For Claude Desktop

Add this to your Claude Desktop configuration (~/.config/claude-desktop/claude_desktop_config.json):

{
  "mcpServers": {
    "llm-integration": {
      "command": "/home/tandoori/Desktop/dev/mcp-server/.venv/bin/python",
      "args": ["/home/tandoori/Desktop/dev/mcp-server/main.py"]
    }
  }
}

For Continue.dev

Add this to your Continue configuration (~/.continue/config.json):

{
  "mcpServers": [
    {
      "name": "llm-integration",
      "command": "/home/tandoori/Desktop/dev/mcp-server/.venv/bin/python",
      "args": ["/home/tandoori/Desktop/dev/mcp-server/main.py"]
    }
  ]
}

For Cline

Add this to your Cline MCP settings:

{
  "llm-integration": {
    "command": "/home/tandoori/Desktop/dev/mcp-server/.venv/bin/python",
    "args": ["/home/tandoori/Desktop/dev/mcp-server/main.py"]
  }
}

Customizing the LLM Integration

To integrate your own local LLM, modify the perform_llm_inference function in main.py:

async def perform_llm_inference(prompt: str, max_tokens: int = 100) -> str:
    Example: Using transformers
    from transformers import pipeline
    generator = pipeline('text-generation', model='your-model')
    result = generator(prompt, max_length=max_tokens)
    return result[0]['generated_text']
    
    Example: Using llama.cpp python bindings
    from llama_cpp import Llama
    llm = Llama(model_path="path/to/your/model.gguf")
    output = llm(prompt, max_tokens=max_tokens)
    return output['choices'][0]['text']
    
    Current placeholder implementation
    return f"Processed prompt: '{prompt}' (max_tokens: {max_tokens})"

Testing

Run the server directly to test JSON-RPC communication:

source .venv/bin/activate
python main.py

Then send JSON-RPC requests via stdin:

{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test-client", "version": "1.0.0"}}}

Available Tools

2 tools
echoA

Echo back the input text for testing

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesText to echo back

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. 'Echo back the input text' accurately conveys the primary behavior and implies no side effects, which is sufficient for such a trivial tool. It does not mention output formatting, but the behavior is otherwise transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no extraneous words. It is front-loaded with the action and purpose, earning every word it uses.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter, side-effect-free echo tool with full schema coverage, the description is complete. The return behavior is self-evident from 'Echo back the input text', so no output schema is strictly necessary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description's 'input text' directly parallels the schema's 'Text to echo back'. The description adds no new semantics beyond the schema, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Echo back'), the target ('input text'), and the intended purpose ('for testing'). It is specific enough that an agent can distinguish it from llm_predict, though it does not explicitly name the sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'for testing' implies when to use the tool, but there is no explicit guidance about when not to use it or how it compares to llm_predict. The intended context is clear but underdeveloped.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

llm_predictC

Process text input through a local LLM

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesThe text prompt to send to the LLM
max_tokensNoMaximum number of tokens to generate

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It reveals only that the LLM is 'local', implying offline execution and privacy, but says nothing about response format, nondeterminism, latency, errors, or side effects. This is insufficient for a tool whose output will be consumed by the agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one short sentence with no filler, tautology, or duplication. It front-loads the action and resource. This efficiency is good, though it comes at the expense of necessary detail, so it does not reach a perfect 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no output schema and no annotations, so the description must explain what the agent can expect from a call. It fails to mention that the tool returns a text completion, how 'max_tokens' affects behavior, or any example invocation. Even for a simple two-parameter tool, an agent lacks enough information to confidently interpret the response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents both 'prompt' and 'max_tokens'. The description does not add semantic value beyond restating 'text input', which maps directly to 'prompt'. The baseline of 3 applies because the schema carries the parameter information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description identifies a specific resource ('local LLM') and an action ('process text input'), which tells an agent the tool routes text to a language model. The verb 'process' is generic and does not explicitly say 'generate' or 'predict', but the tool name 'llm_predict' disambiguates the intent. It does not mention why this differs from sibling 'echo', so it is not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to choose this tool over its sibling 'echo' or any alternative. There are no stated conditions, exclusions, or example use cases. An agent would have to infer from the name alone that this is for LLM inference, but nothing in the text says 'use this when you need model-generated text'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.2/5.0
Disambiguation5/5

llm_predict and echo are completely distinct in purpose—one performs LLM inference while the other is a simple testing utility. There is no overlap or ambiguity between them.

Naming Consistency3/5

llm_predict uses a prefix-plus-verb compound while echo is a bare verb, showing mixed naming conventions. However, both names are short and readable, so the inconsistency is not chaotic.

Tool Count3/5

With only two tools, the server sits at the borderline of feeling thin. For a minimal LLM integration demo the pair is acceptable, but a broader integration server would likely need more endpoints.

Completeness2/5

The server provides only one functional inference operation plus an echo test tool. Obvious gaps exist for an 'LLM integration server,' such as model management, parameter options, or alternative interaction modes like embeddings or chat.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    D
    quality
    D
    maintenance
    A foundation for building custom local Model Context Protocol (MCP) servers that provide tools accessible to AI assistants like Cursor or Claude Desktop.
    1
    37
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that bridges MCP clients with local LLM services, enabling seamless integration with MCP-compatible applications through standard tools like chat completion, model listing, and health checks.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/raptor7197/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server