Skip to main content
The MCP provider connects Colin to Model Context Protocol servers. Through MCP, your documents can fetch live data from project trackers, databases, code repositories, and other systems. Colin acts as an MCP client, connecting to configured servers and fetching resources during compilation. Each configured MCP server becomes a separate provider instance with its own namespace. Configure a server named “github” and it becomes accessible as colin.mcp.github in templates.

Configuration

MCP providers require a name field—there is no default MCP provider. Each entry in colin.toml defines a named server instance:
colin.toml
[[providers.mcp]]
name = "github"
command = "uvx"
args = ["mcp-server-github"]

[[providers.mcp]]
name = "linear"
command = "npx"
args = ["-y", "@linear/mcp-server"]
The name field determines the template namespace. A server named github becomes accessible as colin.mcp.github, while linear becomes colin.mcp.linear. Colin starts server processes when entering the provider lifespan and terminates them on shutdown.
FieldDescription
nameRequired. Identifier used in templates as colin.mcp.<name>
commandExecutable to run for stdio servers
argsCommand-line arguments as an array
envEnvironment variables passed to the server
urlServer endpoint URL for remote servers
headersHTTP headers for remote server authentication

Stdio Servers

Local process servers communicate via stdin/stdout. Specify the executable and arguments:
colin.toml
[[providers.mcp]]
name = "filesystem"
command = "npx"
args = ["@anthropic/mcp-server-filesystem", "/path/to/data"]
Pass credentials and configuration through environment variables:
colin.toml
[[providers.mcp]]
name = "postgres"
command = "npx"
args = ["@anthropic/mcp-server-postgres"]
env = { DATABASE_URL = "postgres://user:pass@localhost/db" }
Reference shell environment variables with ${VAR} syntax. Colin substitutes values from your environment when starting the server:
colin.toml
[[providers.mcp]]
name = "github"
command = "uvx"
args = ["mcp-server-github"]
env = { GITHUB_TOKEN = "${GITHUB_TOKEN}" }

Remote Servers

HTTP and SSE servers connect over the network instead of spawning a local process:
colin.toml
[[providers.mcp]]
name = "remote-api"
url = "https://api.example.com/mcp"
For servers requiring authentication:
colin.toml
[[providers.mcp]]
name = "authenticated"
url = "https://api.example.com/mcp"
headers = { Authorization = "Bearer ${API_TOKEN}" }

Template Functions

Each MCP server exposes these functions through its namespace:
FunctionPurpose
resource()Fetch a resource from the server
list_resources()List available resources
list_skills()Discover skills from skill servers
prompt()Retrieve a prompt template from the server
list_tools()List available tools
server_info()Get server metadata

Resource

Use colin.mcp.<name>.resource() to fetch content from a server:
models/sources/readme.md
---
name: GitHub README
---

{{ colin.mcp.github.resource('repo://owner/repo/contents/README.md') }}
The function returns an MCPResource object with content and metadata:
PropertyDescription
.contentThe resource content as a string
.nameResource name from the server
.uriFull MCP URI for tracking
.descriptionOptional description from server
.updatedLast update timestamp
Access properties directly:
{% set readme = colin.mcp.github.resource('repo://owner/repo/contents/README.md') %}

# {{ readme.name }}

{{ readme.content }}
Each MCP server defines its own URI scheme. Consult the server’s documentation for available resources:
{# GitHub server #}
{{ colin.mcp.github.resource('repo://owner/repo/contents/README.md') }}
{{ colin.mcp.github.resource('repo://owner/repo/issues') }}

{# Linear server #}
{{ colin.mcp.linear.resource('projects') }}
{{ colin.mcp.linear.resource('issues?teamId=TEAM-123') }}

{# Filesystem server #}
{{ colin.mcp.filesystem.resource('file:///data/config.json') }}

{# Postgres server #}
{{ colin.mcp.postgres.resource('query://SELECT * FROM users LIMIT 10') }}

Prompt

Some MCP servers provide prompt templates. Use colin.mcp.<name>.prompt() to retrieve them:
models/analysis.md
---
name: Code Analysis
---

{% set review = colin.mcp.github.prompt('code-review', repo='owner/repo') %}
{{ review.content }}
The function returns an MCPPrompt object with similar properties to MCPResource. Prompt arguments are passed as keyword parameters after the prompt name.

List Resources

Use colin.mcp.<name>.list_resources() to discover available resources from a server:
{% set resources = colin.mcp.github.list_resources() %}
{% for r in resources %}
- {{ r.uri }}: {{ r.description or "No description" }}
{% endfor %}
Returns a list of MCPResourceInfo objects with lightweight metadata (no content fetched):
PropertyTypeDescription
uristrFull MCP URI
namestr | NoneResource name
descriptionstr | NoneOptional description
mime_typestr | NoneMIME type

List Skills

For MCP servers that serve skills using the skill:// scheme (like FastMCP skill servers), use list_skills() to discover and download skills:
{% for skill in colin.mcp.source.list_skills() %}
# {{ skill.name }}
{{ skill.description or "No description" }}

Files:
{% for file in skill.files %}
- {{ file.path }}{% if file.hash %} ({{ file.hash[:8] }}){% endif %}
{% endfor %}
{% endfor %}
This method:
  1. Finds resources matching skill://{name}/SKILL.md
  2. Fetches manifests from skill://{name}/_manifest
  3. Returns SkillInfo objects with file lists
PropertyTypeDescription
namestrSkill identifier
descriptionstr | NoneSkill description
fileslist[SkillFileInfo]Files in the skill
Each SkillFileInfo has:
PropertyTypeDescription
pathstrRelative file path
hashstr | NoneContent hash for change detection
Use list_skills() with resource() to download skill content:
{% for skill in colin.mcp.source.list_skills() %}
{% for file in skill.files %}
{% file skill.name ~ "/" ~ file.path %}
{{ colin.mcp.source.resource('skill://' ~ skill.name ~ '/' ~ file.path).content }}
{% endfile %}
{% endfor %}
{% endfor %}

Objects

The MCP provider introduces these domain objects: MCPResource - Returned by resource():
PropertyTypeDescription
uristrFull MCP URI
contentstrResource content
namestrResource name
descriptionstr | NoneOptional description
MCPPrompt - Returned by prompt():
PropertyTypeDescription
contentstrPrompt content
namestrPrompt name
argumentsdictArguments passed to the prompt
descriptionstr | NoneOptional description
MCPResourceInfo - Returned by list_resources():
PropertyTypeDescription
uristrFull MCP URI
namestr | NoneResource name
descriptionstr | NoneOptional description
mime_typestr | NoneMIME type
SkillInfo - Returned by list_skills():
PropertyTypeDescription
namestrSkill identifier
descriptionstr | NoneSkill description
fileslist[SkillFileInfo]Files in the skill
SkillFileInfo - Files within a skill:
PropertyTypeDescription
pathstrRelative file path
hashstr | NoneContent hash

Dependency Tracking

MCP resources integrate with Colin’s dependency system. Wrap results with ref() to record dependencies in the manifest:
{# Fetched but not tracked #}
{{ colin.mcp.github.resource('repo://...').content }}

{# Tracked as a dependency #}
{{ ref(colin.mcp.github.resource('repo://...')).content }}
The manifest records MCP resources as standard refs:
{
  "documents": {
    "sources/readme": {
      "refs_evaluated": ["mcp.github://?resource=repo%3A%2F%2Fowner%2Frepo%2Fcontents%2FREADME.md"]
    }
  }
}

CLI Commands

The CLI provides commands for MCP server management:
# Add a server
colin mcp add github uvx mcp-server-github

# List configured servers
colin mcp list

# Test server connectivity
colin mcp test github

# Remove a server
colin mcp remove github
The test command starts the server and lists available resources, helping discover the correct URIs for your documents.

Combining Sources

MCP resources work alongside other providers and local documents:
models/skills/engineering-status.md
---
name: Engineering Status
---

# Engineering Status

## Active Projects

{{ colin.mcp.linear.resource('projects?team=engineering') }}

## Repository Health

{% set issues = colin.mcp.github.resource('repo://acme/platform/issues?state=open') %}
{{ issues.content }}

## Analysis

{% llm %}
Based on the project data and open issues, assess team health:

Projects:
{{ colin.mcp.linear.resource('projects?team=engineering') }}

Issues:
{{ issues.content }}

Provide velocity assessment, blockers, and priorities.
{% endllm %}